source: trunk/essentials/app-shells/bash/examples/loadables/mkdir.c@ 3280

Last change on this file since 3280 was 3231, checked in by bird, 19 years ago

eol style.

  • Property svn:eol-style set to native
File size: 5.0 KB
Line 
1/* mkdir - make directories */
2
3/* See Makefile for compilation details. */
4
5#include <config.h>
6
7#include "bashtypes.h"
8#include "posixstat.h"
9#include <errno.h>
10#include <stdio.h>
11#include "bashansi.h"
12#if defined (HAVE_UNISTD_H)
13# include <unistd.h>
14#endif
15
16#include "builtins.h"
17#include "shell.h"
18#include "bashgetopt.h"
19
20#if !defined (errno)
21extern int errno;
22#endif
23
24#define ISOCTAL(c) ((c) >= '0' && (c) <= '7')
25
26extern int parse_symbolic_mode ();
27
28static int make_path ();
29
30static int original_umask;
31
32int
33mkdir_builtin (list)
34 WORD_LIST *list;
35{
36 int opt, pflag, omode, rval, octal, nmode, parent_mode, um;
37 char *mode;
38 WORD_LIST *l;
39
40 reset_internal_getopt ();
41 pflag = 0;
42 mode = (char *)NULL;