diff options
| author | Wilmer van der Gaast <wilmer@gaast.net> | 2006-09-17 17:56:16 +0200 | 
|---|---|---|
| committer | Wilmer van der Gaast <wilmer@gaast.net> | 2006-09-17 17:56:16 +0200 | 
| commit | 51fdc4512cc77fd6b59b582f27887657d7c3721e (patch) | |
| tree | 5adab982e6de97cadda93f3aaf631ce3343cb4cd /lib/misc.c | |
| parent | 8320a7a0012f868e5878a5a9f52676a5fece02e1 (diff) | |
add_cr() is not used anymore, and HTML entity handling got UTFized some time
ago already, so no need for that FIXME comment.
Diffstat (limited to 'lib/misc.c')
| -rw-r--r-- | lib/misc.c | 36 | 
1 files changed, 2 insertions, 34 deletions
| @@ -53,36 +53,6 @@ void strip_linefeed(gchar *text)  	g_free(text2);  } -char *add_cr(char *text) -{ -	char *ret = NULL; -	int count = 0, j; -	unsigned int i; - -	if (text[0] == '\n') -		count++; -	for (i = 1; i < strlen(text); i++) -		if (text[i] == '\n' && text[i - 1] != '\r') -			count++; - -	if (count == 0) -		return g_strdup(text); - -	ret = g_malloc0(strlen(text) + count + 1); - -	i = 0; j = 0; -	if (text[i] == '\n') -		ret[j++] = '\r'; -	ret[j++] = text[i++]; -	for (; i < strlen(text); i++) { -		if (text[i] == '\n' && text[i - 1] != '\r') -			ret[j++] = '\r'; -		ret[j++] = text[i]; -	} - -	return ret; -} -  char *normalize(const char *s)  {  	static char buf[BUF_LEN]; @@ -123,12 +93,10 @@ time_t get_time(int year, int month, int day, int hour, int min, int sec)  typedef struct htmlentity  { -	char code[8]; -	char is[4]; +	char code[7]; +	char is[3];  } htmlentity_t; -/* FIXME: This is ISO8859-1(5) centric, so might cause problems with other charsets. */ -  static const htmlentity_t ent[] =  {  	{ "lt",     "<" }, | 
