Back to index

courier  0.68.2
Functions
comqueuename.c File Reference
#include "courier.h"
#include "localstatedir.h"
#include "comqueuename.h"
#include "maxlongsize.h"
#include "comstrinode.h"
#include "comstrtimestamp.h"
#include <stdlib.h>
#include <string.h>

Go to the source code of this file.

Functions

const char * qmsgsdir (ino_t inum)
static const char * qmsgsname (ino_t inum, const char *type)
const char * qmsgsctlname (ino_t inum)
const char * qmsgsdatname (ino_t inum)
const char * qmsgqdir (time_t t)
const char * qmsgqname (ino_t i, time_t t)

Function Documentation

const char* qmsgqdir ( time_t  t)

Definition at line 44 of file comqueuename.c.

{
static char buf[MAXLONGSIZE + 10 + sizeof(MSGQDIR "/") ];

       strcat(strcpy(buf, MSGQDIR "/"), strtimestamp(t));
       buf[strlen(buf)-4]=0;       /* I'm pretty sure it's at least 1971 */
       return (buf);
}

Here is the call graph for this function:

Here is the caller graph for this function:

const char* qmsgqname ( ino_t  i,
time_t  t 
)

Definition at line 53 of file comqueuename.c.

{
static char buf[MAXLONGSIZE*3 + 25 + sizeof(MSGQDIR "/") ];

       strcat(strcpy(buf, qmsgqdir(t)), "/C");
       strcat(buf, strinode(i));
       strcat(buf, ".");
       strcat(buf, strtimestamp(t));
       return (buf);
}

Here is the call graph for this function:

Here is the caller graph for this function:

const char* qmsgsctlname ( ino_t  inum)

Definition at line 34 of file comqueuename.c.

{
       return (qmsgsname(inum, "C"));
}

Here is the call graph for this function:

Here is the caller graph for this function:

const char* qmsgsdatname ( ino_t  inum)

Definition at line 39 of file comqueuename.c.

{
       return (qmsgsname(inum, "D"));
}

Here is the call graph for this function:

Here is the caller graph for this function:

const char* qmsgsdir ( ino_t  inum)

Definition at line 18 of file comqueuename.c.

{
static char buf[MAXLONGSIZE + 10 + sizeof(MSGSDIR "/") ];

       return (strcat(strcpy(buf, MSGSDIR "/"),
              strinode(inum % QDIRCOUNT)));
}

Here is the call graph for this function:

Here is the caller graph for this function:

static const char* qmsgsname ( ino_t  inum,
const char *  type 
) [static]

Definition at line 26 of file comqueuename.c.

{
static char buf[MAXLONGSIZE*2+20 ];

       strcpy(buf, qmsgsdir(inum));
       return (strcat(strcat(strcat(buf, "/"), type), strinode(inum)));
}

Here is the call graph for this function:

Here is the caller graph for this function: