[BACK]Return to midicat.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / midicat

Diff for /src/usr.bin/midicat/midicat.c between version 1.5 and 1.6

version 1.5, 2022/12/02 22:21:35 version 1.6, 2022/12/02 22:29:59
Line 92 
Line 92 
   
         /* open input or output file (if any) */          /* open input or output file (if any) */
         if (ifile) {          if (ifile) {
                 if (strcmp(ifile, "-") == 0)                  if (strcmp(ifile, "-") == 0) {
                           ifile = "stdin";
                         ifd = STDIN_FILENO;                          ifd = STDIN_FILENO;
                 else {                  } else {
                         ifd = open(ifile, O_RDONLY);                          ifd = open(ifile, O_RDONLY);
                         if (ifd == -1) {                          if (ifd == -1) {
                                 perror(ifile);                                  perror(ifile);
Line 102 
Line 103 
                         }                          }
                 }                  }
         } else if (ofile) {          } else if (ofile) {
                 if (strcmp(ofile, "-") == 0)                  if (strcmp(ofile, "-") == 0) {
                           ofile = "stdout";
                         ofd = STDOUT_FILENO;                          ofd = STDOUT_FILENO;
                 else {                  } else {
                         ofd = open(ofile, O_WRONLY | O_CREAT | O_TRUNC, 0666);                          ofd = open(ofile, O_WRONLY | O_CREAT | O_TRUNC, 0666);
                         if (ofd == -1) {                          if (ofd == -1) {
                                 perror(ofile);                                  perror(ofile);

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6