Back to index

courier  0.68.2
Functions | Variables
combatchsize.c File Reference
#include "courier.h"
#include "maxlongsize.h"
#include <stdio.h>
#include <stdlib.h>

Go to the source code of this file.

Functions

const char * config_batchsize ()

Variables

static char batchsize_buf [MAXLONGSIZE] = ""

Function Documentation

const char* config_batchsize ( )

Definition at line 13 of file combatchsize.c.

{
char   *batchfilename;
char   *batchsizestr;
unsigned batchsize;

       if (batchsize_buf[0] == '\0')
       {
              batchfilename=config_localfilename("batchsize");
              batchsizestr=config_read1l(batchfilename);

              free(batchfilename);

              batchsize=100;
              if (batchsizestr)
              {
                     batchsize=atoi(batchsizestr);
                     free(batchsizestr);
                     if (batchsize == 0)  batchsize=100;
                                          /* stupid user */
              }
              if (batchsize <= 0)  batchsize=5;
              sprintf(batchsize_buf, "%u", batchsize);
       }
       return (batchsize_buf);
}

Here is the call graph for this function:


Variable Documentation

char batchsize_buf[MAXLONGSIZE] = "" [static]

Definition at line 11 of file combatchsize.c.