diff options
| author | Albrecht Schlosser <albrechts.fltk@online.de> | 2012-04-05 14:30:19 +0000 |
|---|---|---|
| committer | Albrecht Schlosser <albrechts.fltk@online.de> | 2012-04-05 14:30:19 +0000 |
| commit | 8ed93f0065ab560c8b4b5a7a1924506eeda5e06e (patch) | |
| tree | ebb2ea88e41627af0e9e22fc5b546aa312fed1f4 /src | |
| parent | 8809c5d65dd20895dcae90e9d2af05fd271f2e9e (diff) | |
fix a typo and indenting.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9326 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
| -rw-r--r-- | src/Fl_File_Chooser2.cxx | 10 | ||||
| -rw-r--r-- | src/Fl_Input_.cxx | 2 | ||||
| -rw-r--r-- | src/fl_draw.cxx | 2 | ||||
| -rw-r--r-- | src/fl_plastic.cxx | 10 | ||||
| -rw-r--r-- | src/fl_set_fonts_win32.cxx | 20 |
5 files changed, 22 insertions, 22 deletions
diff --git a/src/Fl_File_Chooser2.cxx b/src/Fl_File_Chooser2.cxx index 7abc48bc0..de519ee5b 100644 --- a/src/Fl_File_Chooser2.cxx +++ b/src/Fl_File_Chooser2.cxx @@ -951,16 +951,16 @@ Fl_File_Chooser::fileNameCB() } else if (max_match > min_match && first_line) { // Add the matching portion... fileName->replace( - (int) (filename - pathname), - (int) (filename - pathname + min_match), - matchname); + (int) (filename - pathname), + (int) (filename - pathname + min_match), + matchname); // Highlight it with the cursor at the end of the selection so // s/he can press the right arrow to accept the selection // (Tab and End also do this for both cases.) fileName->position( - (int) (filename - pathname + max_match), - (int) (filename - pathname + min_match)); + (int) (filename - pathname + max_match), + (int) (filename - pathname + min_match)); } else if (max_match == 0) { fileList->deselect(0); fileList->redraw(); diff --git a/src/Fl_Input_.cxx b/src/Fl_Input_.cxx index 9d13bd863..da3d8e3ba 100644 --- a/src/Fl_Input_.cxx +++ b/src/Fl_Input_.cxx @@ -461,7 +461,7 @@ int Fl_Input_::line_end(int i) const { for (const char* p=value()+j; ;) { char buf[MAXBUF]; p = expand(p, buf); - int k = (int) (p-value()); + int k = (int) (p-value()); if (k >= i) return k; p++; } diff --git a/src/fl_draw.cxx b/src/fl_draw.cxx index 46ca4bdec..eb40290ef 100644 --- a/src/fl_draw.cxx +++ b/src/fl_draw.cxx @@ -303,7 +303,7 @@ void fl_draw( callthis(buf,buflen,xpos,ypos-desc); if (underline_at && underline_at >= buf && underline_at < (buf + buflen)) - callthis("_",1,xpos+int(fl_width(buf,(int) (underline_at-buf))),ypos-desc); + callthis("_",1,xpos+int(fl_width(buf,(int) (underline_at-buf))),ypos-desc); if (!*e || (*e == '@' && e[1] != '@')) break; p = e; diff --git a/src/fl_plastic.cxx b/src/fl_plastic.cxx index dd70a2bbc..6ded6fec7 100644 --- a/src/fl_plastic.cxx +++ b/src/fl_plastic.cxx @@ -145,11 +145,11 @@ static void frame_round(int x, int y, int w, int h, const char *c, Fl_Color bc) static void shade_rect(int x, int y, int w, int h, const char *c, Fl_Color bc) { - uchar *g = fl_gray_ramp(); - int i, j; + uchar *g = fl_gray_ramp(); + int i, j; int clen = (int) strlen(c) - 1; int chalf = clen / 2; - int cstep = 1; + int cstep = 1; if (h < (w * 2)) { // Horizontal shading... @@ -217,8 +217,8 @@ static void shade_rect(int x, int y, int w, int h, const char *c, Fl_Color bc) { } static void shade_round(int x, int y, int w, int h, const char *c, Fl_Color bc) { - uchar *g = fl_gray_ramp(); - int i; + uchar *g = fl_gray_ramp(); + int i; int clen = (int) (strlen(c) - 1); int chalf = clen / 2; diff --git a/src/fl_set_fonts_win32.cxx b/src/fl_set_fonts_win32.cxx index 604ac2817..be7f48594 100644 --- a/src/fl_set_fonts_win32.cxx +++ b/src/fl_set_fonts_win32.cxx @@ -69,7 +69,7 @@ enumcbw(CONST LOGFONTW *lpelf, dstlen = fl_utf8fromwc(n, dstlen, (xchar*)lpelf->lfFaceName, (unsigned) l); // convert the string n[dstlen] = 0; for (int i=0; i<FL_FREE_FONT; i++) // skip if one of our built-in fonts - if (!strcmp(Fl::get_font_name((Fl_Font)i),n)) {free(n);return 1;} + if (!strcmp(Fl::get_font_name((Fl_Font)i),n)) {free(n);return 1;} char buffer[LF_FACESIZE + 1]; strcpy(buffer+1, n); buffer[0] = ' '; Fl::set_font((Fl_Font)(fl_free_font++), strdup(buffer)); @@ -86,7 +86,7 @@ Fl_Font Fl::set_fonts(const char* xstarname) { if (fl_free_font == FL_FREE_FONT) {// if not already been called if (!fl_gc) fl_GetDC(0); - EnumFontFamiliesW(fl_gc, NULL, (FONTENUMPROCW)enumcbw, xstarname != 0); + EnumFontFamiliesW(fl_gc, NULL, (FONTENUMPROCW)enumcbw, xstarname != 0); } return (Fl_Font)fl_free_font; @@ -145,14 +145,14 @@ Fl::get_font_sizes(Fl_Font fnum, int*& sizep) { // int l = fl_utf_nb_char((unsigned char*)s->name+1, strlen(s->name+1)); // unsigned short *b = (unsigned short*) malloc((l + 1) * sizeof(short)); // fl_utf2unicode((unsigned char*)s->name+1, l, (xchar*)b); - const char *nm = (const char*)s->name+1; - size_t len = strlen(s->name+1); - unsigned l = fl_utf8toUtf16(nm, (unsigned) len, NULL, 0); // Pass NULL to query length required - unsigned short *b = (unsigned short*) malloc((l + 1) * sizeof(short)); - l = fl_utf8toUtf16(nm, (unsigned) len, b, (l+1)); // Now do the conversion - b[l] = 0; - EnumFontFamiliesW(fl_gc, (WCHAR*)b, (FONTENUMPROCW)EnumSizeCbW, 0); - free(b); + const char *nm = (const char*)s->name+1; + size_t len = strlen(s->name+1); + unsigned l = fl_utf8toUtf16(nm, (unsigned) len, NULL, 0); // Pass NULL to query length required + unsigned short *b = (unsigned short*) malloc((l + 1) * sizeof(short)); + l = fl_utf8toUtf16(nm, (unsigned) len, b, (l+1)); // Now do the conversion + b[l] = 0; + EnumFontFamiliesW(fl_gc, (WCHAR*)b, (FONTENUMPROCW)EnumSizeCbW, 0); + free(b); sizep = sizes; return nbSize; |
