882be7eea9ec10c09a9ac1fc86dfb24c07eabafb braney Thu Feb 28 10:06:39 2013 -0800 move hasProtocol() function from common.c to net.c (code review #10278) diff --git src/lib/common.c src/lib/common.c index 1d498cd..ebefe42 100644 --- src/lib/common.c +++ src/lib/common.c @@ -3460,22 +3460,15 @@ } char *dateAddTo(char *date,char *format,int addYears,int addMonths,int addDays) /* Add years,months,days to a formatted date and returns the new date as a cloned string * format is a strptime/strftime format: %F = yyyy-mm-dd */ { char *newDate = needMem(12); struct tm tp; if (strptime(date,format, &tp)) { dateAdd(&tp,addYears,addMonths,addDays); // tp.tm_year only contains years since 1900 strftime(newDate,12,format,&tp); } return cloneString(newDate); // newDate is never freed! } - -boolean hasProtocol(char *urlOrPath) -/* Return TRUE if it looks like it has http://, ftp:// etc. */ -{ -return stringIn("://", urlOrPath) != NULL; -} -