summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/CubeMain.cxx2
-rw-r--r--test/Makefile12
-rw-r--r--test/checkers.cxx2
-rw-r--r--test/cube.cxx2
-rw-r--r--test/file_chooser.cxx27
-rw-r--r--test/fractals.cxx2
-rw-r--r--test/fullscreen.cxx2
-rw-r--r--test/gl_overlay.cxx2
-rw-r--r--test/glpuzzle.cxx2
-rw-r--r--test/list_visuals.cxx2
-rw-r--r--test/makedepend22
-rw-r--r--test/shape.cxx2
-rw-r--r--test/threads.cxx2
13 files changed, 42 insertions, 39 deletions
diff --git a/test/CubeMain.cxx b/test/CubeMain.cxx
index 3e80c55a3..a2b283126 100644
--- a/test/CubeMain.cxx
+++ b/test/CubeMain.cxx
@@ -23,7 +23,7 @@
// Please report all bugs and problems to "fltk-bugs@fltk.org".
//
-#include <config.h>
+#include "config.h"
#include <FL/Fl.H>
#include "CubeViewUI.h"
diff --git a/test/Makefile b/test/Makefile
index 49eb45770..6730f6068 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -167,14 +167,18 @@ depend: $(CPPFILES)
include makedepend
clean:
- -@ rm -f $(ALL) $(GLALL) *.o core *~
+ -$(RM) $(ALL) $(GLALL) core
+ -$(RM) *.o core.* *~ *.bck *.bak
install:
- @echo Nothing to install in test directory.
+ echo "Installing example programs to $(DESTDIR)$(docdir)/examples..."
+ -$(MKDIR) $(DESTDIR)$(docdir)/examples
+ $(CP) *.h *.cxx *.fl $(DESTDIR)$(docdir)/examples
+ $(CHMOD) 644 $(DESTDIR)$(docdir)/examples/*.*
uninstall:
- @echo Nothing to uninstall in test directory.
-
+ echo "Removing examples programs from $(DESTDIR)$(docdir)/examples..."
+ -$(RMDIR) $(DESTDIR)$(docdir)/examples
# FLUID file rules
.fl.cxx .fl.h: ../fluid/fluid$(EXEEXT)
diff --git a/test/checkers.cxx b/test/checkers.cxx
index 83eb1b7f2..cf5f37c1a 100644
--- a/test/checkers.cxx
+++ b/test/checkers.cxx
@@ -56,7 +56,7 @@ const char* copyright =
#define FLTK
//#define VT100
-#include "../src/flstring.h"
+#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <stdarg.h>
diff --git a/test/cube.cxx b/test/cube.cxx
index e72daab2f..8f13d3be7 100644
--- a/test/cube.cxx
+++ b/test/cube.cxx
@@ -25,7 +25,7 @@
// Please report all bugs and problems to "fltk-bugs@fltk.org".
//
-#include <config.h>
+#include "config.h"
#include <FL/Fl.H>
#include <FL/Fl_Window.H>
#include <FL/Fl_Box.H>
diff --git a/test/file_chooser.cxx b/test/file_chooser.cxx
index f0867b627..a595e4df6 100644
--- a/test/file_chooser.cxx
+++ b/test/file_chooser.cxx
@@ -44,7 +44,7 @@
#include <FL/Fl_Shared_Image.H>
#include <FL/Fl_PNM_Image.H>
#include <FL/Fl_Light_Button.H>
-#include "../src/flstring.h"
+#include <string.h>
//
@@ -220,12 +220,12 @@ pdf_check(const char *name, // I - Name of file
return 0;
home = getenv("HOME");
- snprintf(preview, sizeof(preview), "%s/.preview.ppm", home ? home : "");
+ sprintf(preview, "%s/.preview.ppm", home ? home : "");
- snprintf(command, sizeof(command),
- "gs -r100 -dFIXED -sDEVICE=ppmraw -dQUIET -dNOPAUSE -dBATCH "
- "-sstdout=\"%%stderr\" -sOUTPUTFILE=\'%s\' "
- "-dFirstPage=1 -dLastPage=1 \'%s\' 2>/dev/null", preview, name);
+ sprintf(command,
+ "gs -r100 -dFIXED -sDEVICE=ppmraw -dQUIET -dNOPAUSE -dBATCH "
+ "-sstdout=\"%%stderr\" -sOUTPUTFILE=\'%s\' "
+ "-dFirstPage=1 -dLastPage=1 \'%s\' 2>/dev/null", preview, name);
if (system(command)) return 0;
@@ -256,11 +256,11 @@ ps_check(const char *name, // I - Name of file
return 0;
home = getenv("HOME");
- snprintf(preview, sizeof(preview), "%s/.preview.ppm", home ? home : "");
+ sprintf(preview, "%s/.preview.ppm", home ? home : "");
if (memcmp(header, "%!PS", 4) == 0) {
// PS file has DSC comments; extract the first page...
- snprintf(outname, sizeof(outname), "%s/.preview.ps", home ? home : "");
+ sprintf(outname, "%s/.preview.ps", home ? home : "");
if (strcmp(name, outname) != 0) {
in = fopen(name, "rb");
@@ -281,13 +281,14 @@ ps_check(const char *name, // I - Name of file
}
} else {
// PS file doesn't have DSC comments; do the whole file...
- strlcpy(outname, name, sizeof(outname));
+ strncpy(outname, name, sizeof(outname) - 1);
+ outname[sizeof(outname) - 1] = '\0';
}
- snprintf(command, sizeof(command),
- "gs -r100 -dFIXED -sDEVICE=ppmraw -dQUIET -dNOPAUSE -dBATCH "
- "-sstdout=\"%%stderr\" -sOUTPUTFILE=\'%s\' \'%s\' 2>/dev/null",
- preview, outname);
+ sprintf(command,
+ "gs -r100 -dFIXED -sDEVICE=ppmraw -dQUIET -dNOPAUSE -dBATCH "
+ "-sstdout=\"%%stderr\" -sOUTPUTFILE=\'%s\' \'%s\' 2>/dev/null",
+ preview, outname);
if (system(command)) return 0;
diff --git a/test/fractals.cxx b/test/fractals.cxx
index 913735f99..c4d88234a 100644
--- a/test/fractals.cxx
+++ b/test/fractals.cxx
@@ -27,7 +27,7 @@
// Please report all bugs and problems to "fltk-bugs@fltk.org".
//
-#include <config.h>
+#include "config.h"
#if !HAVE_GL || !HAVE_GL_GLU_H
#include <FL/Fl.H>
#include <FL/fl_message.H>
diff --git a/test/fullscreen.cxx b/test/fullscreen.cxx
index b69034405..b596d8c11 100644
--- a/test/fullscreen.cxx
+++ b/test/fullscreen.cxx
@@ -54,7 +54,7 @@
// Please report all bugs and problems to "fltk-bugs@fltk.org".
//
-#include <config.h>
+#include "config.h"
#include <FL/Fl.H>
#include <FL/Fl_Single_Window.H>
#include <FL/Fl_Hor_Slider.H>
diff --git a/test/gl_overlay.cxx b/test/gl_overlay.cxx
index d2f65bc09..6a72e2991 100644
--- a/test/gl_overlay.cxx
+++ b/test/gl_overlay.cxx
@@ -23,7 +23,7 @@
// Please report all bugs and problems to "fltk-bugs@fltk.org".
//
-#include <config.h>
+#include "config.h"
#include <FL/Fl.H>
#include <FL/Fl_Window.H>
#include <FL/Fl_Hor_Slider.H>
diff --git a/test/glpuzzle.cxx b/test/glpuzzle.cxx
index 94bba7997..677e611e5 100644
--- a/test/glpuzzle.cxx
+++ b/test/glpuzzle.cxx
@@ -27,7 +27,7 @@
//
// this block added for fltk's distribtion so it will compile w/o OpenGL:
-#include <config.h>
+#include "config.h"
#if !HAVE_GL || !HAVE_GL_GLU_H
#include <FL/Fl.H>
#include <FL/fl_message.H>
diff --git a/test/list_visuals.cxx b/test/list_visuals.cxx
index 8a1ceea6f..dafe8933d 100644
--- a/test/list_visuals.cxx
+++ b/test/list_visuals.cxx
@@ -42,7 +42,7 @@ int main(int, char**) {
#else
-#include <config.h>
+#include "config.h"
#ifndef Fl_H
diff --git a/test/makedepend b/test/makedepend
index 1503c7f99..061dd2945 100644
--- a/test/makedepend
+++ b/test/makedepend
@@ -34,15 +34,14 @@ buttons.o: ../FL/Fl_Button.H ../FL/Fl_Repeat_Button.H ../FL/Fl.H
buttons.o: ../FL/Fl_Check_Button.H ../FL/Fl_Light_Button.H
buttons.o: ../FL/Fl_Light_Button.H ../FL/Fl_Round_Button.H ../FL/Fl_Tooltip.H
buttons.o: ../FL/Fl_Widget.H
-checkers.o: ../src/flstring.h ../FL/Fl_Export.H ../config.h ../FL/Fl.H
-checkers.o: ../FL/Enumerations.H ../FL/Fl_Export.H ../FL/Fl_Double_Window.H
-checkers.o: ../FL/Fl_Window.H ../FL/Fl_Group.H ../FL/Fl_Widget.H
-checkers.o: ../FL/Fl_Bitmap.H ../FL/Fl_Image.H ../FL/fl_draw.H
-checkers.o: ../FL/Fl_Menu_Item.H ../FL/fl_ask.H black_1.xbm black_2.xbm
-checkers.o: black_3.xbm black_4.xbm white_1.xbm white_2.xbm white_3.xbm
-checkers.o: white_4.xbm blackking_1.xbm blackking_2.xbm blackking_3.xbm
-checkers.o: blackking_4.xbm whiteking_1.xbm whiteking_2.xbm whiteking_3.xbm
-checkers.o: whiteking_4.xbm ../FL/Fl_Box.H ../FL/Fl_Slider.H
+checkers.o: ../FL/Fl.H ../FL/Enumerations.H ../FL/Fl_Export.H
+checkers.o: ../FL/Fl_Double_Window.H ../FL/Fl_Window.H ../FL/Fl_Group.H
+checkers.o: ../FL/Fl_Widget.H ../FL/Fl_Bitmap.H ../FL/Fl_Image.H
+checkers.o: ../FL/fl_draw.H ../FL/Fl_Menu_Item.H ../FL/fl_ask.H black_1.xbm
+checkers.o: black_2.xbm black_3.xbm black_4.xbm white_1.xbm white_2.xbm
+checkers.o: white_3.xbm white_4.xbm blackking_1.xbm blackking_2.xbm
+checkers.o: blackking_3.xbm blackking_4.xbm whiteking_1.xbm whiteking_2.xbm
+checkers.o: whiteking_3.xbm whiteking_4.xbm ../FL/Fl_Box.H ../FL/Fl_Slider.H
checkers.o: ../FL/Fl_Valuator.H ../FL/Fl_Value_Output.H
clock.o: ../FL/Fl.H ../FL/Enumerations.H ../FL/Fl_Export.H ../FL/Fl_Window.H
clock.o: ../FL/Fl_Clock.H ../FL/Fl_Widget.H ../FL/Fl_Round_Clock.H
@@ -139,8 +138,7 @@ file_chooser.o: ../FL/Fl_Light_Button.H ../FL/Fl_Button.H
file_chooser.o: ../FL/Fl_File_Input.H ../FL/Fl_Input.H ../FL/Fl_Input_.H
file_chooser.o: ../FL/Fl_Return_Button.H ../FL/fl_ask.H ../FL/Fl_File_Icon.H
file_chooser.o: ../FL/Fl_Shared_Image.H ../FL/Fl_PNM_Image.H
-file_chooser.o: ../FL/Fl_Light_Button.H ../src/flstring.h ../FL/Fl_Export.H
-file_chooser.o: ../config.h
+file_chooser.o: ../FL/Fl_Light_Button.H
fonts.o: ../FL/Fl.H ../FL/Enumerations.H ../FL/Fl_Export.H ../FL/Fl_Window.H
fonts.o: ../FL/Fl_Hold_Browser.H ../FL/Fl_Browser.H ../FL/Fl_Browser_.H
fonts.o: ../FL/Fl_Group.H ../FL/Fl_Widget.H ../FL/Fl_Scrollbar.H
@@ -191,7 +189,7 @@ help.o: ../FL/Fl_Export.H ../FL/Fl_Double_Window.H ../FL/Fl_Window.H
help.o: ../FL/Fl_Group.H ../FL/Fl_Widget.H ../FL/Fl_Help_View.H ../FL/Fl.H
help.o: ../FL/Fl_Scrollbar.H ../FL/Fl_Slider.H ../FL/Fl_Valuator.H
help.o: ../FL/fl_draw.H ../FL/Fl_Shared_Image.H ../FL/Fl_Image.H
-help.o: ../FL/Fl_Button.H ../FL/Fl_Group.H ../FL/Fl_Input.H ../FL/Fl_Input_.H
+help.o: ../FL/Fl_Group.H ../FL/Fl_Button.H ../FL/Fl_Input.H ../FL/Fl_Input_.H
iconize.o: ../FL/Fl.H ../FL/Enumerations.H ../FL/Fl_Export.H
iconize.o: ../FL/Fl_Window.H ../FL/Fl_Button.H ../FL/Fl_Box.H
image.o: ../FL/Fl.H ../FL/Enumerations.H ../FL/Fl_Export.H ../FL/Fl_Window.H
diff --git a/test/shape.cxx b/test/shape.cxx
index 0cedf2502..d4d3469f3 100644
--- a/test/shape.cxx
+++ b/test/shape.cxx
@@ -23,7 +23,7 @@
// Please report all bugs and problems to "fltk-bugs@fltk.org".
//
-#include <config.h>
+#include "config.h"
#include <FL/Fl.H>
#include <FL/Fl_Window.H>
#include <FL/Fl_Hor_Slider.H>
diff --git a/test/threads.cxx b/test/threads.cxx
index 5320c5582..0139dd4ce 100644
--- a/test/threads.cxx
+++ b/test/threads.cxx
@@ -23,7 +23,7 @@
// Please report all bugs and problems to "fltk-bugs@fltk.org".
//
-#include <config.h>
+#include "config.h"
#if HAVE_PTHREAD || defined(WIN32)
# include <FL/Fl.H>