Changeset 489


Ignore:
Timestamp:
Jun 5, 2006 11:05:39 PM (18 years ago)
Author:
ismangil
Message:

Added snprint/vsnprintf wrapper

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/branches/symbian/pjlib/src/pj/compat/string.c

    r65 r489  
    2121#include <pj/ctype.h> 
    2222 
     23#if defined(PJ_HAS_STRING_H) && PJ_HAS_STRING_H != 0 
     24/* Nothing to do */ 
     25#else 
    2326PJ_DEF(int) strcasecmp(const char *s1, const char *s2) 
    2427{ 
     
    4245    return (pj_tolower(*s1) < pj_tolower(*s2)) ? -1 : 1; 
    4346} 
     47#endif 
    4448 
     49#if defined(PJ_HAS_NO_SNPRINTF) && PJ_HAS_NO_SNPRINTF != 0 
     50 
     51PJ_DEF(int) snprintf(char *s1, pj_size_t len, const char *s2, ...) 
     52{ 
     53    int ret; 
     54     
     55    va_list arg; 
     56    va_start(arg, s2); 
     57    ret = vsprintf(s1, s2, arg); 
     58    va_end(arg); 
     59     
     60    return ret; 
     61} 
     62 
     63PJ_DEF(int) vsnprintf(char *s1, pj_size_t len, const char *s2, va_list arg) 
     64{ 
     65    return vsprintf(s1,s2,arg); 
     66} 
     67 
     68#endif 
     69 
Note: See TracChangeset for help on using the changeset viewer.