Ignore:
Timestamp:
2015-02-20T22:50:54Z (9 years ago)
Author:
dequis <dx@…>
Branches:
master
Children:
0b9daac, 3d45471, 7733b8c
Parents:
af359b4
git-author:
Indent <please@…> (19-02-15 05:47:20)
git-committer:
dequis <dx@…> (20-02-15 22:50:54)
Message:

Reindent everything to K&R style with tabs

Used uncrustify, with the configuration file in ./doc/uncrustify.cfg

Commit author set to "Indent <please@…>" so that it's easier to
skip while doing git blame.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/yahoo/yahoo_util.c

    raf359b4 r5ebff60  
    2727#  define strrchr rindex
    2828# endif
    29 char *strchr (), *strrchr ();
     29char *strchr(), *strrchr();
    3030# if !HAVE_MEMCPY
    31 #  define memcpy(d, s, n) bcopy ((s), (d), (n))
    32 #  define memmove(d, s, n) bcopy ((s), (d), (n))
     31#  define memcpy(d, s, n) bcopy((s), (d), (n))
     32#  define memmove(d, s, n) bcopy((s), (d), (n))
    3333# endif
    3434#endif
     
    5757{
    5858        char **v;
    59         for(v = vector; *v; v++) {
     59
     60        for (v = vector; *v; v++) {
    6061                FREE(*v);
    6162        }
     
    6768        char ** vector;
    6869        char *s, *p;
    69         int i=0;
     70        int i = 0;
    7071        int l = strlen(sep);
    71         if(nelem <= 0) {
     72
     73        if (nelem <= 0) {
    7274                char * s;
    73                 nelem=0;
     75                nelem = 0;
    7476                if (*str) {
    75                         for(s=strstr(str, sep); s; s=strstr(s+l, sep),nelem++)
     77                        for (s = strstr(str, sep); s; s = strstr(s + l, sep), nelem++) {
    7678                                ;
    77                         if(strcmp(str+strlen(str)-l, sep))
     79                        }
     80                        if (strcmp(str + strlen(str) - l, sep)) {
    7881                                nelem++;
     82                        }
    7983                }
    8084        }
     
    8286        vector = y_new(char *, nelem + 1);
    8387
    84         for(p=str, s=strstr(p,sep); i<nelem && s; p=s+l, s=strstr(p,sep), i++) {
    85                 int len = s-p;
    86                 vector[i] = y_new(char, len+1);
     88        for (p = str, s = strstr(p, sep); i < nelem && s; p = s + l, s = strstr(p, sep), i++) {
     89                int len = s - p;
     90                vector[i] = y_new(char, len + 1);
    8791                strncpy(vector[i], p, len);
    8892                vector[i][len] = '\0';
    8993        }
    9094
    91         if(i<nelem && *str) /* str didn't end with sep, and str isn't empty */
     95        if (i < nelem && *str) { /* str didn't end with sep, and str isn't empty */
    9296                vector[i++] = strdup(p);
    93                        
     97        }
     98
    9499        vector[i] = NULL;
    95100
     
    100105{
    101106        void * new_chunk = malloc(n);
    102         if(new_chunk)
     107
     108        if (new_chunk) {
    103109                memcpy(new_chunk, addr, n);
     110        }
    104111        return new_chunk;
    105112}
Note: See TracChangeset for help on using the changeset viewer.