Back to index

lightning-sunbird  0.9+nobinonly
Functions
affentry.cpp File Reference
#include "license.readme"
#include <ctype.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include "affentry.hxx"

Go to the source code of this file.

Functions

char * mystrdup (const char *s)
char * myrevstrdup (const char *s)

Function Documentation

char* myrevstrdup ( const char *  s)

Definition at line 75 of file csutil.cpp.

{
    char * d = NULL;
    if (s) {
       int sl = strlen(s);
       d = (char *) malloc((sl+1) * sizeof(char));
       if (d) {
        const char * p = s + sl - 1;
         char * q = d;
         while (p >= s) *q++ = *p--;
         *q = '\0';
       }
    }
    return d; 
}

Here is the caller graph for this function:

char* mystrdup ( const char *  s)

Definition at line 53 of file csutil.cpp.

{
  char * d = NULL;
  if (s) {
     int sl = strlen(s);
     d = (char *) malloc(((sl+1) * sizeof(char)));
     if (d) memcpy(d,s,((sl+1)*sizeof(char)));
  }
  return d;
}

Here is the caller graph for this function: