1: /*
2: * Copyright (c) 1983 Regents of the University of California.
3: * All rights reserved. The Berkeley software License Agreement
4: * specifies the terms and conditions for redistribution.
5: */
6:
7: #if defined(LIBC_SCCS) && !defined(lint)
8: static char sccsid[] = "@(#)opendir.c 5.2 (Berkeley) 3/9/86";
9: #endif LIBC_SCCS and not lint
10:
11: #include <sys/param.h>
12: #include <sys/dir.h>
13:
14: /*
15: * open a directory.
16: */
17: DIR *
18: opendir(name)
19: char *name;
20: {
21: register DIR *dirp;
22: register int fd;
23: char *malloc();
24:
25: if ((fd = open(name, 0)) == -1)
26: return NULL;
27: if ((dirp = (DIR *)malloc(sizeof(DIR))) == NULL) {
28: close (fd);
29: return NULL;
30: }
31: dirp->dd_fd = fd;
32: dirp->dd_loc = 0;
33: return dirp;
34: }
Defined functions
opendir
defined in line
17; used 78 times
- in /usr/ingres/source/support/destroydb.c line
152
- in /usr/ingres/source/support/purge.c line
176
- in /usr/ingres/source/support/restore.c line
196
- in /usr/ingres/source/support/subs.c line
117
- in /usr/src/bin/chflags/chflags.c line
121
- in /usr/src/bin/chgrp.c line
144
- in /usr/src/bin/chmod.c line
114
- in /usr/src/bin/cp.c line
186
- in /usr/src/bin/csh/sh.exec.c line
275
- in /usr/src/bin/csh/sh.file.c line
379
- in /usr/src/bin/csh/sh.glob.c line
184
- in /usr/src/bin/diff/diffdir.c line
179
- in /usr/src/bin/du.c line
122,
143
- in /usr/src/bin/ls/ls.c line
265
- in /usr/src/bin/make/files.c line
276
- in /usr/src/bin/ps.c line
308
- in /usr/src/bin/rcp.c line
506
- in /usr/src/bin/rm.c line
121,
143
- in /usr/src/bin/sh/expand.c line
72
- in /usr/src/bin/tar.c line
511,
530
- in /usr/src/bin/tcsh/glob.c line
164-166(2)
- in /usr/src/bin/tcsh/sh.exec.c line
465
- in /usr/src/bin/tcsh/sh.file.c line
505
- in /usr/src/bin/tcsh/tc.os.c line
784
- in /usr/src/bin/tcsh/tw.parse.c line
670,
775-780(2),
1468,
1489
- in /usr/src/bin/tp/tp2.c line
259
- in /usr/src/lib/libc/gen/getwd.c line
60
- in /usr/src/lib/libc/gen/scandir.c line
34
- in /usr/src/lib/libc/gen/ttyname.c line
35
- in /usr/src/libexec/ftpd/ftpd.c line
1352
- in /usr/src/new/crash/crashsubs.c line
456
- in /usr/src/new/kermit5.188/ckufio.c line
2509,
2515,
2555
- in /usr/src/new/nntp/server/scandir.c line
34
- in /usr/src/ucb/ex/expreserve.c line
116
- in /usr/src/ucb/ex/exrecover.c line
227,
439
- in /usr/src/ucb/ftp/glob.c line
202
- in /usr/src/ucb/msgs/msgs.c line
227
- in /usr/src/ucb/rdist/docmd.c line
417
- in /usr/src/ucb/rdist/expand.c line
263
- in /usr/src/ucb/rdist/server.c line
315,
1166,
1247
- in /usr/src/ucb/ruptime.c line
88
- in /usr/src/ucb/rwho.c line
68
- in /usr/src/ucb/sccs.c line
979
- in /usr/src/ucb/sendbug/bugfiler.c line
520-522(2)
- in /usr/src/ucb/whereis.c line
275
- in /usr/src/usr.bin/find/find.c line
649
- in /usr/src/usr.bin/learn/selsub.c line
151
- in /usr/src/usr.bin/learn/start.c line
22
- in /usr/src/usr.bin/uucp/anlwrk.c line
122
- in /usr/src/usr.bin/uucp/gnsys.c line
46
- in /usr/src/usr.bin/uucp/uuclean.c line
86
- in /usr/src/usr.bin/uucp/uuq.c line
196
- in /usr/src/usr.bin/uucp/uusnap.c line
140,
207,
242
- in /usr/src/usr.sbin/catman/catman.c line
124
- in /usr/src/usr.sbin/chown/chown.c line
137
- in /usr/src/usr.sbin/cron/database.c line
98
- in /usr/src/usr.sbin/dev_mkdb/dev_mkdb.c line
91
- in /usr/src/usr.sbin/lpr/cmds.c line
661
- in /usr/src/usr.sbin/lpr/common.c line
163
- in /usr/src/usr.sbin/lpr/recvjob.c line
83
- in /usr/src/usr.sbin/sendmail.MX/src/queue.c line
408
- in /usr/src/usr.sbin/sendmail/src/queue.c line
395
Defined variables
sccsid
defined in line
8;
never used