1: #include    "stdio.h"
   2: 
   3: main(argc, argv)
   4: char **argv;
   5: {
   6:     register char *p1, *p2, *p3;
   7: 
   8:     if (argc < 2) {
   9:         putchar('\n');
  10:         exit(1);
  11:     }
  12:     p1 = argv[1];
  13:     p2 = p1;
  14:     while (*p1) {
  15:         if (*p1++ == '/')
  16:             p2 = p1;
  17:     }
  18:     if (argc>2) {
  19:         for(p3=argv[2]; *p3; p3++)
  20:             ;
  21:         while(p1>p2 && p3>argv[2])
  22:             if(*--p3 != *--p1)
  23:                 goto output;
  24:         *p1 = '\0';
  25:     }
  26: output:
  27:     puts(p2, stdout);
  28:     exit(0);
  29: }

Defined functions

main defined in line 3; never used
Last modified: 1983-03-05
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 653
Valid CSS Valid XHTML 1.0 Strict