Pass blue zone index to BLUE action.
[ttfautohint.git] / src / tasort.c
blobd67352f398fb152142997de8ebfd6624ed946c55
1 /* tasort.c */
3 /* originally file `afangles.c' (2011-Mar-28) from FreeType */
5 /* heavily modified 2011 by Werner Lemberg <wl@gnu.org> */
7 #include "tatypes.h"
8 #include "tasort.h"
11 /* two bubble sort routines */
13 void
14 ta_sort_pos(FT_UInt count,
15 FT_Pos* table)
17 FT_UInt i;
18 FT_UInt j;
19 FT_Pos swap;
22 for (i = 1; i < count; i++)
24 for (j = i; j > 0; j--)
26 if (table[j] > table[j - 1])
27 break;
29 swap = table[j];
30 table[j] = table[j - 1];
31 table[j - 1] = swap;
37 void
38 ta_sort_widths(FT_UInt count,
39 TA_Width table)
41 FT_UInt i;
42 FT_UInt j;
43 TA_WidthRec swap;
46 for (i = 1; i < count; i++)
48 for (j = i; j > 0; j--)
50 if (table[j].org > table[j - 1].org)
51 break;
53 swap = table[j];
54 table[j] = table[j - 1];
55 table[j - 1] = swap;
60 /* end of tasort.c */