Changeset ae030d in git


Ignore:
Timestamp:
Feb 3, 2012, 5:08:54 PM (11 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'a800fe4b3e9d37a38c5a10cc0ae9dfa0c15a4ee6')
Children:
c2e8c5044ea364ea7100d35065206c3d3258f96a
Parents:
951db29edc9cda82b668de29b5733c1ca8ed44b6
Message:
removed depencies on omalloc from feResource
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • findexec/omFindExec.c

    r951db29 rae030d  
    2424#endif
    2525
    26 #ifdef WINNT
    27 #include <omalloc/omalloc.h>
    28 #endif
    29 
    3026/* ABSOLUTE_FILENAME_P (fname): True if fname is an absolute filename */
    3127#define ABSOLUTE_FILENAME_P(fname)        (fname[0] == '/')
     
    9490      char *extra = NULL;
    9591      /* we are under msdos display */
    96       extra = (char*) omAlloc((search != NULL ? strlen(search) : 0) + 3);
     92      extra = (char*) malloc((search != NULL ? strlen(search) : 0) + 3);
    9793      strcpy(extra, ".:");
    9894      if (search != NULL) strcat(extra, search);
     
    134130#ifdef WINNT
    135131          if (extra != NULL)
    136             omFree(extra);
     132            free(extra);
    137133#endif
    138134          strcpy(executable, tbuf);
  • libpolys/resources/feFopen.cc

    r951db29 rae030d  
    99#include <misc/auxiliary.h>
    1010
    11 #include <omalloc/omalloc.h>
    1211#include <reporter/reporter.h>
    1312
     
    8584    char *s;
    8685
    87     if (where==NULL) s=(char *)omAlloc(250 * sizeof(char));
     86    if (where==NULL) s=(char *)malloc(1024);
    8887    else             s=where;
    8988
     
    111110      if (f!=NULL)
    112111      {
    113         if (where==NULL) omFree((ADDRESS)s);
     112        if (where==NULL) free((ADDRESS)s);
    114113        return f;
    115114      }
     
    120119      f=myfopen(path,mode);
    121120    }
    122     if (where==NULL) omFree((ADDRESS)s);
     121    if (where==NULL) free((ADDRESS)s);
    123122  }
    124123  if ((f==NULL)&&(useWerror))
  • libpolys/resources/feResource.cc

    r951db29 rae030d  
    1919#include "feResource.h"
    2020
    21 char* feArgv0 = NULL; 
     21char* feArgv0 = NULL;
    2222
    2323#ifdef AIX_4
     
    3131
    3232#include <reporter/reporter.h>
    33 #include <omalloc/omalloc.h>
    3433//char* feResource(const char id, int warn = -1);
    3534//char* feResource(const char* key, int warn = -1);
     
    178177  if (argv0==NULL)
    179178  {
    180     feArgv0 = (char*)omAlloc0(MAXPATHLEN+strlen("/Singular"));
     179    feArgv0 = (char*)malloc(MAXPATHLEN+strlen("/Singular"));
    181180    getcwd(feArgv0, MAXPATHLEN);
    182181    strcpy(feArgv0+strlen(feArgv0),"/Singular");
    183182  }
    184183  else
    185     feArgv0 = omStrDup(argv0);
     184    feArgv0 = strdup(argv0);
    186185#ifdef RESOURCE_DEBUG
    187186  printf("feInitResources: entering with argv0=%s=\n", feArgv0);
     
    199198#endif
    200199#ifdef HAVE_PUTENV
    201   if (path != NULL) { char *s=(char *)omAlloc0(strlen(path)+6);
     200  if (path != NULL) { char *s=(char *)malloc(strlen(path)+6);
    202201                      sprintf(s,"PATH=%s",path);
    203202                      putenv(s);
     
    217216    {
    218217      if (feResourceConfigs[i].value != NULL)
    219         omFree(feResourceConfigs[i].value);
     218        free(feResourceConfigs[i].value);
    220219      feResourceConfigs[i].value = (char *)"";
    221220    }
     
    270269{
    271270  if (config == NULL) return NULL;
    272   char* value = (char*) omAlloc(MAXRESOURCELEN);
     271  char* value = (char*) malloc(MAXRESOURCELEN);
    273272  feSprintf(value, config->fmt, -1);
    274273  return value;
     
    302301        printf("feInitResource: Set value of %s to =%s=\n", config->key, value);
    303302#endif
    304         config->value = omStrDup(value);
     303        config->value = strdup(value);
    305304        return config->value;
    306305      }
     
    322321      printf("value:%s\n", value);
    323322#endif
    324       omFree(executable);
     323      free(executable);
    325324    }
    326325  }
     
    362361    printf("feInitResource: Set value of %s to =%s=\n", config->key, value);
    363362#endif
    364     config->value = omStrDup(value);
     363    config->value = strdup(value);
    365364    return config->value;
    366365  }
     
    374373                                feCleanResourceValue(config->type, value)))
    375374      {
    376         config->value = omStrDup(value);
     375        config->value = strdup(value);
    377376#ifdef RESOURCE_DEBUG
    378377        printf("feInitResource: Set value of %s to =%s=\n", config->key, config->value);
     
    434433    return NULL;
    435434  }
    436   return omStrDup(value);
     435  return strdup(value);
    437436}
    438437
     
    519518        if (*(fn+2) == '.' && (*(fn + 3) == '/' || *(fn + 3) == '\0'))
    520519        {
    521         #if 0
    522         // this does not work: ./../../mmm will be changed to ./../mmm
    523         // but we only want to change ././mmm to ./mmm
     520        #if 0
     521        // this does not work: ./../../mmm will be changed to ./../mmm
     522        // but we only want to change ././mmm to ./mmm
    524523          *fn = '\0';
    525524          s = strrchr(fname, '/');
     
    533532            *fn = '/';
    534533          }
    535         #endif
     534        #endif
    536535        }
    537536        else if (*(fn+2) == '/' || *(fn+2) == '\0')
     
    572571  }
    573572
    574   path_comps = (char**) omAlloc(n_comps*sizeof(char*));
     573  path_comps = (char**) malloc(n_comps*sizeof(char*));
    575574  path_comps[0]=opath;
    576575  path=opath;
     
    652651    *opath = '\0';
    653652  }
    654   omFree(path_comps);
     653  free(path_comps);
    655654#ifdef RESOURCE_DEBUG
    656655  Print("feCleanUpPath: leaving with path=%s=\n", opath);
Note: See TracChangeset for help on using the changeset viewer.