inline strcmp(s, "-") [actually macro-ize it for now - gcc is too stupid]
authorDenis Vlasenko <vda.linux@googlemail.com>
Sat, 16 Dec 2006 23:49:13 +0000 (23:49 -0000)
committerDenis Vlasenko <vda.linux@googlemail.com>
Sat, 16 Dec 2006 23:49:13 +0000 (23:49 -0000)
28 files changed:
archival/bunzip2.c
archival/gunzip.c
archival/gzip.c
archival/tar.c
archival/uncompress.c
archival/unlzma.c
archival/unzip.c
coreutils/cut.c
coreutils/diff.c
coreutils/env.c
coreutils/md5_sha1_sum.c
coreutils/sort.c
coreutils/sum.c
coreutils/tail.c
coreutils/uudecode.c
e2fsprogs/fsck.c
editors/sed.c
include/libbb.h
libbb/wfopen_input.c
loginutils/getty.c
loginutils/su.c
miscutils/crontab.c
networking/ftpgetput.c
networking/libiproute/ipaddress.c
networking/tftp.c
networking/wget.c
shell/ash.c
shell/msh.c

index 757001fe463586ec5b8411d9761836b897c5bc98..a6cd17611ae058d1d93896066df48bcc82965ed9 100644 (file)
@@ -23,7 +23,7 @@ int bunzip2_main(int argc, char **argv)
 
        /* Set input filename and number */
        filename = argv[optind];
-       if ((filename) && (filename[0] != '-') && (filename[1] != '\0')) {
+       if (filename && NOT_LONE_DASH(filename)) {
                /* Open input file */
                src_fd = xopen(filename, O_RDONLY);
        } else {
index e24401c71ba654038249cee2932ee025d01aea8a..c5deec3cef4360f37f02d203cac412f719e0e5cc 100644 (file)
@@ -58,7 +58,7 @@ int gunzip_main(int argc, char **argv)
 
                optind++;
 
-               if (old_path == NULL || strcmp(old_path, "-") == 0) {
+               if (old_path == NULL || LONE_DASH(old_path)) {
                        src_fd = STDIN_FILENO;
                        opt |= GUNZIP_OPT_STDOUT;
                        USE_DESKTOP(opt &= ~GUNZIP_OPT_VERBOSE;)
index c9b67538e634fc13af276bb5b3201626823e22d0..7124e9bd461d39037a9e1ade8da9540cd7d9a46a 100644 (file)
@@ -1201,7 +1201,7 @@ int gzip_main(int argc, char **argv)
                        char *path = NULL;
 
                        clear_bufs();
-                       if (strcmp(argv[i], "-") == 0) {
+                       if (LONE_DASH(argv[i])) {
                                time_stamp = 0;
                                inFileNum = STDIN_FILENO;
                                outFileNum = STDOUT_FILENO;
index 79c3595ac2088ac6b715781d1e494d1106869465..ba7cb0f8ccaff1b2f65cdfbec450da47f0ff5b8b 100644 (file)
@@ -851,7 +851,7 @@ int tar_main(int argc, char **argv)
                        flags = O_RDONLY;
                }
 
-               if (tar_filename[0] == '-' && !tar_filename[1]) {
+               if (LONE_DASH(tar_filename)) {
                        tar_handle->src_fd = fileno(tar_stream);
                        tar_handle->seek = seek_by_read;
                } else {
index 3c78961d579b7a9094c35f241b4e4e8757593649..4611790168dc9de568f5361b2d26928f9f7dcb84 100644 (file)
@@ -25,7 +25,7 @@ int uncompress_main(int argc, char **argv)
                int src_fd;
                int dst_fd;
 
-               if (strcmp(compressed_file, "-") == 0) {
+               if (LONE_DASH(compressed_file)) {
                        src_fd = STDIN_FILENO;
                        flags |= GUNZIP_TO_STDOUT;
                } else {
index 46fbefdc0884748ef28747b6dde821fb6389938f..20c4ff2a74c29d8e754cfd5f5e4f38853064cbc6 100644 (file)
@@ -26,7 +26,7 @@ int unlzma_main(int argc, char **argv)
 
        /* Set input filename and number */
        filename = argv[optind];
-       if (filename && (filename[0] != '-') && (filename[1] != '\0')) {
+       if (filename && NOT_LONE_DASH(filename)) {
                /* Open input file */
                src_fd = xopen(filename, O_RDONLY);
        } else {
index 8b1c281c4e0c16582fa6067a280f32dc973d3dc1..f553eefa2127beb990224c277af7b68f5a11886a 100644 (file)
@@ -187,11 +187,10 @@ int unzip_main(int argc, char **argv)
        }
 
        /* Open input file */
-       if (strcmp("-", src_fn) == 0) {
+       if (LONE_DASH(src_fn)) {
                src_fd = STDIN_FILENO;
                /* Cannot use prompt mode since zip data is arriving on STDIN */
                overwrite = (overwrite == o_prompt) ? o_never : overwrite;
-
        } else {
                static const char *const extn[] = {"", ".zip", ".ZIP"};
                int orig_src_fn_len = strlen(src_fn);
index a538e3d206c2d5bfa251f1ee29e2d54a58afac3f..a72b2c29afa3368bd1524499b252226cd8846902 100644 (file)
@@ -168,6 +168,8 @@ int cut_main(int argc, char **argv)
 
        opt_complementary = "b--bcf:c--bcf:f--bcf";
        getopt32(argc, argv, optstring, &sopt, &sopt, &sopt, &ltok);
+//     argc -= optind;
+       argv += optind;
        if (!(option_mask32 & (CUT_OPT_BYTE_FLGS | CUT_OPT_CHAR_FLGS | CUT_OPT_FIELDS_FLGS)))
                bb_error_msg_and_die("expected a list of bytes, characters, or fields");
        if (option_mask32 & BB_GETOPT_ERROR)
@@ -262,22 +264,21 @@ int cut_main(int argc, char **argv)
                qsort(cut_lists, nlists, sizeof(struct cut_list), cmpfunc);
        }
 
-       /* argv[(optind)..(argc-1)] should be names of file to process. If no
+       /* argv[0..argc-1] should be names of file to process. If no
         * files were specified or '-' was specified, take input from stdin.
         * Otherwise, we process all the files specified. */
-       if (argv[optind] == NULL
-               || (argv[optind][0] == '-' && argv[optind][1] == '\0')) {
+       if (argv[0] == NULL || LONE_DASH(argv[0])) {
                cut_file(stdin);
        } else {
                FILE *file;
 
-               for (; optind < argc; optind++) {
-                       file = fopen_or_warn(argv[optind], "r");
+               do {
+                       file = fopen_or_warn(argv[0], "r");
                        if (file) {
                                cut_file(file);
                                fclose(file);
                        }
-               }
+               } while (*++argv);
        }
        if (ENABLE_FEATURE_CLEAN_UP)
                free(cut_lists);
index 0df9989b74e9e36781a1996fd91fd4756d99ee4b..887679a0a57f0d13e5c01f14df1c2cd26afe92e6 100644 (file)
@@ -904,19 +904,19 @@ static int diffreg(char *ofile1, char *ofile2, int flags)
 
        if (S_ISDIR(stb1.st_mode) != S_ISDIR(stb2.st_mode))
                return (S_ISDIR(stb1.st_mode) ? D_MISMATCH1 : D_MISMATCH2);
-       if (strcmp(file1, "-") == 0 && strcmp(file2, "-") == 0)
+       if (LONE_DASH(file1) && LONE_DASH(file2))
                goto closem;
 
        f1 = stdin;
        if (flags & D_EMPTY1)
                f1 = xfopen(bb_dev_null, "r");
-       else if (file1[0] != '-' || file1[1]) /* not "-" */
+       else if (NOT_LONE_DASH(file1))
                f1 = xfopen(file1, "r");
 
        f2 = stdin;
        if (flags & D_EMPTY2)
                f2 = xfopen(bb_dev_null, "r");
-       else if (file2[0] != '-' || file2[1]) /* not "-" */
+       else if (NOT_LONE_DASH(file2))
                f2 = xfopen(file2, "r");
 
        i = files_differ(f1, f2, flags);
@@ -1212,12 +1212,12 @@ int diff_main(int argc, char **argv)
                bb_error_msg("missing filename");
                bb_show_usage();
        }
-       if (argv[0][0] == '-' && !argv[0][1]) { /* "-" */
+       if (LONE_DASH(argv[0])) {
                fstat(STDIN_FILENO, &stb1);
                gotstdin = 1;
        } else
                xstat(argv[0], &stb1);
-       if (argv[1][0] == '-' && !argv[1][1]) { /* "-" */
+       if (LONE_DASH(argv[1])) {
                fstat(STDIN_FILENO, &stb2);
                gotstdin = 1;
        } else
index 2ce99b0ad805e583621f40f8752201edcb62cfe7..e4cad271be5749ba9df83b1b37c645d3d582d4f6 100644 (file)
@@ -58,7 +58,7 @@ int env_main(int argc, char** argv)
        opt = getopt32(argc, argv, "+iu:", &unset_env);
 
        argv += optind;
-       if (*argv && (argv[0][0] == '-') && !argv[0][1]) {
+       if (*argv && LONE_DASH(argv[0])) {
                opt |= 1;
                ++argv;
        }
index e8d3a15099e6123c79009d0e131d7e9b9e7a0512..6fe1b028623c7313950918c4e5772cc6fa6c128e 100644 (file)
@@ -39,7 +39,7 @@ static uint8_t *hash_file(const char *filename, hash_algo_t hash_algo)
        void (*final)(void*, void*);
 
        src_fd = STDIN_FILENO;
-       if (filename[0] != '-' || filename[1]) { /* not "-" */
+       if (NOT_LONE_DASH(filename)) {
                src_fd = open(filename, O_RDONLY);
                if (src_fd < 0) {
                        bb_perror_msg("%s", filename);
@@ -120,7 +120,7 @@ int md5_sha1_sum_main(int argc, char **argv)
                }
 
                pre_computed_stream = stdin;
-               if (file_ptr[0] != '-' || file_ptr[1]) { /* not "-" */
+               if (NOT_LONE_DASH(file_ptr)) {
                        pre_computed_stream = xfopen(file_ptr, "r");
                }
 
index c23bf9c605dc296adcb784863cadf349b86bf1df..c37810f1a36fed4767edf947f6168637a1cba360 100644 (file)
@@ -310,7 +310,7 @@ int sort_main(int argc, char **argv)
        /* Open input files and read data */
        for (i = argv[optind] ? optind : optind-1; argv[i]; i++) {
                fp = stdin;
-               if (i >= optind && (argv[i][0] != '-' || argv[i][1]))
+               if (i >= optind && NOT_LONE_DASH(argv[i]))
                        fp = xfopen(argv[i], "r");
                for (;;) {
                        line = GET_LINE(fp);
index 93f4e22eb2d4cd1c951c3120685b369eca30fd42..68a85781625950677eafb26e9891cb140a8c3c60 100644 (file)
@@ -18,9 +18,6 @@
 /* 1 if any of the files read were the standard input */
 static int have_read_stdin;
 
-/* make a little more readable and avoid using strcmp for just 2 bytes */
-#define IS_STDIN(s) (s[0] == '-' && s[1] == '\0')
-
 /* Calculate and print the rotated checksum and the size in 1K blocks
    of file FILE, or of the standard input if FILE is "-".
    If PRINT_NAME is >1, print FILE next to the checksum and size.
@@ -34,7 +31,7 @@ static int bsd_sum_file(const char *file, int print_name)
        int ch;                    /* Each character read. */
        int ret = 0;
 
-       if (IS_STDIN(file)) {
+       if (LONE_DASH(file)) {
                fp = stdin;
                have_read_stdin++;
        } else {
@@ -84,7 +81,7 @@ static int sysv_sum_file(const char *file, int print_name)
        /* The sum of all the input bytes, modulo (UINT_MAX + 1).  */
        unsigned int s = 0;
 
-       if (IS_STDIN(file)) {
+       if (LONE_DASH(file)) {
                fd = 0;
                have_read_stdin = 1;
        } else {
@@ -103,7 +100,7 @@ static int sysv_sum_file(const char *file, int print_name)
 release_and_ret:
                        bb_perror_msg(file);
                        RELEASE_CONFIG_BUFFER(buf);
-                       if (!IS_STDIN(file))
+                       if (NOT_LONE_DASH(file))
                                close(fd);
                        return 0;
                }
@@ -113,7 +110,7 @@ release_and_ret:
                        s += buf[bytes_read];
        }
 
-       if (!IS_STDIN(file) && close(fd) == -1)
+       if (NOT_LONE_DASH(file) && close(fd) == -1)
                goto release_and_ret;
        else
                RELEASE_CONFIG_BUFFER(buf);
index ed5ea14671d80cf9d5b0cceed2c1636c5028db0f..4c3c3b901f5007994db2322160f00afbd501dc31 100644 (file)
@@ -176,8 +176,8 @@ int tail_main(int argc, char **argv)
        }
 
        do {
-               if ((argv[i][0] == '-') && !argv[i][1]) {
              DO_STDIN:
+               if (LONE_DASH(argv[i])) {
+ DO_STDIN:
                        fds[nfiles] = STDIN_FILENO;
                } else if ((fds[nfiles] = open(argv[i], O_RDONLY)) < 0) {
                        bb_perror_msg("%s", argv[i]);
index 8b7de74ffac4010139c791fa6b61a0ba9428fbb0..06512119eea4de9c08660baa8a20669ed19f3c3e 100644 (file)
@@ -166,7 +166,7 @@ int uudecode_main(int argc, char **argv)
                        }
                        outname++;
                }
-               if (strcmp(outname, "-") == 0) {
+               if (LONE_DASH(outname)) {
                        dst_stream = stdout;
                } else {
                        dst_stream = xfopen(outname, "w");
index f0c1316a9a503d601d932286a2c0b1aa1b3609a9..3b01c1021ba207cccdfbac60942cba6dfa1a3612 100644 (file)
@@ -1249,8 +1249,8 @@ static void PRS(int argc, char *argv[])
                                                progress_fd = 0;
                                        else
                                                goto next_arg;
-                               } else if ((i+1) < argc &&
-                                          !strncmp(argv[i+1], "-", 1) == 0) {
+                               } else if ((i+1) < argc
+                                && argv[i+1][0] != '-') {
                                        progress_fd = string_to_int(argv[i]);
                                        if (progress_fd < 0)
                                                progress_fd = 0;
index ac3d8d4635beb2a3433a987e3158810fff770c0f..8d372abe4cd178a98736a55408f1f05d7f72ec32 100644 (file)
@@ -1235,9 +1235,7 @@ int sed_main(int argc, char **argv)
                        struct stat statbuf;
                        int nonstdoutfd;
 
-                       if (argv[i][0] == '-' && !argv[i][1]
-                        && !(opt & OPT_in_place)
-                       ) {
+                       if (LONE_DASH(argv[i]) && !(opt & OPT_in_place)) {
                                add_input_file(stdin);
                                process_files();
                                continue;
index 1d91a0a72742f52409bc37c1355f1ac47701a760..fcd0dfa31a9e48463c4d53932f96d34be1b7a928 100644 (file)
@@ -255,6 +255,14 @@ extern char *xstrdup(const char *s);
 extern char *xstrndup(const char *s, int n);
 extern char *safe_strncpy(char *dst, const char *src, size_t size);
 extern char *xasprintf(const char *format, ...) __attribute__ ((format (printf, 1, 2)));
+// gcc-4.1.1 still isn't good enough at optimizing it
+// (+200 bytes compared to macro)
+//static ATTRIBUTE_ALWAYS_INLINE
+//int LONE_DASH(const char *s) { return s[0] == '-' && !s[1]; }
+//static ATTRIBUTE_ALWAYS_INLINE
+//int NOT_LONE_DASH(const char *s) { return s[0] != '-' || s[1]; }
+#define LONE_DASH(s) ((s)[0] == '-' && !(s)[1])
+#define NOT_LONE_DASH(s) ((s)[0] != '-' || (s)[1])
 
 /* dmalloc will redefine these to it's own implementation. It is safe
  * to have the prototypes here unconditionally.  */
index 3da855fe612daac966ea89adb815ebf33fb0f648..7a11dacd70708a2bae699ba972851cc28ed3bd25 100644 (file)
@@ -22,7 +22,7 @@ FILE *fopen_or_warn_stdin(const char *filename)
 
        if (filename != bb_msg_standard_input
         && filename[0]
-        && (filename[0] != '-' || filename[1])
+        && NOT_LONE_DASH(filename)
        ) {
                fp = fopen_or_warn(filename, "r");
        }
index a85e52306b5003ad2e732c7c24392e79e959c71f..5ceaefcacc685c11aacc30e8550f0265daeaf867 100644 (file)
@@ -239,7 +239,7 @@ static void open_tty(char *tty, struct termios *tp, int local)
 
        /* Set up new standard input, unless we are given an already opened port. */
 
-       if (strcmp(tty, "-")) {
+       if (NOT_LONE_DASH(tty)) {
                struct stat st;
                int fd;
 
index a23ee932b9a9bb83fb1e1f3c83610950ae0ddf3d..046457b6f16682416dd7a8dbcb95a78352cb5334 100644 (file)
@@ -14,25 +14,29 @@ int su_main(int argc, char **argv)
        char *opt_shell = 0;
        char *opt_command = 0;
        char *opt_username = "root";
-       char **opt_args = 0;
        struct passwd *pw;
        uid_t cur_uid = getuid();
        const char *tty;
        char *old_user;
 
        flags = getopt32(argc, argv, "mplc:s:", &opt_command, &opt_shell);
+       argc -= optind;
+       argv -= optind;
 #define SU_OPT_mp (3)
 #define SU_OPT_l (4)
 
-       if (optind < argc  && argv[optind][0] == '-' && argv[optind][1] == 0) {
+       if (argc && LONE_DASH(argv[0])) {
                flags |= SU_OPT_l;
-               ++optind;
+               argc--;
+               argv++;
        }
 
        /* get user if specified */
-       if (optind < argc) opt_username = argv [optind++];
-
-       if (optind < argc) opt_args = argv + optind;
+       if (argc) {
+               opt_username = argv[0];
+//             argc--;
+               argv++;
+       }
 
        if (ENABLE_SU_SYSLOG) {
                /* The utmp entry (via getlogin) is probably the best way to identify
@@ -84,7 +88,7 @@ int su_main(int argc, char **argv)
        USE_SELINUX(set_current_security_context(NULL);)
 
        /* Never returns */
-       run_shell(opt_shell, flags & SU_OPT_l, opt_command, (const char**)opt_args);
+       run_shell(opt_shell, flags & SU_OPT_l, opt_command, (const char**)argv);
 
        return EXIT_FAILURE;
 }
index 39d3aae4184e5999a3943e9682ed37db9f75e00d..d442272f0cb4258ed51a7c59617a49c2aea21c8e 100644 (file)
@@ -51,7 +51,7 @@ int crontab_main(int ac, char **av)
 
        i = 1;
        if (ac > 1) {
-               if (av[1][0] == '-' && av[1][1] == 0) {
+               if (LONE_DASH(av[1])) {
                        option = REPLACE;
                        ++i;
                } else if (av[1][0] != '-') {
index 223d2435c6f72bfd750f8bfef8a52add01db2240..dff894468c60ee799a9fe6037068b1f746bbc434 100644 (file)
@@ -132,7 +132,7 @@ int ftp_receive(ftp_host_info_t *server, FILE *control_stream,
                do_continue = 0;
        }
 
-       if ((local_path[0] == '-') && (local_path[1] == '\0')) {
+       if (LONE_DASH(local_path)) {
                fd_local = STDOUT_FILENO;
                do_continue = 0;
        }
@@ -212,9 +212,8 @@ int ftp_send(ftp_host_info_t *server, FILE *control_stream,
        fd_data = xconnect_ftpdata(server, buf);
 
        /* get the local file */
-       if ((local_path[0] == '-') && (local_path[1] == '\0')) {
-               fd_local = STDIN_FILENO;
-       } else {
+       fd_local = STDIN_FILENO;
+       if (NOT_LONE_DASH(local_path)) {
                fd_local = xopen(local_path, O_RDONLY);
                fstat(fd_local, &sbuf);
 
index 2a267fef692076f57bae29983d97131f6630f52b..9fb08e6bae1ee79dd052772c3da62e3efc8e3612 100644 (file)
@@ -681,7 +681,7 @@ static int ipaddr_modify(int cmd, int argc, char **argv)
                                if (strcmp(*argv, "+") == 0) {
                                        brd_len = -1;
                                }
-                               else if (strcmp(*argv, "-") == 0) {
+                               else if (LONE_DASH(*argv)) {
                                        brd_len = -2;
                                } else {
                                        get_addr(&addr, *argv, req.ifa.ifa_family);
index 64d376fa7fcb01207bd631eb188b33f8817e5a7f..a62c5d8cc6137ba688d24a6f8d0edd283dc2d37b 100644 (file)
@@ -530,7 +530,7 @@ int tftp_main(int argc, char **argv)
        if ((localfile == NULL && remotefile == NULL) || (argv[optind] == NULL))
                bb_show_usage();
 
-       if (localfile == NULL || strcmp(localfile, "-") == 0) {
+       if (localfile == NULL || LONE_DASH(localfile)) {
                fd = (cmd == tftp_cmd_get) ? STDOUT_FILENO : STDIN_FILENO;
        } else {
                fd = open(localfile, flags, 0644); /* fail below */
index 19bf8f887b500d528c0462b5475108a0cfc4aa04..fbdbf62f61ba26252f3f622eff4602d659e4f00f 100644 (file)
@@ -217,7 +217,7 @@ int wget_main(int argc, char **argv)
        /*
         * Determine where to start transfer.
         */
-       if (fname_out[0] == '-' && !fname_out[1]) {
+       if (LONE_DASH(fname_out)) {
                output_fd = 1;
                opt &= ~WGET_OPT_CONTINUE;
        }
index 3a9998fc0e9066167f431ea5b604d61783637b89..8ba4cb8a0c1fe87cad7ce7a3f180280c0ead634a 100644 (file)
@@ -2315,7 +2315,7 @@ cdcmd(int argc, char **argv)
        dest = *argptr;
        if (!dest)
                dest = bltinlookup(homestr);
-       else if (dest[0] == '-' && dest[1] == '\0') {
+       else if (LONE_DASH(dest)) {
                dest = bltinlookup("OLDPWD");
                flags |= CD_PRINT;
        }
@@ -8889,7 +8889,7 @@ options(int cmdline)
                argptr++;
                if ((c = *p++) == '-') {
                        val = 1;
-                       if (p[0] == '\0' || (p[0] == '-' && p[1] == '\0')) {
+                       if (p[0] == '\0' || LONE_DASH(p)) {
                                if (!cmdline) {
                                        /* "-" means turn off -x and -v */
                                        if (p[0] == '\0')
@@ -9114,7 +9114,7 @@ atend:
                        goto out;
                }
                optnext++;
-               if (p[0] == '-' && p[1] == '\0')        /* check for "--" */
+               if (LONE_DASH(p))        /* check for "--" */
                        goto atend;
        }
 
@@ -9232,7 +9232,7 @@ nextopt(const char *optstring)
                if (p == NULL || *p != '-' || *++p == '\0')
                        return '\0';
                argptr++;
-               if (p[0] == '-' && p[1] == '\0')        /* check for "--" */
+               if (LONE_DASH(p))        /* check for "--" */
                        return '\0';
        }
        c = *p++;
@@ -9825,7 +9825,7 @@ void fixredir(union node *n, const char *text, int err)
 
        if (is_digit(text[0]) && text[1] == '\0')
                n->ndup.dupfd = digit_val(text[0]);
-       else if (text[0] == '-' && text[1] == '\0')
+       else if (LONE_DASH(text))
                n->ndup.dupfd = -1;
        else {
 
@@ -11650,7 +11650,7 @@ trapcmd(int argc, char **argv)
                        sh_error("%s: bad trap", *ap);
                INTOFF;
                if (action) {
-                       if (action[0] == '-' && action[1] == '\0')
+                       if (LONE_DASH(action))
                                action = NULL;
                        else
                                action = savestr(action);
@@ -12257,7 +12257,7 @@ static void mklocal(char *name)
 
        INTOFF;
        lvp = ckmalloc(sizeof (struct localvar));
-       if (name[0] == '-' && name[1] == '\0') {
+       if (LONE_DASH(name)) {
                char *p;
                p = ckmalloc(sizeof(optlist));
                lvp->text = memcpy(p, optlist, sizeof(optlist));
index 492d3cf43f3c62b06c6a667b5d8372b095270e3c..45ca3df81e4864d76ec76f6d2706bb39599a19a3 100644 (file)
@@ -1001,7 +1001,7 @@ static int newfile(char *s)
 
        DBGPRINTF7(("NEWFILE: opening %s\n", s));
 
-       if (strcmp(s, "-") != 0) {
+       if (NOT_LONE_DASH(s)) {
                DBGPRINTF(("NEWFILE: s is %s\n", s));
                f = open(s, 0);
                if (f < 0) {