Lines Matching defs:fp

420 	FILE *fp;			/* scratch file pointer */
428 fp = fopen(SACTAB, "r");
429 if (fp == NULL) {
433 if (tag && !find_pm(fp, tag)) {
438 if (type && !(tp = find_type(fp, type))) {
443 (void) fclose(fp);
475 fp = fopen(fname, "r");
476 if (fp == NULL) {
481 if (find_svc(fp, tp->t_tag, svctag)) {
491 (void) fclose(fp);
495 (void) fclose(fp);
515 fp = fopen(fname, "a");
516 if (fp == NULL) {
521 (void) fprintf(fp, "%s:%s:%s:reserved:reserved:reserved:%s#%s\n",
524 (void) fclose(fp);
554 FILE *fp; /* scratch file pointer */
561 fp = fopen(SACTAB, "r");
562 if (fp == NULL) {
566 if (!find_pm(fp, pmtag)) {
571 (void) fclose(fp);
575 fp = fopen(buf, "r");
576 if (fp == NULL) {
581 if ((line = find_svc(fp, pmtag, svctag)) == 0) {
589 if (copy_file(fp, tfp, 1, line - 1)) {
595 if (copy_file(fp, tfp, line + 1, -1)) {
600 (void) fclose(fp);
642 FILE *fp; /* scratch file pointer */
653 fp = fopen(SACTAB, "r");
654 if (fp == NULL) {
658 if (!find_pm(fp, pmtag)) {
663 (void) fclose(fp);
667 fp = fopen(buf, "r");
668 if (fp == NULL) {
673 if ((line = find_svc(fp, pmtag, svctag)) == 0) {
681 if (copy_file(fp, tfp, 1, line - 1)) {
693 if (fgets(buf, SIZE, fp) == NULL) {
741 if (copy_file(fp, tfp, line + 1, -1)) {
746 (void) fclose(fp);
784 FILE *fp; /* scratch file pointer */
791 fp = fopen(SACTAB, "r");
792 if (fp == NULL) {
796 if (tag && !find_pm(fp, tag)) {
801 if (type && !(tp = find_type(fp, type))) {
806 (void) fclose(fp);
823 fp = fopen(fname, "r");
824 if (fp == NULL) {
829 if (!find_svc(fp, tp->t_tag, svctag)) {
840 (void) fclose(fp);
844 (void) fclose(fp);
944 FILE *fp; /* scratch file pointer */
953 fp = fopen(SACTAB, "r");
954 if (fp == NULL) {
958 if (pmtag && !find_pm(fp, pmtag)) {
963 rewind(fp);
965 tp = find_type(fp, type);
973 tp = find_type(fp, NULL);
974 (void) fclose(fp);
983 fp = fopen(fname, "r");
984 if (fp == NULL) {
989 while (fgets(buf, SIZE, fp)) {
1012 if (!feof(fp)) {
1018 (void) fclose(fp);
1037 * args: fp - file pointer for _pmtab
1043 find_svc(FILE *fp, char *tag, char *svctag)
1050 while (fgets(buf, SIZE, fp)) {
1059 if (!feof(fp)) {
1292 * args: fp - file pointer for _sactab
1298 find_type(fp, type)
1299 FILE *fp;
1310 while (fgets(buf, SIZE, fp)) {
1327 if (!feof(fp)) {