Diff for /np2/x11/main.c between versions 1.34 and 1.36

version 1.34, 2011/01/15 16:10:12 version 1.36, 2011/01/15 18:43:13
Line 1 Line 1
 /*      $Id$    */  
   
 /*  /*
  * Copyright (c) 2003 NONAKA Kimihiro   * Copyright (c) 2003 NONAKA Kimihiro
  * All rights reserved.   * All rights reserved.
Line 107  static void Line 105  static void
 usage(void)  usage(void)
 {  {
   
         printf("Usage: %s [options] [[FD1 image] [[FD2 image] [[FD3 image] [FD4 image]]]]\n\n", progname);          g_printerr("Usage: %s [options] [[FD1 image] [[FD2 image] [[FD3 image] [FD4 image]]]]\n\n", progname);
         printf("options:\n");          g_printerr("options:\n");
         printf("\t--help            [-h]        : print this message\n");          g_printerr("\t--help            [-h]        : print this message\n");
         printf("\t--config          [-c] <file> : specify config file\n");          g_printerr("\t--config          [-c] <file> : specify config file\n");
         printf("\t--timidity-config [-C] <file> : specify timidity config file\n");          g_printerr("\t--timidity-config [-C] <file> : specify timidity config file\n");
         exit(1);          exit(1);
 }  }
   
Line 142  main(int argc, char *argv[]) Line 140  main(int argc, char *argv[])
                 switch (ch) {                  switch (ch) {
                 case 'c':                  case 'c':
                         if (stat(optarg, &sb) < 0 || !S_ISREG(sb.st_mode)) {                          if (stat(optarg, &sb) < 0 || !S_ISREG(sb.st_mode)) {
                                 fprintf(stderr, "Can't access %s.\n", optarg);                                  g_printerr("Can't access %s.\n", optarg);
                                 exit(1);                                  exit(1);
                         }                          }
                         milstr_ncpy(modulefile, optarg, sizeof(modulefile));                          milstr_ncpy(modulefile, optarg, sizeof(modulefile));
Line 150  main(int argc, char *argv[]) Line 148  main(int argc, char *argv[])
   
                 case 'C':                  case 'C':
                         if (stat(optarg, &sb) < 0 || !S_ISREG(sb.st_mode)) {                          if (stat(optarg, &sb) < 0 || !S_ISREG(sb.st_mode)) {
                                 fprintf(stderr, "Can't access %s.\n", optarg);                                  g_printerr("Can't access %s.\n", optarg);
                                 exit(1);                                  exit(1);
                         }                          }
                         milstr_ncpy(timidity_cfgfile_path, optarg,                          milstr_ncpy(timidity_cfgfile_path, optarg,
Line 183  main(int argc, char *argv[]) Line 181  main(int argc, char *argv[])
                                         exit(1);                                          exit(1);
                                 }                                  }
                         } else if (!S_ISDIR(sb.st_mode)) {                          } else if (!S_ISDIR(sb.st_mode)) {
                                 fprintf(stderr, "%s isn't directory.\n",                                  g_printerr("%s isn't directory.\n",
                                     modulefile);                                      modulefile);
                                 exit(1);                                  exit(1);
                         }                          }
Line 192  main(int argc, char *argv[]) Line 190  main(int argc, char *argv[])
                         milstr_ncat(modulefile, "/np2rc", sizeof(modulefile));                          milstr_ncat(modulefile, "/np2rc", sizeof(modulefile));
                         if ((stat(modulefile, &sb) >= 0)                          if ((stat(modulefile, &sb) >= 0)
                          && !S_ISREG(sb.st_mode)) {                           && !S_ISREG(sb.st_mode)) {
                                 fprintf(stderr, "%s isn't regular file.\n",                                  g_printerr("%s isn't regular file.\n",
                                     modulefile);                                      modulefile);
                         }                          }
                 }                  }
Line 216  main(int argc, char *argv[]) Line 214  main(int argc, char *argv[])
                                 exit(1);                                  exit(1);
                         }                          }
                 } else if (!S_ISDIR(sb.st_mode)) {                  } else if (!S_ISDIR(sb.st_mode)) {
                         fprintf(stderr, "%s isn't directory.\n",                          g_printerr("%s isn't directory.\n",
                             statpath);                              statpath);
                         exit(1);                          exit(1);
                 }                  }

Removed from v.1.34  
changed lines
  Added in v.1.36


RetroPC.NET-CVS <cvs@retropc.net>