Changeset 481 for trunk/src/sh_string.c


Ignore:
Timestamp:
Jul 18, 2015, 5:06:52 PM (6 years ago)
Author:
katerina
Message:

Enhancements and fixes for tickets #374, #375, #376, #377, #378, and #379.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/sh_string.c

    r383 r481  
    1313
    1414extern int sl_ok_adds (size_t a, size_t b);
    15 #define SL_TRUE  1
    16 #define SL_FALSE 0
     15#define S_TRUE  1
     16#define S_FALSE 0
    1717
    1818#include <ctype.h>
     
    389389sh_string * sh_string_cat_lchar(sh_string * s, const char * str, size_t len)
    390390{
    391   if (sl_ok_adds(len, s->siz) == SL_TRUE)
     391  if (sl_ok_adds(len, s->siz) == S_TRUE)
    392392    {
    393393      if ((len + 1 + s->len) > s->siz)
     
    453453  size_t len = 0;
    454454
    455   if (sl_ok_adds(len1, len2) == SL_TRUE)
     455  if (sl_ok_adds(len1, len2) == S_TRUE)
    456456    len    = len1 + len2;
    457457  else
    458458    return NULL;
    459   if (sl_ok_adds( len, len3) == SL_TRUE)
     459  if (sl_ok_adds( len, len3) == S_TRUE)
    460460    len    = len  + len3;
    461461  else
     
    482482    increase = SH_STRING_PARCEL;
    483483 
    484   if (s && sl_ok_adds(s->siz, increase) == SL_TRUE)
     484  if (s && sl_ok_adds(s->siz, increase) == S_TRUE)
    485485    {
    486486      new = SH_ALLOC(s->siz + increase);
Note: See TracChangeset for help on using the changeset viewer.