mkdir.c (90266) | mkdir.c (91084) |
---|---|
1/* 2 * Copyright (c) 1983, 1992, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 28 unchanged lines hidden (view full) --- 37 The Regents of the University of California. All rights reserved.\n"; 38#endif /* not lint */ 39 40#ifndef lint 41#if 0 42static char sccsid[] = "@(#)mkdir.c 8.2 (Berkeley) 1/25/94"; 43#endif 44static const char rcsid[] = | 1/* 2 * Copyright (c) 1983, 1992, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 28 unchanged lines hidden (view full) --- 37 The Regents of the University of California. All rights reserved.\n"; 38#endif /* not lint */ 39 40#ifndef lint 41#if 0 42static char sccsid[] = "@(#)mkdir.c 8.2 (Berkeley) 1/25/94"; 43#endif 44static const char rcsid[] = |
45 "$FreeBSD: head/bin/mkdir/mkdir.c 90266 2002-02-05 21:55:12Z zarzycki $"; | 45 "$FreeBSD: head/bin/mkdir/mkdir.c 91084 2002-02-22 21:11:03Z markm $"; |
46#endif /* not lint */ 47 48#include <sys/types.h> 49#include <sys/stat.h> 50 51#include <err.h> 52#include <errno.h> 53#include <libgen.h> 54#include <stdio.h> 55#include <stdlib.h> 56#include <string.h> 57#include <sysexits.h> 58#include <unistd.h> 59 | 46#endif /* not lint */ 47 48#include <sys/types.h> 49#include <sys/stat.h> 50 51#include <err.h> 52#include <errno.h> 53#include <libgen.h> 54#include <stdio.h> 55#include <stdlib.h> 56#include <string.h> 57#include <sysexits.h> 58#include <unistd.h> 59 |
60int build(char *, mode_t); 61void usage(void); | 60static int build(char *, mode_t); 61static void usage(void); |
62 63int vflag; 64 65int 66main(int argc, char *argv[]) 67{ | 62 63int vflag; 64 65int 66main(int argc, char *argv[]) 67{ |
68 int ch, exitval, success, omode, pflag; 69 mode_t *set = (mode_t *)NULL; | 68 int ch, exitval, success, pflag; 69 mode_t omode, *set = (mode_t *)NULL; |
70 char *mode; 71 72 omode = pflag = 0; 73 mode = NULL; 74 while ((ch = getopt(argc, argv, "m:pv")) != -1) 75 switch(ch) { 76 case 'm': 77 mode = optarg; --- 135 unchanged lines hidden --- | 70 char *mode; 71 72 omode = pflag = 0; 73 mode = NULL; 74 while ((ch = getopt(argc, argv, "m:pv")) != -1) 75 switch(ch) { 76 case 'm': 77 mode = optarg; --- 135 unchanged lines hidden --- |