+ if (strlen(sname) >= SYSNSIZE) {
+ register FILE *fp;
+ register char *p;
+ char line[MAXFULLNAME];
+ fp = fopen(SYSFILE, "r");
+ ASSERT(fp != NULL, CANTOPEN, SYSFILE, 0);
+ while (cfgets(line, sizeof(line), fp) != NULL) {
+ p = index(line, ' ');
+ if (p)
+ *p = '\0';
+ if (strncmp(sname, line, SYSNSIZE) == SAME) {
+ strncpy(sname, line, MAXBASENAME);
+ break;
+ }
+ }
+ fclose(fp);
+ }