Back to index

courier  0.68.2
Functions
cread1l.c File Reference
#include "courier.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

Go to the source code of this file.

Functions

char * config_read1l (const char *filename)

Function Documentation

char* config_read1l ( const char *  filename)

Definition at line 19 of file cread1l.c.

{
FILE   *fp=fopen(filename, "r");
char   buf[256];
char   *p;

       if (!fp)      return (0);
       if (fgets(buf, sizeof(buf), fp) == NULL)
              buf[0]=0;
       fclose(fp);
       if ((p=strchr(buf, '\n')) != 0)    *p=0;
       return (strcpy( (char *)courier_malloc(strlen(buf)+1), buf));
}

Here is the call graph for this function:

Here is the caller graph for this function: