… | |
… | |
230 | void |
230 | void |
231 | rxvt_exit_failure () THROW ((class rxvt_failure_exception)) |
231 | rxvt_exit_failure () THROW ((class rxvt_failure_exception)) |
232 | { |
232 | { |
233 | static class rxvt_failure_exception rxvt_failure_exception; |
233 | static class rxvt_failure_exception rxvt_failure_exception; |
234 | throw (rxvt_failure_exception); |
234 | throw (rxvt_failure_exception); |
235 | } |
|
|
236 | |
|
|
237 | /* |
|
|
238 | * check that the first characters of S1 match S2 |
|
|
239 | * |
|
|
240 | * No Match |
|
|
241 | * return: 0 |
|
|
242 | * Match |
|
|
243 | * return: strlen (S2) |
|
|
244 | */ |
|
|
245 | int |
|
|
246 | rxvt_Str_match (const char *s1, const char *s2) NOTHROW |
|
|
247 | { |
|
|
248 | int n = strlen (s2); |
|
|
249 | |
|
|
250 | return ((strncmp (s1, s2, n) == 0) ? n : 0); |
|
|
251 | } |
|
|
252 | |
|
|
253 | const char * |
|
|
254 | rxvt_Str_skip_space (const char *str) NOTHROW |
|
|
255 | { |
|
|
256 | if (str) |
|
|
257 | while (*str && isspace (*str)) |
|
|
258 | str++; |
|
|
259 | |
|
|
260 | return str; |
|
|
261 | } |
235 | } |
262 | |
236 | |
263 | /* |
237 | /* |
264 | * remove leading/trailing space and strip-off leading/trailing quotes. |
238 | * remove leading/trailing space and strip-off leading/trailing quotes. |
265 | * in place. |
239 | * in place. |