| 130 int state = 0; |
130 int state = 0; |
| 131 |
131 |
| 132 for (pos = 0; pos < strlen(m); pos++) { |
132 for (pos = 0; pos < strlen(m); pos++) { |
| 133 switch (state) { |
133 switch (state) { |
| 134 case 0: /* expecting word */ |
134 case 0: /* expecting word */ |
| 135 if (!isspace(m[pos]) && !ispunct(m[pos])) { |
135 if (!g_ascii_isspace(m[pos]) && !g_ascii_ispunct(m[pos])) { |
| 136 count++; |
136 count++; |
| 137 state = 1; |
137 state = 1; |
| 138 } else if (m[pos] == '<') |
138 } else if (m[pos] == '<') |
| 139 state = 2; |
139 state = 2; |
| 140 break; |
140 break; |
| 141 case 1: /* inside word */ |
141 case 1: /* inside word */ |
| 142 if (m[pos] == '<') |
142 if (m[pos] == '<') |
| 143 state = 2; |
143 state = 2; |
| 144 else if (isspace(m[pos]) || ispunct(m[pos])) |
144 else if (g_ascii_isspace(m[pos]) || g_ascii_ispunct(m[pos])) |
| 145 state = 0; |
145 state = 0; |
| 146 break; |
146 break; |
| 147 case 2: /* inside HTML tag */ |
147 case 2: /* inside HTML tag */ |
| 148 if (m[pos] == '>') |
148 if (m[pos] == '>') |
| 149 state = 0; |
149 state = 0; |
| 347 gtk_widget_set_sensitive((GtkWidget*)data, is); |
347 gtk_widget_set_sensitive((GtkWidget*)data, is); |
| 348 } |
348 } |
| 349 |
349 |
| 350 static gboolean non_empty(const char *s) |
350 static gboolean non_empty(const char *s) |
| 351 { |
351 { |
| 352 while(*s && isspace(*s)) |
352 while(*s && g_ascii_isspace(*s)) |
| 353 s++; |
353 s++; |
| 354 return *s; |
354 return *s; |
| 355 } |
355 } |
| 356 |
356 |
| 357 static void on_entry_changed(GtkEditable *editable, gpointer data) |
357 static void on_entry_changed(GtkEditable *editable, gpointer data) |