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
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
- {
- int state = 0;
- char *r IF_LINT (= NULL); /* used only while state = 2 */
-
- mbi_init (i, d, strlen (d));
-
- for (; mbi_avail (i); mbi_advance (i))
- {
- if (state == 0 && mb_isspace (mbi_cur (i)))
- {
- state = 0;
- continue;
- }
-
- if (state == 0 && !mb_isspace (mbi_cur (i)))
- {
- state = 1;
- continue;
- }
-
- if (state == 1 && !mb_isspace (mbi_cur (i)))
- {
- state = 1;
- continue;
- }
-
- if (state == 1 && mb_isspace (mbi_cur (i)))
- {
- state = 2;
- r = (char *) mbi_cur_ptr (i);
- }
- else if (state == 2 && mb_isspace (mbi_cur (i)))
- {
- state = 2;
- }
- else
- {
- state = 1;
- }
- }
-
- if (state == 2)
- *r = '\0';
- }
+ {
+ int state = 0;
+ char *r IF_LINT (= NULL); /* used only while state = 2 */
+
+ mbi_init (i, d, strlen (d));
+
+ for (; mbi_avail (i); mbi_advance (i))
+ {
+ if (state == 0 && mb_isspace (mbi_cur (i)))
+ {
+ state = 0;
+ continue;
+ }
+
+ if (state == 0 && !mb_isspace (mbi_cur (i)))
+ {
+ state = 1;
+ continue;
+ }
+
+ if (state == 1 && !mb_isspace (mbi_cur (i)))
+ {
+ state = 1;
+ continue;
+ }
+
+ if (state == 1 && mb_isspace (mbi_cur (i)))
+ {
+ state = 2;
+ r = (char *) mbi_cur_ptr (i);
+ }
+ else if (state == 2 && mb_isspace (mbi_cur (i)))
+ {
+ state = 2;
+ }
+ else
+ {
+ state = 1;
+ }
+ }
+
+ if (state == 2)
+ *r = '\0';
+ }