diff options
| author | maxim nikonov <maxim.nikonov@hqo.co> | 2026-02-06 18:12:40 +0500 |
|---|---|---|
| committer | maxim nikonov <maxim.nikonov@hqo.co> | 2026-02-06 18:12:40 +0500 |
| commit | b4995f979d127cea667b4e2b71c91e9db4ab52ef (patch) | |
| tree | fbebc775e10932bace8d6a7c3481b1ba200c64db /src/drivers/Xlib/Fl_Xlib_Graphics_Driver_font_x.cxx | |
| parent | 9575eb0a1ffa8150f70f88b5f6b55f342c3c0088 (diff) | |
wip
Diffstat (limited to 'src/drivers/Xlib/Fl_Xlib_Graphics_Driver_font_x.cxx')
| -rw-r--r-- | src/drivers/Xlib/Fl_Xlib_Graphics_Driver_font_x.cxx | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_font_x.cxx b/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_font_x.cxx index 8ba7fb908..176a388ae 100644 --- a/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_font_x.cxx +++ b/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_font_x.cxx @@ -159,7 +159,8 @@ const char* Fl_Xlib_Graphics_Driver::get_font_name(Fl_Font fnum, int* ap) { } // collect all the attribute words: - for (int n = 3; n <= 6; n++) { + int n; + for (n = 3; n <= 6; n++) { // get the next word: if (*e) e++; x = e; @@ -228,7 +229,8 @@ static int ultrasort(const void *aa, const void *bb) { // compare the family and all the attribute words: int atype = 0; int btype = 0; - for (int n = 2; n <= 6; n++) { + int n; + for (n = 2; n <= 6; n++) { int at = attribute(n,a); int bt = attribute(n,b); if (at < 0) { @@ -308,7 +310,8 @@ Fl_Font Fl_Xlib_Graphics_Driver::set_fonts(const char* xstarname) { if (!xlist) return (Fl_Font)fl_free_font; qsort(xlist, xlistsize, sizeof(*xlist), ultrasort); int used_xlist = 0; - for (int i=0; i<xlistsize;) { + int i; + for (i =0; i<xlistsize;) { int first_xlist = i; const char *p = xlist[i++]; char canon[1024]; @@ -359,7 +362,8 @@ int Fl_Xlib_Graphics_Driver::get_font_sizes(Fl_Font fnum, int*& sizep) { int listsize = s->n; if (listsize<0) listsize = -listsize; static int sizes[128]; int numsizes = 0; - for (int i = 0; i < listsize; i++) { + int i; + for (i = 0; i < listsize; i++) { char *q = s->xlist[i]; char *d = fl_find_fontsize(q); if (!d) continue; @@ -371,7 +375,8 @@ int Fl_Xlib_Graphics_Driver::get_font_sizes(Fl_Font fnum, int*& sizep) { int n; for (n = numsizes-1; n > 0; n--) if (sizes[n-1] < s) break; if (sizes[n] != s) { - for (int m = numsizes; m > n; m--) sizes[m] = sizes[m-1]; + int m; + for (m = numsizes; m > n; m--) sizes[m] = sizes[m-1]; sizes[n] = s; numsizes++; } @@ -392,7 +397,8 @@ Fl_Xlib_Font_Descriptor::Fl_Xlib_Font_Descriptor(const char* name) : Fl_Font_Des } # if HAVE_GL listbase = 0; - for (int u = 0; u < 64; u++) glok[u] = 0; + int u; + for (u = 0; u < 64; u++) glok[u] = 0; # endif } @@ -464,7 +470,8 @@ static const char *find_best_font(const char *fname, int size) { int matchedlength = 32767; int found_encoding = 0; int m = cnt; if (m<0) m = -m; - for (int n=0; n < m; n++) { + int n; + for (n =0; n < m; n++) { char* thisname = list[n]; if (fl_correct_encoding(thisname)) { if (!found_encoding) ptsize = 0; // force it to choose this |
