Changes in / [5bc0f68:89f5338]


Ignore:
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • aim.c

    r34509d5 r9854278  
    948948 
    949949  if (modname) {
    950     if (!(filename = owl_malloc(strlen(priv->aimbinarypath)+1+strlen(modname)+4+1))) {
     950    if (!(filename = malloc(strlen(priv->aimbinarypath)+1+strlen(modname)+4+1))) {
    951951      /* perror("memrequest: malloc"); */
    952952      return -1;
     
    954954    sprintf(filename, "%s/%s.ocm", priv->aimbinarypath, modname);
    955955  } else {
    956     if (!(filename = owl_malloc(strlen(priv->aimbinarypath)+1+strlen(defaultmod)+1))) {
     956    if (!(filename = malloc(strlen(priv->aimbinarypath)+1+strlen(defaultmod)+1))) {
    957957      /* perror("memrequest: malloc"); */
    958958      return -1;
     
    964964    if (!modname) {
    965965      /* perror("memrequest: stat"); */
    966       owl_free(filename);
     966      free(filename);
    967967      return -1;
    968968    }
     
    986986    int i;
    987987   
    988     owl_free(filename); /* not needed */
     988    free(filename); /* not needed */
    989989    owl_function_error("getaimdata memrequest: recieved invalid request for 0x%08lx bytes at 0x%08lx (file %s)\n", len, offset, modname);
    990990    i = 8;
     
    993993    }
    994994   
    995     if (!(buf = owl_malloc(i))) {
     995    if (!(buf = malloc(i))) {
    996996      return -1;
    997997    }
     
    10171017    *buflenret = i;
    10181018  } else {
    1019     if (!(buf = owl_malloc(len))) {
    1020       owl_free(filename);
     1019    if (!(buf = malloc(len))) {
     1020      free(filename);
    10211021      return -1;
    10221022    }
     
    10241024    if (!(f = fopen(filename, "r"))) {
    10251025      /* perror("memrequest: fopen"); */
    1026       owl_free(filename);
    1027       owl_free(buf);
     1026      free(filename);
     1027      free(buf);
    10281028      return -1;
    10291029    }
    10301030   
    1031     owl_free(filename);
     1031    free(filename);
    10321032   
    10331033    if (fseek(f, offset, SEEK_SET) == -1) {
    10341034      /* perror("memrequest: fseek"); */
    10351035      fclose(f);
    1036       owl_free(buf);
     1036      free(buf);
    10371037      return -1;
    10381038    }
     
    10411041      /* perror("memrequest: fread"); */
    10421042      fclose(f);
    1043       owl_free(buf);
     1043      free(buf);
    10441044      return -1;
    10451045    }
     
    10761076  if (priv->aimbinarypath && (getaimdata(sess, &buf, &buflen, offset, len, modname) == 0)) {
    10771077    aim_sendmemblock(sess, fr->conn, offset, buflen, buf, AIM_SENDMEMBLOCK_FLAG_ISREQUEST);
    1078     owl_free(buf);
     1078    free(buf);
    10791079  } else {
    10801080    owl_function_debugmsg("faimtest_memrequest: unable to use AIM binary (\"%s/%s\"), sending defaults...\n", priv->aimbinarypath, modname);
     
    13421342      int z;
    13431343     
    1344       newbuf = owl_malloc(i+1);
     1344      newbuf = malloc(i+1);
    13451345      for (z = 0; z < i; z++)
    13461346        newbuf[z] = (z % 10)+0x30;
    13471347      newbuf[i] = '\0';
    13481348      /* aim_send_im(sess, userinfo->sn, AIM_IMFLAGS_ACK | AIM_IMFLAGS_AWAY, newbuf); */
    1349       owl_free(newbuf);
     1349      free(newbuf);
    13501350    }
    13511351  } else if (strstr(tmpstr, "seticqstatus")) {
  • cmd.c

    r34509d5 r6922edd  
    7474  owl_cmd *cmd;
    7575
    76   tmpbuff=owl_strdup(cmdbuff);
     76  tmpbuff=strdup(cmdbuff);
    7777  argv=owl_parseline(tmpbuff, &argc);
    7878  if (argc < 0) {
  • configure.in

    r34509d5 r18e28a4  
    1212fi
    1313
    14 dnl m4_include(/usr/share/aclocal/pkg.m4)
    15 m4_include(pkg.m4)
    1614
    1715dnl Check for Athena
     
    111109LDFLAGS=${LDFLAGS}\ ${FOO}
    112110
    113 dnl Add CFLAGS and LDFLAGS for glib-2.0
    114 PKG_CHECK_MODULES(GLIB,glib-2.0)
    115 
    116 echo Adding glib-2.0 CFLAGS ${GLIB_CFLAGS}
    117 CFLAGS=${CFLAGS}\ ${GLIB_CFLAGS}
    118 echo Adding glib-2.0 LDFLAGS ${GLIB_LIBS}
    119 LDFLAGS=${LDFLAGS}\ ${GLIB_LIBS}
    120 
    121 
    122111dnl Checks for typedefs, structures, and compiler characteristics.
    123112
  • functions.c

    r34509d5 r3939268  
    30233023  char *quoted;
    30243024
    3025   buff=owl_malloc(strlen(class)+strlen(inst)+strlen(recip)+100);
     3025  buff=malloc(strlen(class)+strlen(inst)+strlen(recip)+100);
    30263026  strcpy(buff, "class");
    30273027  if (!strcmp(class, "*")) {
     
    33273327          if (ret==0) {
    33283328            for (x=0; x<numlocs; x++) {
    3329               line=owl_malloc(strlen(location[x].host)+strlen(location[x].time)+strlen(location[x].tty)+100);
     3329              line=malloc(strlen(location[x].host)+strlen(location[x].time)+strlen(location[x].tty)+100);
    33303330              tmp=short_zuser(user);
    33313331              sprintf(line, "  %-10.10s %-24.24s %-12.12s  %20.20s\n",
     
    34333433          _exit(127);
    34343434        }
    3435         parsed=owl_realloc(parsed, sizeof(*parsed) * (myargc+1));
     3435        parsed=realloc(parsed, sizeof(*parsed) * (myargc+1));
    34363436        parsed[myargc] = NULL;
    34373437       
  • global.c

    r34509d5 rad15610  
    545545    len+=strlen(argv[i])+5;
    546546  }
    547   g->startupargs=owl_malloc(len+5);
     547  g->startupargs=malloc(len+5);
    548548
    549549  strcpy(g->startupargs, "");
  • message.c

    r34509d5 r6711361  
    493493{
    494494  if(m->zwriteline) owl_free(m->zwriteline);
    495   m->zwriteline=owl_strdup(line);
     495  m->zwriteline=strdup(line);
    496496}
    497497
     
    890890  }
    891891
    892   m->zwriteline=owl_strdup("");
     892  m->zwriteline=strdup("");
    893893
    894894  /* save the hostname */
     
    972972  }
    973973
    974   m->zwriteline=owl_strdup("");
     974  m->zwriteline=strdup("");
    975975
    976976  owl_message_set_body(m, "<uninitialized>");
  • owl.c

    r89f5338 r89f5338  
    4848#include <termios.h>
    4949#include <sys/stat.h>
    50 #include <locale.h>
    5150#include "owl.h"
    5251
     
    9392  debug=0;
    9493  initialsubs=1;
    95 
    96   setlocale(LC_ALL, "");
    97  
    9894  if (argc>0) {
    9995    argv++;
  • owl.h

    r34509d5 r18e28a4  
    5353#include <libfaim/aim.h>
    5454#include "config.h"
    55 #include "glib.h"
    5655#ifdef HAVE_LIBZEPHYR
    5756#include <zephyr/zephyr.h>
  • text.c

    r34509d5 r72db971  
    327327  tolen  = strlen(to);
    328328  fromlen  = strlen(from);
    329   out = owl_malloc(outlen);
     329  out = malloc(outlen);
    330330
    331331  while (in[inpos]) {
  • util.c

    r89f5338 r89f5338  
    446446void *owl_malloc(size_t size)
    447447{
    448   return(g_malloc(size));
     448  return(malloc(size));
    449449}
    450450
    451451void owl_free(void *ptr)
    452452{
    453   g_free(ptr);
     453  free(ptr);
    454454}
    455455
    456456char *owl_strdup(const char *s1)
    457457{
    458   return(g_strdup(s1));
     458  return(strdup(s1));
    459459}
    460460
    461461void *owl_realloc(void *ptr, size_t size)
    462462{
    463   return(g_realloc(ptr, size));
     463  return(realloc(ptr, size));
    464464}
    465465
  • zcrypt.c

    r34509d5 r9ceee9d  
    385385
    386386/* Build a space-separated string from argv from elements between start  *
    387  * and end - 1.  owl_malloc()'s the returned string. */
     387 * and end - 1.  malloc()'s the returned string. */
    388388char *BuildArgString(char **argv, int start, int end) {
    389389  int len = 1;
     
    397397
    398398  /* Allocate memory */
    399   result = (char *)owl_malloc(len);
     399  result = (char *)malloc(len);
    400400  if (result) {
    401401    /* Build the string */
     
    482482      /* Prepare result to be returned */
    483483      char *temp = keyfile;
    484       keyfile = (char *)owl_malloc(strlen(temp) + 1);
     484      keyfile = (char *)malloc(strlen(temp) + 1);
    485485      if (keyfile) {
    486486        strcpy(keyfile, temp);
     
    611611      }
    612612      use_buffer = TRUE;
    613       if ((inptr = inbuff = (char *)owl_malloc(MAX_RESULT)) == NULL) {
     613      if ((inptr = inbuff = (char *)malloc(MAX_RESULT)) == NULL) {
    614614        printf("Memory allocation error\n");
    615615        return FALSE;
     
    639639      printf("Could not run zwrite\n");
    640640      if (freein && inbuff) {
    641         owl_free(inbuff);
     641        free(inbuff);
    642642      }
    643643      return(FALSE);
     
    685685
    686686  /* Free the input buffer, if necessary */
    687   if (freein && inbuff) owl_free(inbuff);
     687  if (freein && inbuff) free(inbuff);
    688688
    689689  return(!error);
  • zwrite.c

    r34509d5 r1fe100c  
    9595      z->message=owl_strdup("");
    9696      while (myargc) {
    97         z->message=owl_realloc(z->message, strlen(z->message)+strlen(myargv[0])+5);
     97        z->message=realloc(z->message, strlen(z->message)+strlen(myargv[0])+5);
    9898        strcat(z->message, myargv[0]);
    9999        strcat(z->message, " ");
     
    113113    } else {
    114114      /* anything unattached is a recipient */
    115       owl_list_append_element(&(z->recips), owl_strdup(myargv[0]));
     115      owl_list_append_element(&(z->recips), strdup(myargv[0]));
    116116      myargv++;
    117117      myargc--;
     
    177177      z->zsig=owl_strdup(zsigzvar);
    178178    } else if (((pw=getpwuid(getuid()))!=NULL) && (pw->pw_gecos)) {
    179       z->zsig=owl_strdup(pw->pw_gecos);
     179      z->zsig=strdup(pw->pw_gecos);
    180180      ptr=strchr(z->zsig, ',');
    181181      if (ptr) {
Note: See TracChangeset for help on using the changeset viewer.