Update of /cvsroot/mahogany/M/include
In directory usw-pr-cvs1:/tmp/cvs-serv5760/include
Modified Files:
strutil.h
Log Message:
use Xavier's Aho-Cora code instead of the old awfully inefficient version for the URL
matching
Index: strutil.h
===================================================================
RCS file: /cvsroot/mahogany/M/include/strutil.h,v
retrieving revision 1.55
retrieving revision 1.56
diff -b -u -2 -r1.55 -r1.56
--- strutil.h 16 Apr 2002 19:15:32 -0000 1.55
+++ strutil.h 25 Apr 2002 18:25:41 -0000 1.56
@@ -126,5 +126,5 @@
@param the string to duplicate
- @return the newly allocated string, must be deleted by caller
+ @return the newly allocated string, must be deleted[] by caller
*/
char * strutil_strdup(const char *in);
@@ -133,24 +133,8 @@
@param the string to duplicate
- @return the newly allocated string, must be deleted by caller
+ @return the newly allocated string, must be deleted[] by caller
*/
char *strutil_strdup(String const &in);
-/* * Duplicate a string.
-
- @param the string to duplicate
- @return the newly allocated string, must be deleted by caller
-
-char *strutil_strdup(String const *in)
-{
- return in ? strutil_strdup(in->c_str()) : NULL;
-}
-*/
-
-/*
-
-void strutil_splitlist(String const &str, std::map<String,String> &table);
- */
-
/**
This takes the string and splits it into tokens delimited by the
@@ -163,22 +147,15 @@
void strutil_tokenise(char *string, const char *delim, kbStringList &tlist);
-/** Check whether string starts with an URL, if so, return URL.
- @param string the string to check
- @return either the url or an empty string
- */
-String strutil_matchurl(const char *string);
+/** Find a next URL in the string.
+
+ Note: this is implemented in matchurl.cpp, not strutil.cpp
-/** Checks string for next URL
@param str the string to examine
@param url where to store the url
- @return the component of the string before url, sets str to part
- after url
+ @return the component of the string before url, sets str to part after url
*/
String
strutil_findurl(String &str, String &url);
-/// extracts the last path component from a path
-String strutil_getfilename(const String& path);
-
/** Count levels of quoting on the first line of passed string
(i.e. before the first \n). It understands standard e-mail
@@ -205,9 +182,6 @@
String strutil_extract_formatspec(const char *format);
-/// checks a character to be a valid part of an URL
-inline bool strutil_isurlchar(char c)
-{
- return isalnum(c) || strchr("./:_&#-%~!?*+$@=,;", c);
-}
+/// extracts the last path component from a path
+String strutil_getfilename(const String& path);
/// If path is an absolute path, return true.
_______________________________________________
Mahogany-cvsupdates mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates