Commit d25f8933 authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer
Browse files

commented the sections of the file list. cleanup.

2001-04-18  Michael Natterer  <mitch@gimp.org>

	* app/Makefile.am: commented the sections of the file list.
	* app/gui/Makefile.am: cleanup.

	* app/unittest/*: removed.
parent ddc91452
2001-04-18 Michael Natterer <mitch@gimp.org>
* app/Makefile.am: commented the sections of the file list.
* app/gui/Makefile.am: cleanup.
* app/unittest/*: removed.
2001-04-17 Michael Natterer <mitch@gimp.org>
* app/Makefile.am
......
......@@ -22,20 +22,27 @@ endif
bin_PROGRAMS = gimp
gimp_SOURCES = \
##
## gui stuff that needs to go to libgimp/, gui/ or /dev/null
##
colormaps.c \
colormaps.h \
cursorutil.c \
cursorutil.h \
devices.c \
devices.h \
dialog_handler.c \
dialog_handler.h \
docindex.c \
docindex.h \
errorconsole.c \
errorconsole.h \
gimpdnd.c \
gimpdnd.h \
gimpprogress.c \
gimpprogress.h \
gimpui.c \
gimpui.h \
interface.c \
interface.h \
layers_dialogP.h \
lc_dialog.c \
lc_dialog.h \
......@@ -45,9 +52,54 @@ gimp_SOURCES = \
ops_buttons.c \
ops_buttons.h \
paths_dialogP.h \
qmask.c \
qmask.h \
resize.c \
resize.h \
resolution_calibrate.c \
resolution_calibrate.h \
\
undo_history.c \
undo_history.h \
##
## display stuff
##
disp_callbacks.c \
disp_callbacks.h \
gximage.c \
gximage.h \
image_render.c \
image_render.h \
interface.c \
interface.h \
scale.c \
scale.h \
scroll.c \
scroll.h \
selection.c \
selection.h \
marching_ants.h \
##
## stuff that needs to be split up in core / ui files
##
channel_ops.c \
channel_ops.h \
convert.c \
convert.h \
gdisplay.c \
gdisplay.h \
gdisplay_ops.c \
gdisplay_ops.h \
global_edit.c \
global_edit.h \
image_map.c \
image_map.h \
module_db.c \
module_db.h \
user_install.c \
user_install.h \
##
## core stuff
##
app_procs.c \
app_procs.h \
appenums.h \
......@@ -63,24 +115,14 @@ gimp_SOURCES = \
brush_header.h \
brush_scale.c \
brush_scale.h \
channel_ops.c \
channel_ops.h \
color_transfer.c \
color_transfer.h \
colormaps.c \
colormaps.h \
context_manager.c \
context_manager.h \
convert.c \
convert.h \
datafiles.c \
datafiles.h \
desaturate.c \
desaturate.h \
disp_callbacks.c \
disp_callbacks.h \
docindex.c \
docindex.h \
drawable.c \
drawable.h \
errors.c \
......@@ -96,10 +138,6 @@ gimp_SOURCES = \
floating_sel.c \
floating_sel.h \
fsdither.h \
gdisplay.c \
gdisplay.h \
gdisplay_ops.c \
gdisplay_ops.h \
general.c \
general.h \
gimage.c \
......@@ -160,8 +198,6 @@ gimp_SOURCES = \
gimpparasite.h \
gimppreviewcache.h \
gimppreviewcache.c \
gimpprogress.c \
gimpprogress.h \
gimprc.c \
gimprc.h \
gimpundo.c \
......@@ -171,16 +207,8 @@ gimp_SOURCES = \
gimpunit.c \
gimpviewable.c \
gimpviewable.h \
global_edit.c \
global_edit.h \
gximage.c \
gximage.h \
image_map.c \
image_map.h \
image_new.c \
image_new.h \
image_render.c \
image_render.h \
invert.c \
invert.h \
libgimp_glue.c \
......@@ -188,8 +216,6 @@ gimp_SOURCES = \
lut_funcs.c \
lut_funcs.h \
main.c \
module_db.c \
module_db.h \
parasitelist.c \
parasitelist.h \
path.c \
......@@ -209,18 +235,8 @@ gimp_SOURCES = \
pixel_surround.h \
plug_in.c \
plug_in.h \
qmask.c \
qmask.h \
resize.c \
resize.h \
scale.c \
scale.h \
scan_convert.c \
scan_convert.h \
scroll.c \
scroll.h \
selection.c \
selection.h \
temp_buf.c \
temp_buf.h \
tile.c \
......@@ -235,18 +251,13 @@ gimp_SOURCES = \
tile_swap.h \
undo.c \
undo.h \
undo_history.c \
undo_history.h \
undo_types.h \
unitrc.h \
user_install.c \
user_install.h \
xcf.c \
xcf.h \
$(regex_sources) \
$(mmx_sources) \
\
marching_ants.h \
pixmaps2.h
EXTRA_DIST = \
......
......@@ -3,17 +3,6 @@
noinst_LTLIBRARIES = libappgui.la
libappgui_la_SOURCES = \
dialogs.c \
dialogs.h \
dialogs-commands.c \
dialogs-commands.h \
dialogs-constructors.c \
dialogs-constructors.h \
gui.c \
gui.h \
splash.c \
splash.h \
\
about-dialog.c \
about-dialog.h \
brush-editor.c \
......@@ -32,12 +21,20 @@ libappgui_la_SOURCES = \
colormap-dialog.h \
commands.c \
commands.h \
dialogs.c \
dialogs.h \
dialogs-commands.c \
dialogs-commands.h \
dialogs-constructors.c \
dialogs-constructors.h \
file-new-dialog.c \
file-new-dialog.h \
gradient-editor.c \
gradient-editor.h \
gradient-select.h \
gradient-select.c \
gui.c \
gui.h \
indicator-area.c \
indicator-area.h \
info-dialog.c \
......@@ -64,6 +61,8 @@ libappgui_la_SOURCES = \
preferences-dialog.h \
session.c \
session.h \
splash.c \
splash.h \
test-commands.c \
test-commands.h \
tips-dialog.c \
......
Makefile
Makefile.in
.deps
.libs
gimppath
gimpparse
plugdir
parse_gimprc
\ No newline at end of file
## Process this file with automake to produce Makefile.in
scriptdata =
INTLLIBS=-lintl
bin_PROGRAMS = gimppath gimpparse plugdir parse_gimprc gimpmodule
#bin_PROGRAMS = testplugin gimppath gimpparse plugshow plugdir
OFILES=../about_dialog.o ../disp_callbacks.o ../gimpunit.o \
../pattern_select.o \
../docindex.o ../global_edit.o \
../pattern_select_cmds.o \
../airbrush.o ../docindexif.o ../gradient.o ../patterns.o\
../draw_core.o ../gradient_cmds.o ../patterns_cmds.o \
../asupsample.o ../drawable.o ../gradient_select.o ../pencil.o\
../batch.o ../drawable_cmds.o ../gradient_select_cmds.o ../perspective_tool.o\
../bezier_select.o ../edit_cmds.o ../guides_cmds.o ../pixel_processor.o\
../blend.o ../edit_selection.o ../gximage.o ../pixel_region.o\
../blob.o ../ellipse_select.o ../histogram_tool.o \
../boundary.o ../equalize.o ../histogramwidget.o ../plug_in_cmds.o\
../brightness_contrast.o ../eraser.o ../hue_saturation.o ../posterize.o\
../brush_edit.o ../errorconsole.o ../image_map.o ../preferences_dialog.o\
../brush_select.o ../errors.o ../image_render.o ../procedural_db.o\
../brush_select_cmds.o ../file_new_dialog.o ../info_dialog.o ../procedural_db_cmds.o\
../brushes_cmds.o ../fileops.o ../info_window.o ../rect_select.o\
../bucket_fill.o ../fileops_cmds.o ../ink.o ../regex.o\
../buildmenu.o ../flip_tool.o ../install.o ../resize.o\
../by_color_select.o ../floating_sel.o ../interface.o ../rotate_tool.o\
../channel.o ../floating_sel_cmds.o ../interface_cmds.o ../scale.o\
../channel_cmds.o ../undo_history.o ../internal_procs.o ../scale_tool.o\
../channel_ops.o ../free_select.o ../invert.o ../scroll.o\
../channel_ops_cmds.o ../fuzzy_select.o ../iscissors.o ../selection.o\
../channels_dialog.o ../gdisplay.o ../layer.o ../session.o\
../clone.o ../gdisplay_cmds.o ../layer_cmds.o ../shear_tool.o\
../color_area.o ../gdisplay_ops.o ../layer_select.o ../temp_buf.o\
../color_balance.o ../general.o ../layers_dialog.o ../text_tool.o\
../color_cmds.o ../gimage.o ../levels.o ../text_tool_cmds.o\
../color_notebook.o ../gimage_cmds.o ../lut_funcs.o ../threshold.o\
../color_panel.o ../gimage_mask.o ../magnify.o ../tile.o\
../color_picker.o ../gimage_mask_cmds.o ../app_procs.o ../tile_cache.o\
../color_select.o ../gimpbrush.o ../menus.o ../tile_manager.o\
../color_transfer.o ../gimpbrushgenerated.o ../misc_cmds.o ../tile_swap.o\
../colormap_dialog.o ../gimpbrushlist.o ../tips_dialog.o\
../colormaps.o ../gimpdrawable.o ../move.o ../tool_options.o\
../commands.o ../gimphistogram.o ../ops_buttons.o ../tools.o\
../convert.o ../gimpimage.o ../paint_core.o ../tools_cmds.o\
../convert_cmds.o ../gimplist.o ../paint_funcs.o ../transform_core.o\
../convolve.o ../gimplut.o ../paintbrush.o ../transform_tool.o\
../crop.o ../gimpobject.o ../palette.o ../undo.o\
../cursorutil.o ../gimpparasite.o ../palette_cmds.o ../undo_cmds.o\
../curves.o ../gimpprogress.o ../palette_select.o ../unit_cmds.o\
../datafiles.o ../parasite_cmds.o ../vector2d.o\
../desaturate.o ../gimprc_cmds.o ../parasitelist.o ../xcf.o\
../devices.o ../gimpset.o ../paths_cmds.o\
../dialog_handler.o ../gimpsignal.o ../paths_dialog.o \
../path_tool.o ../gimpbrushpipe.o ../gtkwrapbox.o ../gtkhwrapbox.o ../gtkvwrapbox.o \
../gimpdnd.o ../brush_scale.o ../measure.o ../xinput_airbrush.o \
../airbrush_blob.o ../gdisplay_color_ui.o \
../image_new.o ../nav_window.o ../smudge.o ../dodgeburn.o \
../indicator_area.o ../gdisplay_color.o ../gimpcontextpreview.o \
../qmask.o ../context_manager.o ../lc_dialog.o ../gimpcontext.o \
../gimpui.o ../gimphelp.o ../scan_convert.o ../path_curves.o ../path_bezier.o
#testplugin_SOURCES = \
# testplugin.c \
# init.c
#plugshow_SOURCES = \
# plugshow.c
plugdir_SOURCES = \
plugdir.c
gimpmodule_SOURCES = \
gimpmodule.c
gimppath_SOURCES = \
gimppath.c
AM_CPPFLAGS = \
-DLIBDIR=\""$(gimpplugindir)"\" \
-DLOCALEDIR=\""$(localedir)"\" \
-DREGEX_MALLOC \
@GIMP_THREAD_FLAGS@
INCLUDES = \
-I$(top_srcdir) \
-I$(top_srcdir)/intl \
$(GTK_CFLAGS) \
-I$(includedir)\
-I..
LDADD = $(OFILES) \
../libgimpim.a \
$(top_builddir)/libgimp/libgimpi.a \
$(GTK_LIBS) \
$(GIMP_THREAD_LIBS) \
$(INTLLIBS)
#plugshow_LDADD = $(OFILES) \
# ../libgimpim.a \
# $(top_builddir)/libgimp/libgimpi.a \
# $(GTK_LIBS) \
# $(GIMP_THREAD_LIBS) \
# $(INTLLIBS)
plugdir_LDADD = $(OFILES) ../module_db.o\
../libgimpim.a \
$(top_builddir)/libgimp/libgimpi.a \
$(GTK_LIBS) \
$(GIMP_THREAD_LIBS) \
$(INTLLIBS)
gimppath_LDADD = $(OFILES) ../plug_in.o ../module_db.o \
../libgimpim.a \
$(top_builddir)/libgimp/libgimpi.a \
$(GTK_LIBS) \
$(GIMP_THREAD_LIBS) \
$(INTLLIBS)
gimpparse_LDADD = $(OFILES) ../plug_in.o ../module_db.o\
../libgimpim.a \
$(top_builddir)/libgimp/libgimpi.a \
$(GTK_LIBS) \
$(GIMP_THREAD_LIBS) \
$(INTLLIBS)
parse_gimprc_LDADD = $(OFILES) ../plug_in.o ../module_db.o\
../libgimpim.a \
$(top_builddir)/libgimp/libgimpi.a \
$(GTK_LIBS) \
$(GIMP_THREAD_LIBS) \
$(INTLLIBS)
gimpmodule_LDADD = ../plug_in.o $(OFILES) ../gimprc.o \
../libgimpim.a \
$(top_builddir)/libgimp/libgimpi.a \
$(GTK_LIBS) \
$(GIMP_THREAD_LIBS) \
$(INTLLIBS)
DEPS = \
../libgimpim.a \
$(top_builddir)/libgimp/libgimpi.a
.PHONY: files
files:
@files=`ls $(DISTFILES) 2> /dev/null`; for p in $$files; do \
echo $$p; \
done
Unit test programs for GIMP.
./gimppath - Display GIMP's paths and rc files.
./gimpparse <rc file> - Parse rc files.
./plugdir <directory> - Display EXECUTABLE files(plug-ins) in a directory.
Have fun.
Asbjorn Pettersen.
1. Create a unit test program for parse_gimprc ()
called parse_gimprc.c which is small and clean.
This program shall parse the gimprc file and output the result.
Without GTK things !
Example:
#include "config.h"
#include "../gimprc.c"
int main (int argc, char **argv)
{
int status;
status = parse_gimprc ();
printf("status=%d\n",status);
return 0;
}
This fantastic large program isn't easy to create
and test at present time.
What's input and what's output for parse_gimprc () isn't
easy to see at this top level either.
2. Clean up the function parse_gimprc () in gimprc.c
3. Clean up the function parse_gimprc_file(char *filename) in gimprc.c
The input(filename) is changing inside the function !!!!!
Nasty ! Nasty !
gboolean parse_gimprc_file (char *filename)
{
int status;
char rfilename[MAXPATHLEN];
if (!g_path_is_absolute (filename))
{
if (g_get_home_dir () != NULL)
{
g_snprintf (rfilename, sizeof (rfilename),
"%s" G_DIR_SEPARATOR_S "%s",
g_get_home_dir (), filename);
filename = rfilename; /* Nasty, nasty */
}
}
...cut...
}
\ No newline at end of file
/* The GIMP -- an image manipulation program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "unittest.h"
#include "globals.c"
#include "../module_db.c"
static gboolean
valid_module_name2 (const char *filename)
{
const char *basename;
int len;
basename = g_basename (filename);
len = strlen (basename);
printf("basename=%s len=%d\n",basename,len);
#if !defined(G_OS_WIN32) && !defined(G_WITH_CYGWIN) && !defined(__EMX__)
if (len < 3 + 1 + 3)
return FALSE;
if (strncmp (basename, "lib", 3))
return FALSE;
if (strcmp (basename + len - 3, ".so"))
return FALSE;
#else
if (len < 1 + 4)
return FALSE;
if (g_strcasecmp (basename + len - 4, ".dll"))
return FALSE;
#endif
return TRUE;
}
int
main (int argc, char **argv)
{
char filename[300];
gboolean status;
int showit = 1;
if (argc < 2)
{
printf("%s [option] \n\n",argv[0]);
printf("ex: %s -s # write modulerc \n",argv[0]);
printf("ex: %s -f%s # parse a files\n",argv[0], filename);
exit (1);
}
/* parse_buffers_init(); */
if (strncmp (argv[1], "-s",2) == 0)
{
gboolean saved;
printf("call module_db_write_modulerc()\n");
/* init */
modules = gimp_set_new (MODULE_INFO_TYPE, FALSE);
/* need_to_rewrite_modulerc = TRUE; */
saved = module_db_write_modulerc();
printf("saved=%d\n",saved);
exit (0);
}
if (strncmp (argv[1], "-f",2) == 0)
{
strcpy (filename, argv[1] + 2);
if (!valid_module_name2 (filename))
{
printf("%s not valid module file !\n",filename);
/* exit (0); */
}
printf("call module_find_by_path()\n");
/* init */
modules = gimp_set_new (MODULE_INFO_TYPE, FALSE);
if (module_find_by_path (filename))
{
}
module_initialize (filename);
exit (0);
}
printf("caLL module_db_init()\n");
module_db_init();
}
/* The GIMP -- an image manipulation program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "unittest.h"
#include "globals.c"
#if 1
#include "../gimprc.c"
#endif
char * get_personal(const char *filename)
{
char *full_filename = gimp_personal_rc_file(filename);
g_print ("%-50s = gimp_personal_rc_file(\"%s\");\n",
full_filename, filename);
return (full_filename);
}
void dump_ParseInfo(ParseInfo *p)
{
printf("*** ParseInfo ***\n");
printf("fp=%p ",p->fp);
printf("linenum=%d ",p->linenum);
printf("charnum=%d ",p->charnum);
printf("position=%d\n",p->position);
printf("buffer_size=%d ",p->buffer_size);
printf("tokenbuf_size=%d\n",p->tokenbuf_size);
printf("buffer=>%s<\n",p->buffer);
printf("tokenbuf=>%s<\n",p->tokenbuf);
}
int
get_token2 (ParseInfo *info)
{
char *buffer;
char *tokenbuf;
int tokenpos = 0;
int state;
int count;
int slashed;