883 |
|
|
884 |
tm_now= localtime(&now); |
tm_now= localtime(&now); |
885 |
|
|
886 |
if(!strftime(D, STRLEN, "%a, %d %b %Y %H:%M:%S %z", tm_now)) { |
if(strftime(D, STRLEN, "%a, %d %b %Y %H:%M:%S %z", tm_now) <= 0) { |
887 |
|
|
888 |
return NULL; |
return NULL; |
889 |
|
|
1097 |
* Do printf style format line parsing |
* Do printf style format line parsing |
1098 |
* @param s format string |
* @param s format string |
1099 |
* @param ap variable argument list |
* @param ap variable argument list |
1100 |
|
* @param len The lenght of the bytes written, |
1101 |
|
* may be different from the returned allocated buffer size |
1102 |
* @return buffer with parsed string |
* @return buffer with parsed string |
1103 |
*/ |
*/ |
1104 |
char *format(const char *s, va_list ap) { |
char *format(const char *s, va_list ap, long *len) { |
1105 |
|
|
1106 |
int n; |
int n; |
1107 |
int size= STRLEN; |
int size= STRLEN; |
1124 |
buf= xresize(buf, size); |
buf= xresize(buf, size); |
1125 |
|
|
1126 |
} |
} |
1127 |
|
|
1128 |
|
*len= n; |
1129 |
|
|
1130 |
return buf; |
return buf; |
1131 |
|
|