|
|
1.1 ! root 1: #include <string.h> ! 2: ! 3: /* reduce tcp and dk names to their final component */ ! 4: void ! 5: canonsys(char *sys, char cansys[]) ! 6: { ! 7: if (strncmp(sys, "dk!", 3) == 0) ! 8: sys += 3; ! 9: if (strncmp(sys, "tcp!", 4) == 0) ! 10: sys += 4; ! 11: if (strrchr(sys, '/')) ! 12: sys = strrchr(sys, '/') + 1; ! 13: strcpy(cansys, sys); ! 14: if (strrchr(cansys, '.')) ! 15: *strchr(cansys, '.') = '\0'; ! 16: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.