~ubuntu-branches/ubuntu/precise/super/precise-security

« back to all changes in this revision

Viewing changes to utils.c

  • Committer: Bazaar Package Importer
  • Author(s): Robert Luberda
  • Date: 2005-11-17 18:50:03 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20051117185003-cytgskvjv7jxdsx2
Tags: 3.26.1-1
* New upstream version.
* debian/control: Standards-Version: 3.6.2.
* Remove lintian source overrides file, it's not needed.
* Fix format of the `closes' clauses at the end of this changelog 
  to make lintian happy.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
static const char rcsid[] = "$Id: utils.c,v 1.153 2004/10/22 00:26:16 will Exp $";
 
1
static const char rcsid[] = "$Id: utils.c,v 1.155 2005/11/15 19:49:16 will Exp $";
2
2
#include "super.h"
3
3
 
4
4
/* Variables table flag -- !0 means has been created */
1325
1325
    int lb = strlen(vardefn);
1326
1326
 
1327
1327
    if (!created_variables_table) {
1328
 
        if (!hcreate(1000))
 
1328
        if (!s_hcreate(1000))
1329
1329
            return Error(0, 0,
1330
1330
                "%tCouldn't allocate hash table for variable processing\n");
1331
1331
        created_variables_table = 1;
1352
1352
        fprintf(stderr, "Adding variable `%s' = `%s'\n", item.key, item.data);
1353
1353
 
1354
1354
    /* Delete the existing value, if any */
1355
 
    if ((found_item = hsearch(item, FIND))) {
1356
 
        /* Assume all keys and data allocated via malloc() */
1357
 
        free(found_item->key);
 
1355
    if ((found_item = s_hsearch(item, FIND))) {
 
1356
        /* Assume all data allocated via malloc() */
1358
1357
        free(found_item->data);
 
1358
        found_item->data = NULL;
1359
1359
    }
1360
 
    if (!hsearch(item, ENTER))
 
1360
    if (!s_hsearch(item, ENTER))
1361
1361
        return Error(0, 0,
1362
1362
        "%tFailed to allocate space for hash-table entry for variable `%s'\n",
1363
1363
                varname);
1618
1618
        if (varname) {
1619
1619
            /* Have a variable requiring expansion */
1620
1620
            wanted_item.key = varname;
1621
 
            found_item = hsearch(wanted_item, FIND);
 
1621
            found_item = s_hsearch(wanted_item, FIND);
1622
1622
            if (!found_item) {
1623
1623
                Error(0, 0, "%t\n\tNo such variable as `$%s'\n",
1624
1624
                        wanted_item.key);
1655
1655
 
1656
1656
    /* Have a variable requiring expansion */
1657
1657
    wanted_item.key = varname;
1658
 
    found_item = hsearch(wanted_item, FIND);
 
1658
    found_item = s_hsearch(wanted_item, FIND);
1659
1659
    if (!found_item) {
1660
1660
        return NULL;
1661
1661
    }