git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8398 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Manolo Gouy
2011-02-07 16:04:59 +00:00
parent 97bafa2e04
commit d140f4f3be
+3 -4
View File
@@ -3,7 +3,7 @@
//
// Label drawing code for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2010 by Bill Spitzak and others.
// Copyright 1998-2011 by Bill Spitzak and others.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
@@ -32,7 +32,6 @@
// Expands all unprintable characters to ^X or \nnn notation
// Aligns them against the inside of the box.
#define min(a,b) ((a)<(b)?(a):(b))
#include <FL/fl_utf8.h>
#include <FL/Fl.H>
#include <FL/fl_draw.H>
@@ -216,12 +215,12 @@ void fl_draw(
*symptr++ = *str++);
*symptr = '\0';
if (isspace(*str)) str++;
symwidth[0] = min(w,h);
symwidth[0] = (w < h ? w : h);
}
if (str && (p = strrchr(str, '@')) != NULL && p > (str + 1) && p[-1] != '@') {
strlcpy(symbol[1], p, sizeof(symbol[1]));
symwidth[1] = min(w,h);
symwidth[1] = (w < h ? w : h);
}
}