annotate lib/lib.h @ 4:732b055e17f7

Add xmsprintf(), xgetcwd(), xgetcwd(), find_in_path().
author landley@driftwood
date Wed, 25 Oct 2006 18:38:37 -0400
parents 266a462ed18c
children fc9c0503d5e2
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2
67b517913e56 Infrastructure, first drop of toy shell, and a bit of work on df.
landley@driftwood
parents:
diff changeset
1 /* vi: set ts=4 :*/
67b517913e56 Infrastructure, first drop of toy shell, and a bit of work on df.
landley@driftwood
parents:
diff changeset
2
3
266a462ed18c Next drop of toysh, plus more infratructure.
landley@driftwood
parents: 2
diff changeset
3 // functions.c
2
67b517913e56 Infrastructure, first drop of toy shell, and a bit of work on df.
landley@driftwood
parents:
diff changeset
4 void error_exit(char *msg, ...);
67b517913e56 Infrastructure, first drop of toy shell, and a bit of work on df.
landley@driftwood
parents:
diff changeset
5 void strlcpy(char *dest, char *src, size_t size);
67b517913e56 Infrastructure, first drop of toy shell, and a bit of work on df.
landley@driftwood
parents:
diff changeset
6 void *xmalloc(size_t size);
3
266a462ed18c Next drop of toysh, plus more infratructure.
landley@driftwood
parents: 2
diff changeset
7 void *xzalloc(size_t size);
266a462ed18c Next drop of toysh, plus more infratructure.
landley@driftwood
parents: 2
diff changeset
8 void xrealloc(void **ptr, size_t size);
2
67b517913e56 Infrastructure, first drop of toy shell, and a bit of work on df.
landley@driftwood
parents:
diff changeset
9 void *xstrndup(char *s, size_t n);
4
732b055e17f7 Add xmsprintf(), xgetcwd(), xgetcwd(), find_in_path().
landley@driftwood
parents: 3
diff changeset
10 char *xmsprintf(char *format, ...);
2
67b517913e56 Infrastructure, first drop of toy shell, and a bit of work on df.
landley@driftwood
parents:
diff changeset
11 void *xexec(char **argv);
67b517913e56 Infrastructure, first drop of toy shell, and a bit of work on df.
landley@driftwood
parents:
diff changeset
12 int xopen(char *path, int flags, int mode);
67b517913e56 Infrastructure, first drop of toy shell, and a bit of work on df.
landley@driftwood
parents:
diff changeset
13 FILE *xfopen(char *path, char *mode);
4
732b055e17f7 Add xmsprintf(), xgetcwd(), xgetcwd(), find_in_path().
landley@driftwood
parents: 3
diff changeset
14 char *xgetcwd(void);
732b055e17f7 Add xmsprintf(), xgetcwd(), xgetcwd(), find_in_path().
landley@driftwood
parents: 3
diff changeset
15 char *find_in_path(char *path, char *filename);
2
67b517913e56 Infrastructure, first drop of toy shell, and a bit of work on df.
landley@driftwood
parents:
diff changeset
16
3
266a462ed18c Next drop of toysh, plus more infratructure.
landley@driftwood
parents: 2
diff changeset
17 // llist.c
266a462ed18c Next drop of toysh, plus more infratructure.
landley@driftwood
parents: 2
diff changeset
18 void llist_free(void *list, void (*freeit)(void *data));
266a462ed18c Next drop of toysh, plus more infratructure.
landley@driftwood
parents: 2
diff changeset
19
266a462ed18c Next drop of toysh, plus more infratructure.
landley@driftwood
parents: 2
diff changeset
20 // getmountlist.c
2
67b517913e56 Infrastructure, first drop of toy shell, and a bit of work on df.
landley@driftwood
parents:
diff changeset
21 struct mtab_list {
67b517913e56 Infrastructure, first drop of toy shell, and a bit of work on df.
landley@driftwood
parents:
diff changeset
22 struct mtab_list *next;
67b517913e56 Infrastructure, first drop of toy shell, and a bit of work on df.
landley@driftwood
parents:
diff changeset
23 char *dir;
67b517913e56 Infrastructure, first drop of toy shell, and a bit of work on df.
landley@driftwood
parents:
diff changeset
24 char *device;
67b517913e56 Infrastructure, first drop of toy shell, and a bit of work on df.
landley@driftwood
parents:
diff changeset
25 char type[0];
67b517913e56 Infrastructure, first drop of toy shell, and a bit of work on df.
landley@driftwood
parents:
diff changeset
26 };
67b517913e56 Infrastructure, first drop of toy shell, and a bit of work on df.
landley@driftwood
parents:
diff changeset
27
67b517913e56 Infrastructure, first drop of toy shell, and a bit of work on df.
landley@driftwood
parents:
diff changeset
28 struct mtab_list *getmountlist(int die);
67b517913e56 Infrastructure, first drop of toy shell, and a bit of work on df.
landley@driftwood
parents:
diff changeset
29