This source file includes following definitions.
- main
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 #include <config.h>
20
21 #include "unilbrk.h"
22
23 #include <stdlib.h>
24
25 #include "macros.h"
26
27 int
28 main ()
29 {
30
31 ulc_width_linebreaks (NULL, 0, 80, 0, 0, NULL, "GB18030", NULL);
32
33 #if HAVE_ICONV
34 {
35 static const char input[36] =
36
37 "Gr\374\337 Gott. x=(-b\261sqrt(b\262-4ac))/(2a)\n";
38 char *p = (char *) malloc (SIZEOF (input));
39 size_t i;
40
41 ulc_width_linebreaks (input, SIZEOF (input), 12, 0, 0, NULL, "ISO-8859-1", p);
42 for (i = 0; i < 36; i++)
43 {
44 ASSERT (p[i] == (i == 35 ? UC_BREAK_MANDATORY :
45 i == 11 || i == 16 || i == 31 ? UC_BREAK_POSSIBLE :
46 UC_BREAK_PROHIBITED));
47 }
48 free (p);
49 }
50 #endif
51
52 return 0;
53 }