libproff/str.h

/* [<][>]
[^][v][top][bottom][index][help] */

DEFINITIONS

This source file includes following functions.
  1. strCaseEq
  2. strnCaseEq

/* $Id: str.h,v 1.1.1.1 1998/07/29 15:14:28 proff Exp $
 * $Copyright:$
 */
#ifndef STR_H
#define STR_H

struct strList
{
        struct strList *next;
        struct strList *head;
        char *data;
};

struct strBinList
{
        struct strBinList *right;
        struct strBinList *left;
        char *data;
};

struct strStack
{
        char *data;
        int used;
        int len;
};

/* we don't do the *x==*y trick, as it doesn't take kindly to functions */
#define strEq(x,y) (strcmp((x), (y)) == 0)
#define strnEq(x,y,z) (strncmp((x), (y), (z)) == 0)
#ifdef HAVE_STRCASECMP
#  define strCaseEq(x,y) (strcasecmp((x), (y)) == 0)
/* [<][>][^][v][top][bottom][index][help] */
#  define strnCaseEq(x,y,z) (strncasecmp((x), (y), (z)) == 0)
/* [<][>][^][v][top][bottom][index][help] */
#endif

#define strListAdd(x,y) lp_strListAdd ((x), (y), __FILE__ ":" STR(__LINE__))
#define strStackAdd(x,y) lp_strStackAdd ((x), (y), __FILE__ ":" STR(__LINE__))
#define strnStackAdd(x,y,z) lp_strnStackAdd ((x), (y), (z), __FILE__ ":" STR(__LINE__))

#include "str.ext"

#endif /* STR_H */


/* [<][>][^][v][top][bottom][index][help] */