Changeset 37 for trunk/src/kmk/var.c


Ignore:
Timestamp:
Mar 27, 2003, 1:06:39 AM (22 years ago)
Author:
bird
Message:

VarStrCmp().

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kmk/var.c

    r36 r37  
    8989
    9090#ifdef USE_KLIB
    91  #include <kLib/kLib.h>
     91    #define KLIB_INSTRICT
     92    #include <kLib/kLib.h>
    9293#endif
    9394
     
    9697#include    <regex.h>
    9798#include    <stdlib.h>
     99#include    <string.h>
    98100#include    "make.h"
    99101#include    "buf.h"
     
    222224    return (strcmp ((char *) name, ((Var *) v)->name));
    223225}
     226
     227/*-
     228 *-----------------------------------------------------------------------
     229 * StrCmp  --
     230 *      See if the given strings matches. Called from
     231 *      Lst_Find when searching for a environment-variable-overrided var.
     232 *
     233 * Results:
     234 *      0 if they match. non-zero otherwise.
     235 *
     236 * Side Effects:
     237 *      none
     238 *-----------------------------------------------------------------------
     239 */
     240static int
     241VarStrCmp (str1, str2)
     242    ClientData     str1;
     243    ClientData     str2;
     244{
     245    return (strcmp ((char *) str1, (char *)str2));
     246}
     247
     248
    224249
    225250/*-
     
    293318     */
    294319    if (Lst_Find (envFirstVars, (ClientData)name,
    295                   (int (*)(ClientData, ClientData)) strcmp) != NILLNODE)
     320                  (int (*)(ClientData, ClientData)) VarStrCmp) != NILLNODE)
    296321    {
    297322        localCheckEnvFirst = TRUE;
Note: See TracChangeset for help on using the changeset viewer.