/* Removes leading and/or trailing whitespaces
- Copyright (C) 2006-2008 Free Software Foundation, Inc.
+ Copyright (C) 2006-2011 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#endif
char *
-trim2(const char *s, int how)
+trim2 (const char *s, int how)
{
char *d;
- d = strdup(s);
+ d = strdup (s);
if (!d)
- xalloc_die();
+ xalloc_die ();
if (MB_CUR_MAX > 1)
{
/* Trim trailing whitespaces. */
if (how != TRIM_LEADING)
{
- int state = 0;
+ unsigned int state = 0;
char *r IF_LINT (= NULL); /* used only while state = 2 */
mbi_init (i, d, strlen (d));
return d;
}
-