|
Lines 583-600
Link Here
|
| 583 |
len = pos - spos; |
583 |
len = pos - spos; |
| 584 |
while (*pos == ' ' || *pos == '\t') |
584 |
while (*pos == ' ' || *pos == '\t') |
| 585 |
pos++; |
585 |
pos++; |
|
|
586 |
lp = (struct linelist *)malloc(sizeof (*lp)); |
| 587 |
if (lp == NULL) |
| 588 |
return (NULL); |
| 589 |
lp->l_parsed = 0; |
| 590 |
lp->l_groupname = (char *)malloc(len + 1); |
| 591 |
if (lp->l_groupname == NULL) { |
| 592 |
free(lp); |
| 593 |
return (NULL); |
| 594 |
} |
| 595 |
bcopy(spos, lp->l_groupname, len); |
| 596 |
*(lp->l_groupname + len) = 0; |
| 586 |
if (*pos != '\n' && *pos != '\0') { |
597 |
if (*pos != '\n' && *pos != '\0') { |
| 587 |
lp = (struct linelist *)malloc(sizeof (*lp)); |
|
|
| 588 |
if (lp == NULL) |
| 589 |
return (NULL); |
| 590 |
lp->l_parsed = 0; |
| 591 |
lp->l_groupname = (char *)malloc(len + 1); |
| 592 |
if (lp->l_groupname == NULL) { |
| 593 |
free(lp); |
| 594 |
return (NULL); |
| 595 |
} |
| 596 |
bcopy(spos, lp->l_groupname, len); |
| 597 |
*(lp->l_groupname + len) = '\0'; |
| 598 |
len = strlen(pos); |
598 |
len = strlen(pos); |
| 599 |
olen = 0; |
599 |
olen = 0; |
| 600 |
|
600 |
|
|
Lines 633-648
Link Here
|
| 633 |
cont = 0; |
633 |
cont = 0; |
| 634 |
} |
634 |
} |
| 635 |
} while (cont); |
635 |
} while (cont); |
| 636 |
lp->l_line = linep; |
|
|
| 637 |
lp->l_next = linehead; |
| 638 |
linehead = lp; |
| 639 |
|
| 640 |
/* |
| 641 |
* If this is the one we wanted, we are done. |
| 642 |
*/ |
| 643 |
if (!strcmp(lp->l_groupname, group)) |
| 644 |
return (lp); |
| 645 |
} |
636 |
} |
|
|
637 |
|
| 638 |
lp->l_line = linep; |
| 639 |
lp->l_next = linehead; |
| 640 |
linehead = lp; |
| 641 |
|
| 642 |
/* |
| 643 |
* If this is the one we wanted, we are done. |
| 644 |
*/ |
| 645 |
if (!strcmp(lp->l_groupname, group)) |
| 646 |
return (lp); |
| 646 |
} |
647 |
} |
| 647 |
#ifdef YP |
648 |
#ifdef YP |
| 648 |
/* |
649 |
/* |