|
|
1.1 ! root 1: /* ! 2: * functions (possibly) linked in, complete, from libc. ! 3: */ ! 4: ! 5: /* ! 6: * mem routines ! 7: */ ! 8: extern void* memccpy(void*, void*, int, long); ! 9: extern void* memset(void*, int, long); ! 10: extern int memcmp(void*, void*, long); ! 11: extern void* memmove(void*, void*, long); ! 12: extern void* memchr(void*, int, long); ! 13: ! 14: /* ! 15: * string routines ! 16: */ ! 17: extern char* strcat(char*, char*); ! 18: extern char* strchr(char*, char); ! 19: extern int strcmp(char*, char*); ! 20: extern char* strcpy(char*, char*); ! 21: extern char* strncat(char*, char*, long); ! 22: extern char* strncpy(char*, char*, long); ! 23: extern int strncmp(char*, char*, long); ! 24: extern long strlen(char*); ! 25: extern char* strrchr(char*, char); ! 26: ! 27: /* ! 28: * print routines ! 29: * Fconv isn't used but is defined to satisfy prototypes in libg.h ! 30: * that are never called. ! 31: */ ! 32: typedef struct Fconv Fconv; ! 33: ! 34: extern char* donprint(char*, char*, char*, void*); ! 35: extern int sprint(char*, char*, ...); ! 36: extern int print(char*, ...); ! 37: ! 38: #define PRINTSIZE 256 ! 39: ! 40: /* ! 41: * one-of-a-kind ! 42: */ ! 43: extern int atoi(char*); ! 44: extern long strtol(char*, char**, int); ! 45: extern ulong strtoul(char*, char**, int); ! 46: extern long end; ! 47: ! 48: /* ! 49: * Syscall data structures ! 50: */ ! 51: ! 52: #define MORDER 0x0003 /* mask for bits defining order of mounting */ ! 53: #define MREPL 0x0000 /* mount replaces object */ ! 54: #define MBEFORE 0x0001 /* mount goes before others in union directory */ ! 55: #define MAFTER 0x0002 /* mount goes after others in union directory */ ! 56: #define MCREATE 0x0004 /* permit creation in mounted directory */ ! 57: #define MMASK 0x0007 /* all bits on */ ! 58: ! 59: #define OREAD 0 /* open for read */ ! 60: #define OWRITE 1 /* write */ ! 61: #define ORDWR 2 /* read and write */ ! 62: #define OEXEC 3 /* execute, == read but check execute permission */ ! 63: #define OTRUNC 16 /* or'ed in (except for exec), truncate file first */ ! 64: #define OCEXEC 32 /* or'ed in, close on exec */ ! 65: #define ORCLOSE 64 /* or'ed in, remove on close */ ! 66: ! 67: #define NCONT 0 /* continue after note */ ! 68: #define NDFLT 1 /* terminate after note */ ! 69: ! 70: typedef struct Qid Qid; ! 71: typedef struct Dir Dir; ! 72: typedef struct Waitmsg Waitmsg; ! 73: ! 74: #define ERRLEN 64 ! 75: #define DIRLEN 116 ! 76: #define NAMELEN 28 ! 77: ! 78: struct Qid ! 79: { ! 80: ulong path; ! 81: ulong vers; ! 82: }; ! 83: ! 84: struct Dir ! 85: { ! 86: char name[NAMELEN]; ! 87: char uid[NAMELEN]; ! 88: char gid[NAMELEN]; ! 89: Qid qid; ! 90: ulong mode; ! 91: long atime; ! 92: long mtime; ! 93: Length; ! 94: short type; ! 95: short dev; ! 96: }; ! 97: ! 98: struct Waitmsg ! 99: { ! 100: int pid; /* of loved one */ ! 101: int status; /* unused; a placeholder */ ! 102: ulong time[3]; /* of loved one */ ! 103: char msg[ERRLEN]; ! 104: };
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.