Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- scan_string (char *s)
- {
- int length = strlen (s);
- /* Initialize shift state. */
- mblen (NULL, 0);
- while (1)
- {
- int thischar = mblen (s, length);
- /* Deal with end of string and invalid characters. */
- if (thischar == 0)
- break;
- if (thischar == -1)
- {
- error ("invalid multibyte characters.");
- break;
- }
- /* Advance past this character. */
- a += thischar;
- length -= thischar;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement