home *** CD-ROM | disk | FTP | other *** search
/ Atari FTP / ATARI_FTP_0693.zip / ATARI_FTP_0693 / Mint / mint104s.zoo / mint.src / proto.h < prev    next >
Text File  |  1993-03-08  |  16KB  |  385 lines

  1. /* bios.c */
  2. long ARGS_ON_STACK getmpb P_((void *ptr));
  3. long bconstat P_((int dev));
  4. long bconin P_((int dev));
  5. long bconout P_((int dev, int c));
  6. long ARGS_ON_STACK ubconstat P_((int dev));
  7. long ARGS_ON_STACK ubconin P_((int dev));
  8. long ARGS_ON_STACK ubconout P_((int dev, int c));
  9. long ARGS_ON_STACK rwabs P_((int rwflag, void *buffer, int number, int recno, int dev, long lrecno));
  10. long ARGS_ON_STACK setexc P_((int number, long vector));
  11. long ARGS_ON_STACK tickcal P_((void));
  12. long ARGS_ON_STACK getbpb P_((int dev));
  13. long bcostat P_((int dev));
  14. long ARGS_ON_STACK ubcostat P_((int dev));
  15. long ARGS_ON_STACK mediach P_((int dev));
  16. long ARGS_ON_STACK drvmap P_((void));
  17. long ARGS_ON_STACK kbshift P_((int mode));
  18. long ARGS_ON_STACK bflush P_((void));
  19. void init_bios P_((void));
  20. long ARGS_ON_STACK do_bconin P_((int dev));
  21. int checkkeys P_((void));
  22. void init_vectors P_((void));
  23. void unlink_vectors  P_((long start, long end));
  24.  
  25. /* xbios.c */
  26. long ARGS_ON_STACK supexec P_((Func funcptr, long a1, long a2, long a3, long a4, long a5));
  27. long ARGS_ON_STACK midiws P_((int, const char *));
  28. int mapin P_((int));
  29. long ARGS_ON_STACK uiorec P_((int));
  30. long ARGS_ON_STACK rsconf P_((int, int, int, int, int, int));
  31. long ARGS_ON_STACK bconmap P_((int));
  32. long ARGS_ON_STACK cursconf P_((int, int));
  33. void init_xbios P_((void));
  34.  
  35. /* console.c */
  36. long file_instat P_((FILEPTR *f));
  37. long file_outstat P_((FILEPTR *f));
  38. long file_getchar P_((FILEPTR *f, int mode));
  39. long file_putchar P_((FILEPTR *f, long c, int mode));
  40. long ARGS_ON_STACK c_conin P_((void));
  41. long ARGS_ON_STACK c_conout P_((int c));
  42. long ARGS_ON_STACK c_auxin P_((void));
  43. long ARGS_ON_STACK c_auxout P_((int c));
  44. long ARGS_ON_STACK c_prnout P_((int c));
  45. long ARGS_ON_STACK c_rawio P_((int c));
  46. long ARGS_ON_STACK c_rawcin P_((void));
  47. long ARGS_ON_STACK c_necin P_((void));
  48. long ARGS_ON_STACK c_conws P_((const char *str));
  49. long ARGS_ON_STACK c_conrs P_((char *buf));
  50. long ARGS_ON_STACK c_conis P_((void));
  51. long ARGS_ON_STACK c_conos P_((void));
  52. long ARGS_ON_STACK c_prnos P_((void));
  53. long ARGS_ON_STACK c_auxis P_((void));
  54. long ARGS_ON_STACK c_auxos P_((void));
  55. long ARGS_ON_STACK f_instat P_((int fh));
  56. long ARGS_ON_STACK f_outstat P_((int fh));
  57. long ARGS_ON_STACK f_getchar P_((int fh, int mode));
  58. long ARGS_ON_STACK f_putchar P_((int fh, long c, int mode));
  59.  
  60. /* dos.c */
  61. long ARGS_ON_STACK s_version P_((void));
  62. long ARGS_ON_STACK s_uper P_((long new_ssp));
  63. long ARGS_ON_STACK t_getdate P_((void));
  64. long ARGS_ON_STACK t_setdate P_((int date));
  65. long ARGS_ON_STACK t_gettime P_((void));
  66. long ARGS_ON_STACK t_settime P_((int time));
  67. long ARGS_ON_STACK s_yield P_((void));
  68. long ARGS_ON_STACK p_renice P_((int pid, int delta));
  69. long ARGS_ON_STACK p_nice P_((int delta));
  70. long ARGS_ON_STACK p_getpid P_((void));
  71. long ARGS_ON_STACK p_getppid P_((void));
  72. long ARGS_ON_STACK p_getpgrp P_((void));
  73. long ARGS_ON_STACK p_setpgrp P_((int pid, int newgrp));
  74. long ARGS_ON_STACK p_getuid P_((void));
  75. long ARGS_ON_STACK p_getgid P_((void));
  76. long ARGS_ON_STACK p_geteuid P_((void));
  77. long ARGS_ON_STACK p_getegid P_((void));
  78. long ARGS_ON_STACK p_setuid P_((int id));
  79. long ARGS_ON_STACK p_setgid P_((int id));
  80. long ARGS_ON_STACK p_usrval P_((long arg));
  81. long ARGS_ON_STACK p_umask P_((unsigned mode));
  82. long ARGS_ON_STACK p_domain P_((int arg));
  83. long ARGS_ON_STACK p_rusage P_((long *r));
  84. long ARGS_ON_STACK p_setlimit P_((int i, long v));
  85. long ARGS_ON_STACK p_pause P_((void));
  86. long ARGS_ON_STACK t_alarm P_((long x));
  87. long ARGS_ON_STACK s_ysconf P_((int which));
  88. long ARGS_ON_STACK s_alert P_((char *msg));
  89. void init_dos P_((void));
  90.  
  91. /* dosdir.c */
  92. long ARGS_ON_STACK d_setdrv P_((int d));
  93. long ARGS_ON_STACK d_getdrv P_((void));
  94. long ARGS_ON_STACK d_free P_((long *buf, int d));
  95. long ARGS_ON_STACK d_create P_((const char *path));
  96. long ARGS_ON_STACK d_delete P_((const char *path));
  97. long ARGS_ON_STACK d_setpath P_((const char *path));
  98. long ARGS_ON_STACK d_getpath P_((char *path, int drv));
  99. long ARGS_ON_STACK d_getcwd P_((char *path, int drv, int size));
  100. long ARGS_ON_STACK f_setdta P_((DTABUF *dta));
  101. long ARGS_ON_STACK f_getdta P_((void));
  102. long ARGS_ON_STACK f_sfirst P_((const char *path, int attrib));
  103. long ARGS_ON_STACK f_snext P_((void));
  104. long ARGS_ON_STACK f_attrib P_((const char *name, int rwflag, int attr));
  105. long ARGS_ON_STACK f_delete P_((const char *name));
  106. long ARGS_ON_STACK f_rename P_((int junk, const char *old, const char *new));
  107. long ARGS_ON_STACK d_pathconf P_((const char *name, int which));
  108. long ARGS_ON_STACK d_opendir P_((const char *path, int flags));
  109. long ARGS_ON_STACK d_readdir P_((int len, long handle, char *buf));
  110. long ARGS_ON_STACK d_rewind P_((long handle));
  111. long ARGS_ON_STACK d_closedir P_((long handle));
  112. long ARGS_ON_STACK f_xattr P_((int flag, const char *name, XATTR *xattr));
  113. long ARGS_ON_STACK f_link P_((const char *old, const char *new));
  114. long ARGS_ON_STACK f_symlink P_((const char *old, const char *new));
  115. long ARGS_ON_STACK f_readlink P_((int buflen, char *buf, const char *linkfile));
  116. long ARGS_ON_STACK d_cntl P_((int cmd, const char *name, long arg));
  117. long ARGS_ON_STACK f_chown P_((const char *name, int uid, int gid));
  118. long ARGS_ON_STACK f_chmod P_((const char *name, unsigned mode));
  119. long ARGS_ON_STACK d_lock P_((int mode, int drv));
  120.  
  121. /* dosfile.c */
  122. FILEPTR * do_open P_((const char *name, int mode, int attr, XATTR *x));
  123. long do_pclose P_((PROC *p, FILEPTR *f));
  124. long do_close P_((FILEPTR *f));
  125. long ARGS_ON_STACK f_open P_((const char *name, int mode));
  126. long ARGS_ON_STACK f_create P_((const char *name, int attrib));
  127. long ARGS_ON_STACK f_close P_((int fh));
  128. long ARGS_ON_STACK f_read P_((int fh, long count, char *buf));
  129. long ARGS_ON_STACK f_write P_((int fh, long count, const char *buf));
  130. long ARGS_ON_STACK f_seek P_((long place, int fh, int how));
  131. long ARGS_ON_STACK f_dup P_((int fh));
  132. long ARGS_ON_STACK f_force P_((int newh, int oldh));
  133. long ARGS_ON_STACK f_datime P_((short *timeptr, int fh, int rwflag));
  134. long ARGS_ON_STACK f_lock P_((int fh, int mode, long start, long length));
  135. long ARGS_ON_STACK f_pipe P_((short *usrh));
  136. long ARGS_ON_STACK f_cntl P_((int fh, long arg, int cmd));
  137. long ARGS_ON_STACK f_select P_((unsigned timeout, long *rfdp, long *wfdp, long *xfdp));
  138. long ARGS_ON_STACK f_midipipe P_((int pid, int in, int out));
  139.  
  140. /* dosmem.c */
  141. long ARGS_ON_STACK m_addalt P_((long start, long size));
  142. long _do_malloc P_((MMAP map, long size, int mode));
  143. long ARGS_ON_STACK m_xalloc P_((long size, int mode));
  144. long ARGS_ON_STACK m_alloc P_((long size));
  145. long ARGS_ON_STACK m_free P_((virtaddr block));
  146. long ARGS_ON_STACK m_shrink P_((int dummy, virtaddr block, long size));
  147. long ARGS_ON_STACK p_exec P_((int mode, void *ptr1, void *ptr2, void *ptr3));
  148. long terminate P_((int code, int que));
  149. long ARGS_ON_STACK p_term P_((int code));
  150. long ARGS_ON_STACK p_term0 P_((void));
  151. long ARGS_ON_STACK p_termres P_((long save, int code));
  152. long ARGS_ON_STACK p_waitpid P_((int pid, int nohang, long *rusage));
  153. long ARGS_ON_STACK p_wait3 P_((int nohang, long *rusage));
  154. long ARGS_ON_STACK p_wait P_((void));
  155. long ARGS_ON_STACK p_vfork P_((void));
  156. long ARGS_ON_STACK p_fork P_((void));
  157.  
  158. /* dossig.c */
  159. long ARGS_ON_STACK p_kill P_((int pid, int sig));
  160. long ARGS_ON_STACK p_sigaction P_((int sig, const struct sigaction *act,
  161.              struct sigaction *oact));
  162. long ARGS_ON_STACK p_signal P_((int sig, long handler));
  163. long ARGS_ON_STACK p_sigblock P_((ulong mask));
  164. long ARGS_ON_STACK p_sigsetmask P_((ulong mask));
  165. long ARGS_ON_STACK p_sigpending P_((void));
  166. long ARGS_ON_STACK p_sigpause P_((ulong mask));
  167.  
  168. /* filesys.c */
  169. void init_drive P_((int drv));
  170. void init_filesys P_((void));
  171. void load_filesys P_((void));
  172. void close_filesys P_((void));
  173. void ARGS_ON_STACK changedrv P_((unsigned drv));
  174. int disk_changed P_((int drv));
  175. long relpath2cookie
  176.     P_((fcookie *dir, const char *path, char *lastnm, fcookie *res, int depth));
  177. long path2cookie P_((const char *path, char *lastname, fcookie *res));
  178. void release_cookie P_((fcookie *fc));
  179. void dup_cookie P_((fcookie *new, fcookie *old));
  180. FILEPTR *new_fileptr P_((void));
  181. void dispose_fileptr P_((FILEPTR *f));
  182. int ARGS_ON_STACK denyshare P_((FILEPTR *list, FILEPTR *newfileptr));
  183. int denyaccess P_((XATTR *, unsigned));
  184. LOCK * ARGS_ON_STACK denylock P_((LOCK *list, LOCK *newlock));
  185. long dir_access P_((fcookie *, unsigned));
  186. int has_wild P_((const char *name));
  187. void copy8_3 P_((char *dest, const char *src));
  188. int pat_match P_((const char *name, const char *template));
  189. int samefile P_((fcookie *, fcookie *));
  190.  
  191. /* main.c */
  192. void restr_intr P_((void));
  193. void ARGS_ON_STACK enter_kernel P_((void));
  194. void ARGS_ON_STACK leave_kernel P_((void));
  195. #ifdef __GNUC__
  196. int main P_((int argc, char **argv, char **envp));
  197. #else
  198. int main P_((int argc, char **argv));
  199. #endif
  200. void install_cookies P_((void));
  201. void load_config P_((void));
  202.  
  203. /* mem.c */
  204. void init_mem P_((void));
  205. int add_region P_((MMAP map, ulong place, ulong size, unsigned mflags));
  206. void init_core P_((void));
  207. void init_swap P_((void));
  208. MEMREGION *new_region P_((void));
  209. void dispose_region P_((MEMREGION *m));
  210. long change_prot_status P_((PROC *proc, long start, int newmode));
  211. virtaddr attach_region P_((PROC *proc, MEMREGION *reg));
  212. void detach_region P_((PROC *proc, MEMREGION *reg));
  213. MEMREGION *get_region P_((MMAP map, ulong size, int mode));
  214. void free_region P_((MEMREGION *reg));
  215. long shrink_region P_((MEMREGION *reg, ulong newsize));
  216. long max_rsize P_((MMAP map));
  217. long tot_rsize P_((MMAP map, int flag));
  218. virtaddr alloc_region P_((MMAP map, ulong size, int mode));
  219. MEMREGION *create_env P_((const char *env));
  220. MEMREGION *create_base P_((const char *cmd, MEMREGION *env, ulong flags, ulong prgsize));
  221. MEMREGION *load_region P_((const char *name, MEMREGION *env, const char *cmdlin, XATTR *x,
  222.             MEMREGION **text, long *fp));
  223. MEMREGION *get_text_seg P_((FILEPTR *f, FILEHEAD *fh, XATTR *xp));
  224. long load_and_reloc P_((FILEPTR *f, FILEHEAD *fh, char *where, long start,
  225.             long nbytes, BASEPAGE *base));
  226. void rts P_((void));
  227. PROC *exec_region P_((PROC *p, MEMREGION *mem, int thread));
  228. long memused P_((PROC *p));
  229. void recalc_maxmem P_((PROC *p));
  230. int valid_address P_((long addr));
  231. MEMREGION *addr2region P_((long addr));
  232. void DUMP_ALL_MEM P_((void));
  233. void DUMPMEM P_((MMAP map));
  234. void sanity_check P_((MMAP map));
  235.  
  236. /* proc.c */
  237. PROC *new_proc P_((void));
  238. void dispose_proc P_((PROC *p));
  239. PROC *fork_proc P_((void));
  240. void init_proc P_((void));
  241. void reset_priorities P_((void));
  242. void run_next P_((PROC *p, int slices));
  243. void fresh_slices P_((int slices));
  244. void add_q P_((int que, PROC *proc));
  245. void rm_q P_((int que, PROC *proc));
  246. void ARGS_ON_STACK preempt P_((void));
  247. void ARGS_ON_STACK sleep P_((int que, long cond));
  248. void ARGS_ON_STACK wake P_((int que, long cond));
  249. void ARGS_ON_STACK wakeselect P_((long param));
  250. void DUMPPROC P_((void));
  251.  
  252. /* signal.c */
  253. long killgroup P_((int pgrp, int sig));
  254. void post_sig P_((PROC *p, int sig));
  255. void check_sigs P_((void));
  256. void raise P_((int sig));
  257. void bombs P_((int sig));
  258. void handle_sig P_((int sig));
  259. long ARGS_ON_STACK p_sigreturn P_((void));
  260. void stop P_((int sig));
  261. void exception P_((int sig));
  262. void sigbus P_((void));
  263. void sigaddr P_((void));
  264. void sigill P_((void));
  265. void sigpriv P_((void));
  266. void sigfpe P_((void));
  267. void sigtrap P_((void));
  268. void haltformat P_((void));
  269. void haltcpv P_((void));
  270.  
  271. /* timeout.c */
  272. TIMEOUT *addtimeout P_((long delta, void (*func)(PROC *p)));
  273. void cancelalltimeouts P_((void));
  274. void canceltimeout P_((TIMEOUT *which));
  275. void ARGS_ON_STACK timeout P_((void));
  276. void checkalarms P_((void));
  277. void ARGS_ON_STACK nap P_((unsigned n));
  278.  
  279. /* tty.c */
  280. long tty_read P_((FILEPTR *f, void *buf, long nbytes));
  281. long tty_write P_((FILEPTR *f, const void *buf, long nbytes));
  282. long tty_ioctl P_((FILEPTR *f, int mode, void *arg));
  283. long tty_getchar P_((FILEPTR *f, int mode));
  284. long tty_putchar P_((FILEPTR *f, long data, int mode));
  285.  
  286. /* util.c */
  287. MEMREGION *addr2mem P_((virtaddr a));
  288. PROC *pid2proc P_((int pid));
  289. int newpid P_((void));
  290. void zero P_((char *place, long size));
  291. void * ARGS_ON_STACK kmalloc P_((long size));
  292. void *kcore P_((long size));
  293. void ARGS_ON_STACK kfree P_((void *place));
  294. void * ARGS_ON_STACK umalloc P_((long size));
  295. void ARGS_ON_STACK ufree P_((void *block));
  296. void ARGS_ON_STACK ms_time P_((ulong ms, short *timeptr));
  297. long ARGS_ON_STACK unixtim P_((unsigned time, unsigned date));
  298. long ARGS_ON_STACK dostim P_((long t));
  299. int ARGS_ON_STACK strnicmp P_((const char *str1, const char *str2, int len));
  300. int ARGS_ON_STACK stricmp P_((const char *str1, const char *str2));
  301. char * ARGS_ON_STACK strlwr P_((char *s));
  302. char * ARGS_ON_STACK strupr P_((char *s));
  303.  
  304. #ifdef OWN_LIB
  305. int strncmp P_((const char *str1, const char *str2, int len));
  306. int strcmp P_((const char *str1, const char *str2));
  307. char *strcat P_((char *, const char *));
  308. char *strcpy P_((char *, const char *));
  309. char *strncpy P_((char *, const char *, int));
  310. int strlen P_((const char *));
  311. char *strrchr P_((const char *, int));
  312. int toupper P_((int));
  313. int tolower P_((int));
  314. long atol P_((const char *));
  315. #endif /* OWN_LIB */
  316.  
  317. /* biosfs.c */
  318. void biosfs_init P_((void));
  319. void ARGS_ON_STACK mouse_handler P_((const char *buf));
  320. long ARGS_ON_STACK nocreat P_((fcookie *dir, const char *name, unsigned mode, int attrib,
  321.          fcookie *fc));
  322. long ARGS_ON_STACK nomkdir    P_((fcookie *dir, const char *name, unsigned mode));
  323. long ARGS_ON_STACK nowritelabel P_((fcookie *dir, const char *name));
  324. long ARGS_ON_STACK noreadlabel P_((fcookie *dir, char *name, int namelen));
  325. long ARGS_ON_STACK nosymlink P_((fcookie *dir, const char *name, const char *to));
  326. long ARGS_ON_STACK noreadlink P_((fcookie *dir, char *buf, int buflen));
  327. long ARGS_ON_STACK nohardlink P_((fcookie *, const char *, fcookie *, const char *));
  328. long ARGS_ON_STACK nofscntl P_((fcookie *dir, const char *name, int cmd, long arg));
  329. long ARGS_ON_STACK nodskchng P_((int drv));
  330. int set_auxhandle P_((PROC *, int));
  331.  
  332. /* pipefs.c */
  333.  
  334. /* procfs.c */
  335.  
  336. /* tosfs.c */
  337.  
  338. /* unifs.c */
  339. void unifs_init P_((void));
  340.  
  341. /* debug.c */
  342. int ARGS_ON_STACK ksprintf P_((char *, const char *, ...));
  343. void debug_ws P_((const char *s));
  344. int _ALERT P_((char *));
  345. void ARGS_ON_STACK Tracelow P_((const char *s, ...));
  346. void ARGS_ON_STACK Trace P_((const char *s, ...));
  347. void ARGS_ON_STACK Debug P_((const char *s, ...));
  348. void ARGS_ON_STACK ALERT P_((const char *s, ...));
  349. void ARGS_ON_STACK FORCE P_((const char *s, ...));
  350. void PAUSE P_((void));
  351. EXITING void ARGS_ON_STACK FATAL P_((const char *s, ...));
  352. EXITING void HALT P_((void));
  353. void DUMPLOG P_((void));
  354. void do_func_key P_((int));
  355.  
  356. /* rendez.c */
  357. long ARGS_ON_STACK p_msg P_((int mode, long ARGS_ON_STACK mbid, char *ptr));
  358. long ARGS_ON_STACK p_semaphore P_((int mode, long ARGS_ON_STACK id, long timeout));
  359. void free_semaphores P_((int pid));
  360.  
  361. /* memprot.c */
  362. void init_tables P_((void));
  363. int get_prot_mode P_((MEMREGION *));
  364. void mark_region P_((MEMREGION *region, int mode));
  365. int prot_temp P_((ulong loc, ulong len, int mode));
  366. void init_page_table P_((PROC *proc));
  367. void mem_prot_special P_((PROC *proc));
  368. void QUICKDUMP P_((void));
  369. void report_buserr P_((void));
  370. void BIG_MEM_DUMP P_((int bigone, PROC *proc));
  371. int mem_access_for P_((PROC *p, ulong where, long len));
  372.  
  373. /* nalloc2.c */
  374. void nalloc_arena_add P_((void *start, long len));
  375. void *nalloc P_((long size));
  376. void nfree P_((void *start));
  377. void NALLOC_DUMP P_((void));
  378.  
  379. /* realloc.c */
  380. long realloc_region P_((MEMREGION *, long));
  381. long ARGS_ON_STACK s_realloc P_((long));
  382.  
  383. /* welcome.c */
  384. int boot_kernel_p P_((void));
  385.