Annotation of coherent/d/bin/dos/FILE, revision 1.1

1.1     ! root        1: copyrigh.c
        !             2: copyright.c
        !             3: dos0.c
        !             4: 36 a 37
        !             5: > short                isdir_keep;
        !             6: dos1.c
        !             7: dos2.c
        !             8: 273 c 273
        !             9: <                      if (s < &buf[11])
        !            10: ---
        !            11: >                      if (s <= &buf[11])
        !            12: 324 a 325,326
        !            13: >      char *argsd[512], *argsf[512];
        !            14: >      short dnargs = 0, fnargs = 0;
        !            15: 334,335 c 336,337
        !            16: <      else for (ap = args; nargs ; ap++, nargs--) {
        !            17: <              if ((mdp = find(*ap, root, &dp)) == NULL)
        !            18: ---
        !            19: >      else {
        !            20: >              if ((mdp = find(args[0], root, &dp)) == NULL)
        !            21: 338,343 c 340,362
        !            22: <                      do {    
        !            23: <                              base = basehold;
        !            24: <                              strcpy(base,*ap);
        !            25: <                              if isdir(mdp)
        !            26: <                                      extractdir(dp);
        !            27: <                              else
        !            28: ---
        !            29: >                      do {
        !            30: >                              cohname(mdp->m_name, dp);
        !            31: >                              if (isdir(mdp)) {
        !            32: >                                      if (!sflag) {
        !            33: >                                              argsd[dnargs] = 
        !            34: >                                                  malloc(strlen(cohfile)+1);
        !            35: >                                              strcpy(argsd[dnargs++],
        !            36: >                                                              cohfile);
        !            37: >                                      }
        !            38: >                              }
        !            39: >                              else {
        !            40: >                                      argsf[fnargs] = 
        !            41: >                                              malloc(strlen(cohfile) + 1);
        !            42: >                                      strcpy(argsf[fnargs++],cohfile);
        !            43: >                              }
        !            44: >                      } while (mdp = findnext(&dp));
        !            45: >                      numargs = fnargs + (sflag ? 0 : dnargs);
        !            46: >                      if (fnargs > 0) {
        !            47: >                              for (ap = argsf; fnargs ; ap++, fnargs--) {
        !            48: >                                      isdir_keep = 0;
        !            49: >                                      mdp = find(*ap, root, &dp);
        !            50: >                                      base = basehold;
        !            51: >                                      strcpy(base,*ap); 
        !            52: 345 c 364,374
        !            53: <                      } while (mdp = findnext(&dp));
        !            54: ---
        !            55: >                              }
        !            56: >                      }
        !            57: >                      if ((!sflag) && (dnargs > 0)) {
        !            58: >                              for (ap = argsd; dnargs ; ap++, dnargs--) {
        !            59: >                                      isdir_keep = 1;
        !            60: >                                      mdp = find(*ap, root, &dp);
        !            61: >                                      base = basehold;
        !            62: >                                      strcpy(base,*ap); 
        !            63: >                                      extractdir(dp);
        !            64: >                              }
        !            65: >                      }
        !            66: dos3.c
        !            67: 38 c 38
        !            68: <                                                  lmatch(name, cohn(s))));
        !            69: ---
        !            70: >                                                  lmatch(tname, cohn(s))));
        !            71: 89 a 90
        !            72: >      dbprintf(("findnext(%s)\n", sname));
        !            73: 208 c 209
        !            74: <                      if (s < &buf[11])
        !            75: ---
        !            76: >                      if (s < &buf[12])
        !            77: 311 c 312,313
        !            78: <      if (c != 'y' && c != 'Y')
        !            79: ---
        !            80: >      if (c != 'y' && c != 'Y') {
        !            81: >              rm_lock();
        !            82: 312 a 315
        !            83: >      }
        !            84: 506 a 510,511
        !            85: >      if (volume != NULL)
        !            86: >              deletefile(volume, root);
        !            87: 511,512 d 515
        !            88: <      if (volume != NULL)
        !            89: <              deletefile(volume, root);
        !            90: dos4.c
        !            91: 278 c 278
        !            92: <      int done = 0;
        !            93: ---
        !            94: >      short done = 0, rs;
        !            95: 279 a 280
        !            96: >      short srcd, destd, deste; 
        !            97: 284 d 284
        !            98: <      }
        !            99: 286,290 c 286,290
        !           100: <      if (cr) {
        !           101: <              if ((stat(base1, &s) == -1) || !(s.st_mode & S_IFDIR)) {
        !           102: <                      done = 1;
        !           103: <                      if (strcspn(base, "*?") != strlen(base))
        !           104: <                              fatal("Cannot copy multiple sources to a file\n");
        !           105: ---
        !           106: >              if (cr) {
        !           107: >                      srcd = isdir_keep;
        !           108: >                      rs = stat(base1, &s);
        !           109: >                      deste = (rs == 0);
        !           110: >                      destd = (s.st_mode & S_IFDIR);
        !           111: 292,297 c 292,297
        !           112: <      }
        !           113: <      else {
        !           114: <              if (((mdp = find(base1, root, NULL)) == NULL) || !isdir(mdp)){
        !           115: <                      done = 1;
        !           116: <                      if (numargs > 1)
        !           117: <                              fatal("Cannot copy multiple sources to a file\n");
        !           118: ---
        !           119: >              else {
        !           120: >                      mdp = find(base1,root,NULL);
        !           121: >                      deste = (mdp != NULL);
        !           122: >                      destd = isdir(mdp);
        !           123: >                      stat(base, &s);
        !           124: >                      srcd = (s.st_mode & S_IFDIR);
        !           125: 299 d 298
        !           126: <      }
        !           127: 300 a 300,321
        !           128: > dbprintf(("numargs = %d, deste = %d, destd = %d, srcd = %d\n",numargs,deste,destd,srcd));
        !           129: > 
        !           130: >              if ((numargs > 1) && (deste) && !(destd))
        !           131: >                      fatal("Error: <%s> is a file", base1);
        !           132: >              
        !           133: >              if (numargs == 1) {
        !           134: >                      if (!deste) {
        !           135: >                              if (!srcd)
        !           136: >                                      done = 1;
        !           137: >                      }
        !           138: >                      else {
        !           139: >                              if (!destd) {
        !           140: >                                      if (srcd)
        !           141: >                                              fatal("Error: <%s> is a file"
        !           142: >                                                              , base1);
        !           143: >                                      else
        !           144: >                                              done = 1;
        !           145: >                              }
        !           146: >                      }
        !           147: >              }
        !           148: >      }
        !           149: > 
        !           150: 303 c 324,325
        !           151: <                      *t++ = '/';
        !           152: ---
        !           153: >                      if (base1)
        !           154: >                              *t++ = '/';
        !           155: 310 c 332,333
        !           156: < dbprintf(("base = <%s>, base1 = <%s>, tname = <%s>\n", base, base1, tname));
        !           157: ---
        !           158: > 
        !           159: > dbprintf(("base = <%s>, base1 = <%s>\n  name = <%s>, tname = <%s>\n", base, base1, name, tname));
        !           160: 317 c 340
        !           161: <      short basesize;
        !           162: ---
        !           163: >      short basesize, nwsize;
        !           164: 327,329 c 350,353
        !           165: <      
        !           166: <      
        !           167: <      if ((tmp = strrchr(base, '/')) != NULL)
        !           168: ---
        !           169: > 
        !           170: >      tmp = strrchr(base + 1, '/');
        !           171: > 
        !           172: >      if (tmp != NULL)
        !           173: 332 c 356
        !           174: <              basesize = 0;
        !           175: ---
        !           176: >              basesize = strlen(base);
        !           177: 334 c 358
        !           178: <      return strchr(name + basesize + 1, '/') + 1;
        !           179: ---
        !           180: >      return name + basesize + 1;
        !           181: dosdrives.c
        !           182: dosdump.c
        !           183: dosshrink.c

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.