summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorBill Spitzak <spitzak@gmail.com>1999-07-27 17:24:14 +0000
committerBill Spitzak <spitzak@gmail.com>1999-07-27 17:24:14 +0000
commitf7e0e7627f94f98d4a8955ceb6f84106dc0b12a2 (patch)
treeac724296423a36c80db8fd539988868e63984a21 /test
parentdf045b0e36f08c7d6ae4884667744203057d95c8 (diff)
Can draw xpm pixmaps with spaces in the color names (such as the ones in
/usr/X11/include/X11/icons). Esc closes the modal window, not the window the cursor is in, if a modal window is up. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@632 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'test')
-rw-r--r--test/pixmap_browser.cxx11
1 files changed, 6 insertions, 5 deletions
diff --git a/test/pixmap_browser.cxx b/test/pixmap_browser.cxx
index 13cd41dde..92f793372 100644
--- a/test/pixmap_browser.cxx
+++ b/test/pixmap_browser.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: pixmap_browser.cxx,v 1.5 1999/01/07 19:18:00 mike Exp $"
+// "$Id: pixmap_browser.cxx,v 1.5.2.1 1999/07/27 17:24:14 bill Exp $"
//
// Another pixmap test program for the Fast Light Tool Kit (FLTK).
//
@@ -61,16 +61,17 @@ int load_file(const char *name) {
if (data) {
for (int i=numlines; i--;) delete[] data[i];
}
- char buffer[1024];
+#define BUFSIZE 2048
+ char buffer[BUFSIZE];
int i = 0;
- while (fgets(buffer,1024,f)) {
+ while (fgets(buffer, BUFSIZE, f)) {
if (buffer[0] != '\"') continue;
char *p = buffer;
char *q = buffer+1;
while (*q != '\"') {
if (*q == '\\') switch (*++q) {
case '\n':
- fgets(q,(buffer+1024)-q,f); break;
+ fgets(q,(buffer+BUFSIZE)-q,f); break;
case 0:
break;
case 'x': {
@@ -164,5 +165,5 @@ int main(int argc, char **argv) {
}
//
-// End of "$Id: pixmap_browser.cxx,v 1.5 1999/01/07 19:18:00 mike Exp $".
+// End of "$Id: pixmap_browser.cxx,v 1.5.2.1 1999/07/27 17:24:14 bill Exp $".
//