config_read(f)
void config_read(f)
config_read(f)char *f;{	FILE *cf;	char buf[256], cbuf[256];	int errflag, e, lineno;	char *fname;	if (f) fname = f;	else fname = CONF_AX25IPD_FILE;	if((cf = fopen(fname,"r"))==NULL) {		fprintf(stderr,"Config file %s not found or could not be opened\n",fname);		exit(1);	}	errflag = 0;	lineno = 0;	while(fgets(buf, 255, cf)!=NULL) {		strcpy(cbuf, buf);		lineno++;		if((e = parse_line(buf)) < 0) {			fprintf(stderr,"Config error at line %d: ",lineno);			if(e==-1)fprintf(stderr,"Missing argument\n");			else if(e==-2)fprintf(stderr,"Bad callsign format\n");			else if(e==-3)fprintf(stderr,"Bad option - on/off\n");			else if(e==-4)fprintf(stderr,"Bad option - tnc/digi\n");			else if(e==-5)fprintf(stderr,"Host not known\n");			else if(e==-6)fprintf(stderr,"Unknown command\n");			else if(e==-7)fprintf(stderr,"Text string too long\n");			else if(e==-8)fprintf(stderr,"Bad option - every/after\n");			else if(e==-9)fprintf(stderr,"Bad option - ip/udp\n");			else fprintf(stderr,"Unknown error\n");			fprintf(stderr,"%s",cbuf);			errflag++;		}	}	if(errflag)exit(1);	if(strlen(ttydevice)==0) {		fprintf(stderr,"No device specified in config file\n");		exit(1);	}	if((udp_mode == 0) && (ip_mode == 0)) {		fprintf(stderr,"Must specify ip and/or udp sockets\n");		exit(1);	}	if(digi) {		if(mycallsign[0]=='\0') {			fprintf(stderr,"No mycall line in config file\n");			exit(1);		}	}	if((digi) && (dual_port)) {		if(mycallsign2[0]=='\0') {			fprintf(stderr,"No mycall2 line in config file\n");			exit(1);		}	}}