Revision: 14678 Author: adrian.chadd Date: Wed May 19 20:32:32 2010 Log: Break out another ftp function
http://code.google.com/p/lusca-cache/source/detail?r=14678 Modified: /branches/LUSCA_HEAD/libsqftp/ftp_util.c /branches/LUSCA_HEAD/libsqftp/ftp_util.h /branches/LUSCA_HEAD/src/ftp.c ======================================= --- /branches/LUSCA_HEAD/libsqftp/ftp_util.c Wed May 19 20:24:38 2010 +++ /branches/LUSCA_HEAD/libsqftp/ftp_util.c Wed May 19 20:32:32 2010 @@ -8,6 +8,22 @@ #include <assert.h> #include "../include/util.h" + +static const char *Month[] = +{ + "Jan", "Feb", "Mar", "Apr", "May", "Jun", + "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" +}; + +int +is_month(const char *buf) +{ + int i; + for (i = 0; i < 12; i++) + if (!strcasecmp(buf, Month[i])) + return 1; + return 0; +} /* escapes any IAC (0xFF) characters. Returns a new string */ char * ======================================= --- /branches/LUSCA_HEAD/libsqftp/ftp_util.h Wed May 19 20:24:38 2010 +++ /branches/LUSCA_HEAD/libsqftp/ftp_util.h Wed May 19 20:32:32 2010 @@ -3,5 +3,6 @@ extern char * escapeIAC(const char *buf); extern char * decodeTelnet(char *buf); +extern int is_month(const char *buf); #endif ======================================= --- /branches/LUSCA_HEAD/src/ftp.c Wed May 19 20:29:09 2010 +++ /branches/LUSCA_HEAD/src/ftp.c Wed May 19 20:32:32 2010 @@ -392,23 +392,6 @@ visible_appname_string); storeAppendPrintf(e, "</ADDRESS></BODY></HTML>\n"); } - -static const char *Month[] = -{ - "Jan", "Feb", "Mar", "Apr", "May", "Jun", - "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" -}; - -static int -is_month(const char *buf) -{ - int i; - for (i = 0; i < 12; i++) - if (!strcasecmp(buf, Month[i])) - return 1; - return 0; -} - static void ftpListPartsFree(ftpListParts ** parts) -- You received this message because you are subscribed to the Google Groups "lusca-commit" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/lusca-commit?hl=en.
