gtkslash 0.5.4

This commit is contained in:
tengel 2024-03-20 09:24:54 -05:00
parent a0b48fe797
commit 323e186c0e
20 changed files with 4337 additions and 1283 deletions

View file

@ -1,3 +1,4 @@
Authors
* Troy Engel <tengel@sonic.net> - Beginning Code
* Bruce Smith <tangomanrulz@geocities.com> - Unix porting
* Troy Engel <tengel@sonic.net> - Windows / *nix
* Bruce Smith <tangomanrulz@geocities.com> - *nix porting

2
BUGS
View file

@ -2,5 +2,5 @@ Crash
* none
Non-Crash
* none
* ultramode.tmp not always deleted from home directory

View file

@ -1,3 +1,10 @@
Sun Jan 03 1999 Troy Engel <tengel@sonic.net>
* versioned to 0.5.4
* implemented autoconf/automake support (*nix, Bruce Smith)
* *nix netscape launching cleaned up
* removed bad list clearing (Bruce Smith)
* repackaged in standard *nix format
Sun Dec 13 1998 Troy Engel <tengel@sonic.net>
* versioned to 0.5.3
* initial public release

16
INSTALL Normal file
View file

@ -0,0 +1,16 @@
*nix
====
./configure
make
<su to root or whatever>
make install
Windows
=======
nmake /f makefile.vc6
If you have any problems, examine your makefile by hand.

4
Makefile.am Normal file
View file

@ -0,0 +1,4 @@
AUTOMAKE_OPTIONS=no-dependencies
bin_PROGRAMS = gtkslash
gtkslash_SOURCES = gtkslash.c rcfuncs.c rcfuncs.h
EXTRA_DIST = BUGS Makefile.vc6 gtkslashrc

301
Makefile.in Normal file
View file

@ -0,0 +1,301 @@
# Makefile.in generated automatically by automake 1.3 from Makefile.am
# Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
SHELL = /bin/sh
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
sbindir = @sbindir@
libexecdir = @libexecdir@
datadir = @datadir@
sysconfdir = @sysconfdir@
sharedstatedir = @sharedstatedir@
localstatedir = @localstatedir@
libdir = @libdir@
infodir = @infodir@
mandir = @mandir@
includedir = @includedir@
oldincludedir = /usr/include
DISTDIR =
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = .
ACLOCAL = @ACLOCAL@
AUTOCONF = @AUTOCONF@
AUTOMAKE = @AUTOMAKE@
AUTOHEADER = @AUTOHEADER@
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
transform = @program_transform_name@
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
CC = @CC@
GTKSLASH_VERSION = @GTKSLASH_VERSION@
GTK_CFLAGS = @GTK_CFLAGS@
GTK_CONFIG = @GTK_CONFIG@
GTK_LIBS = @GTK_LIBS@
MAKEINFO = @MAKEINFO@
PACKAGE = @PACKAGE@
VERSION = @VERSION@
AUTOMAKE_OPTIONS=no-dependencies
bin_PROGRAMS = gtkslash
gtkslash_SOURCES = gtkslash.c rcfuncs.c rcfuncs.h
EXTRA_DIST = BUGS Makefile.vc6 gtkslashrc
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_CLEAN_FILES =
PROGRAMS = $(bin_PROGRAMS)
DEFS = @DEFS@ -I. -I$(srcdir)
CPPFLAGS = @CPPFLAGS@
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
gtkslash_OBJECTS = gtkslash.o rcfuncs.o
gtkslash_LDADD = $(LDADD)
gtkslash_DEPENDENCIES =
gtkslash_LDFLAGS =
CFLAGS = @CFLAGS@
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
LINK = $(CC) $(CFLAGS) $(LDFLAGS) -o $@
DIST_COMMON = README AUTHORS COPYING ChangeLog INSTALL Makefile.am \
Makefile.in NEWS TODO aclocal.m4 configure configure.in install-sh \
missing mkinstalldirs
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
TAR = tar
GZIP = --best
SOURCES = $(gtkslash_SOURCES)
OBJECTS = $(gtkslash_OBJECTS)
all: Makefile $(PROGRAMS)
.SUFFIXES:
.SUFFIXES: .S .c .o .s
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) \
&& CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
$(ACLOCAL_M4): configure.in
cd $(srcdir) && $(ACLOCAL)
config.status: $(srcdir)/configure
$(SHELL) ./config.status --recheck
$(srcdir)/configure: $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
cd $(srcdir) && $(AUTOCONF)
mostlyclean-binPROGRAMS:
clean-binPROGRAMS:
-test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
distclean-binPROGRAMS:
maintainer-clean-binPROGRAMS:
install-binPROGRAMS: $(bin_PROGRAMS)
@$(NORMAL_INSTALL)
$(mkinstalldirs) $(DESTDIR)$(bindir)
@list='$(bin_PROGRAMS)'; for p in $$list; do \
if test -f $$p; then \
echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`"; \
$(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`; \
else :; fi; \
done
uninstall-binPROGRAMS:
@$(NORMAL_UNINSTALL)
list='$(bin_PROGRAMS)'; for p in $$list; do \
rm -f $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`; \
done
.c.o:
$(COMPILE) -c $<
.s.o:
$(COMPILE) -c $<
.S.o:
$(COMPILE) -c $<
mostlyclean-compile:
-rm -f *.o core *.core
clean-compile:
distclean-compile:
-rm -f *.tab.c
maintainer-clean-compile:
gtkslash: $(gtkslash_OBJECTS) $(gtkslash_DEPENDENCIES)
@rm -f gtkslash
$(LINK) $(gtkslash_LDFLAGS) $(gtkslash_OBJECTS) $(gtkslash_LDADD) $(LIBS)
tags: TAGS
ID: $(HEADERS) $(SOURCES) $(LISP)
here=`pwd` && cd $(srcdir) \
&& mkid -f$$here/ID $(SOURCES) $(HEADERS) $(LISP)
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS)'; \
unique=`for i in $$list; do echo $$i; done | \
awk ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
|| (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS)
mostlyclean-tags:
clean-tags:
distclean-tags:
-rm -f TAGS ID
maintainer-clean-tags:
distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir)
# This target untars the dist file and tries a VPATH configuration. Then
# it guarantees that the distribution is self-contained by making another
# tarfile.
distcheck: dist
-rm -rf $(distdir)
GZIP=$(GZIP) $(TAR) zxf $(distdir).tar.gz
mkdir $(distdir)/=build
mkdir $(distdir)/=inst
dc_install_base=`cd $(distdir)/=inst && pwd`; \
cd $(distdir)/=build \
&& ../configure --srcdir=.. --prefix=$$dc_install_base \
&& $(MAKE) \
&& $(MAKE) dvi \
&& $(MAKE) check \
&& $(MAKE) install \
&& $(MAKE) installcheck \
&& $(MAKE) dist
-rm -rf $(distdir)
@echo "========================"; \
echo "$(distdir).tar.gz is ready for distribution"; \
echo "========================"
dist: distdir
-chmod -R a+r $(distdir)
GZIP=$(GZIP) $(TAR) chozf $(distdir).tar.gz $(distdir)
-rm -rf $(distdir)
dist-all: distdir
-chmod -R a+r $(distdir)
GZIP=$(GZIP) $(TAR) chozf $(distdir).tar.gz $(distdir)
-rm -rf $(distdir)
distdir: $(DISTFILES)
-rm -rf $(distdir)
mkdir $(distdir)
-chmod 777 $(distdir)
@for file in $(DISTFILES); do \
d=$(srcdir); \
test -f $(distdir)/$$file \
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|| cp -p $$d/$$file $(distdir)/$$file; \
done
info:
dvi:
check: all
$(MAKE)
installcheck:
install-exec: install-binPROGRAMS
@$(NORMAL_INSTALL)
install-data:
@$(NORMAL_INSTALL)
install: install-exec install-data all
@:
uninstall: uninstall-binPROGRAMS
install-strip:
$(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install
installdirs:
$(mkinstalldirs) $(DATADIR)$(bindir)
mostlyclean-generic:
-test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
clean-generic:
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
-rm -f Makefile $(DISTCLEANFILES)
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
mostlyclean: mostlyclean-binPROGRAMS mostlyclean-compile \
mostlyclean-tags mostlyclean-generic
clean: clean-binPROGRAMS clean-compile clean-tags clean-generic \
mostlyclean
distclean: distclean-binPROGRAMS distclean-compile distclean-tags \
distclean-generic clean
-rm -f config.status
maintainer-clean: maintainer-clean-binPROGRAMS maintainer-clean-compile \
maintainer-clean-tags maintainer-clean-generic \
distclean
@echo "This command is intended for maintainers to use;"
@echo "it deletes files that may require special tools to rebuild."
-rm -f config.status
.PHONY: mostlyclean-binPROGRAMS distclean-binPROGRAMS clean-binPROGRAMS \
maintainer-clean-binPROGRAMS uninstall-binPROGRAMS install-binPROGRAMS \
mostlyclean-compile distclean-compile clean-compile \
maintainer-clean-compile tags mostlyclean-tags distclean-tags \
clean-tags maintainer-clean-tags distdir info dvi installcheck \
install-exec install-data install uninstall all installdirs \
mostlyclean-generic distclean-generic clean-generic \
maintainer-clean-generic clean mostlyclean distclean maintainer-clean
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

4
NEWS
View file

@ -1,3 +1,7 @@
Version 0.5.4
* autoconf/automake *nix support
* better *nix netscape support
Version 0.5.3
* initial public release

6
README
View file

@ -1,9 +1,9 @@
gtkSlash - Slashdot headlines news-ticker
(c) 1998 Troy Engel <tengel@sonic.net>
(c) 1998,9 Troy Engel <tengel@sonic.net>
http://www.sonic.net/~tengel/gtkslash/
-----------------------------------------
12/13/98, v0.5.3
01/03/99, v0.5.4
General
@ -18,7 +18,7 @@ gtkSlash requires Gtk+ (http://www.gtk.org) and curl
file retrieval, respectively. Additionally, if you want to
browse a news article from within gtkSlash you'll need some
sort of web browser. Currently it is working just fine with
Gtk 1.1.3 and curl 5.0.
Gtk 1.1.3 (Windows) Gtk 1.1.9 (*nix) and curl 5.3 (both).
If you are on Windows, the Gtk+ version which has been used is
from Tor Lillqvist; he also ports Gdk and GIMP. If you don't

5
TODO
View file

@ -1,3 +1,4 @@
As of 0.5.3
* *nix portability
As of 0.5.4
* better startup (post refresh message instead of initial wait)
* GUI config editor like GIMP

299
aclocal.m4 vendored Normal file
View file

@ -0,0 +1,299 @@
dnl aclocal.m4 generated automatically by aclocal 1.3
dnl Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
dnl This Makefile.in is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
dnl This program is distributed in the hope that it will be useful,
dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
dnl PARTICULAR PURPOSE.
# Do all the work for Automake. This macro actually does too much --
# some checks are only needed if your package does certain things.
# But this isn't really a big deal.
# serial 1
dnl Usage:
dnl AM_INIT_AUTOMAKE(package,version, [no-define])
AC_DEFUN(AM_INIT_AUTOMAKE,
[AC_REQUIRE([AM_PROG_INSTALL])
PACKAGE=[$1]
AC_SUBST(PACKAGE)
VERSION=[$2]
AC_SUBST(VERSION)
dnl test to see if srcdir already configured
if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
fi
ifelse([$3],,
AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
AC_DEFINE_UNQUOTED(VERSION, "$VERSION"))
AC_REQUIRE([AM_SANITY_CHECK])
AC_REQUIRE([AC_ARG_PROGRAM])
dnl FIXME This is truly gross.
missing_dir=`cd $ac_aux_dir && pwd`
AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
AC_REQUIRE([AC_PROG_MAKE_SET])])
# serial 1
AC_DEFUN(AM_PROG_INSTALL,
[AC_REQUIRE([AC_PROG_INSTALL])
test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
AC_SUBST(INSTALL_SCRIPT)dnl
])
#
# Check to make sure that the build environment is sane.
#
AC_DEFUN(AM_SANITY_CHECK,
[AC_MSG_CHECKING([whether build environment is sane])
# Just in case
sleep 1
echo timestamp > conftestfile
# Do `set' in a subshell so we don't clobber the current shell's
# arguments. Must try -L first in case configure is actually a
# symlink; some systems play weird games with the mod time of symlinks
# (eg FreeBSD returns the mod time of the symlink's containing
# directory).
if (
set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
if test "[$]*" = "X"; then
# -L didn't work.
set X `ls -t $srcdir/configure conftestfile`
fi
if test "[$]*" != "X $srcdir/configure conftestfile" \
&& test "[$]*" != "X conftestfile $srcdir/configure"; then
# If neither matched, then we have a broken ls. This can happen
# if, for instance, CONFIG_SHELL is bash and it inherits a
# broken ls alias from the environment. This has actually
# happened. Such a system could not be considered "sane".
AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
alias in your environment])
fi
test "[$]2" = conftestfile
)
then
# Ok.
:
else
AC_MSG_ERROR([newly created file is older than distributed files!
Check your system clock])
fi
rm -f conftest*
AC_MSG_RESULT(yes)])
dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
dnl The program must properly implement --version.
AC_DEFUN(AM_MISSING_PROG,
[AC_MSG_CHECKING(for working $2)
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh.
if ($2 --version) < /dev/null > /dev/null 2>&1; then
$1=$2
AC_MSG_RESULT(found)
else
$1="$3/missing $2"
AC_MSG_RESULT(missing)
fi
AC_SUBST($1)])
# Configure paths for GTK+
# Owen Taylor 97-11-3
dnl AM_PATH_GTK([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
dnl Test for GTK, and define GTK_CFLAGS and GTK_LIBS
dnl
AC_DEFUN(AM_PATH_GTK,
[dnl
dnl Get the cflags and libraries from the gtk-config script
dnl
AC_ARG_WITH(gtk-prefix,[ --with-gtk-prefix=PFX Prefix where GTK is installed (optional)],
gtk_config_prefix="$withval", gtk_config_prefix="")
AC_ARG_WITH(gtk-exec-prefix,[ --with-gtk-exec-prefix=PFX Exec prefix where GTK is installed (optional)],
gtk_config_exec_prefix="$withval", gtk_config_exec_prefix="")
AC_ARG_ENABLE(gtktest, [ --disable-gtktest Do not try to compile and run a test GTK program],
, enable_gtktest=yes)
if test x$gtk_config_exec_prefix != x ; then
gtk_config_args="$gtk_config_args --exec-prefix=$gtk_config_exec_prefix"
if test x${GTK_CONFIG+set} != xset ; then
GTK_CONFIG=$gtk_config_exec_prefix/bin/gtk-config
fi
fi
if test x$gtk_config_prefix != x ; then
gtk_config_args="$gtk_config_args --prefix=$gtk_config_prefix"
if test x${GTK_CONFIG+set} != xset ; then
GTK_CONFIG=$gtk_config_prefix/bin/gtk-config
fi
fi
AC_PATH_PROG(GTK_CONFIG, gtk-config, no)
min_gtk_version=ifelse([$1], ,0.99.7,$1)
AC_MSG_CHECKING(for GTK - version >= $min_gtk_version)
no_gtk=""
if test "$GTK_CONFIG" = "no" ; then
no_gtk=yes
else
GTK_CFLAGS=`$GTK_CONFIG $gtk_config_args --cflags`
GTK_LIBS=`$GTK_CONFIG $gtk_config_args --libs`
gtk_config_major_version=`$GTK_CONFIG $gtk_config_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
gtk_config_minor_version=`$GTK_CONFIG $gtk_config_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
gtk_config_micro_version=`$GTK_CONFIG $gtk_config_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
if test "x$enable_gtktest" = "xyes" ; then
ac_save_CFLAGS="$CFLAGS"
ac_save_LIBS="$LIBS"
CFLAGS="$CFLAGS $GTK_CFLAGS"
LIBS="$LIBS $GTK_LIBS"
dnl
dnl Now check if the installed GTK is sufficiently new. (Also sanity
dnl checks the results of gtk-config to some extent
dnl
rm -f conf.gtktest
AC_TRY_RUN([
#include <gtk/gtk.h>
#include <stdio.h>
#include <stdlib.h>
int
main ()
{
int major, minor, micro;
char *tmp_version;
system ("touch conf.gtktest");
/* HP/UX 9 (%@#!) writes to sscanf strings */
tmp_version = g_strdup("$min_gtk_version");
if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
printf("%s, bad version string\n", "$min_gtk_version");
exit(1);
}
if ((gtk_major_version != $gtk_config_major_version) ||
(gtk_minor_version != $gtk_config_minor_version) ||
(gtk_micro_version != $gtk_config_micro_version))
{
printf("\n*** 'gtk-config --version' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n",
$gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version,
gtk_major_version, gtk_minor_version, gtk_micro_version);
printf ("*** was found! If gtk-config was correct, then it is best\n");
printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n");
printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
printf("*** required on your system.\n");
printf("*** If gtk-config was wrong, set the environment variable GTK_CONFIG\n");
printf("*** to point to the correct copy of gtk-config, and remove the file config.cache\n");
printf("*** before re-running configure\n");
}
#if defined (GTK_MAJOR_VERSION) && defined (GTK_MINOR_VERSION) && defined (GTK_MICRO_VERSION)
else if ((gtk_major_version != GTK_MAJOR_VERSION) ||
(gtk_minor_version != GTK_MINOR_VERSION) ||
(gtk_micro_version != GTK_MICRO_VERSION))
{
printf("*** GTK+ header files (version %d.%d.%d) do not match\n",
GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION);
printf("*** library (version %d.%d.%d)\n",
gtk_major_version, gtk_minor_version, gtk_micro_version);
}
#endif /* defined (GTK_MAJOR_VERSION) ... */
else
{
if ((gtk_major_version > major) ||
((gtk_major_version == major) && (gtk_minor_version > minor)) ||
((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro)))
{
return 0;
}
else
{
printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n",
gtk_major_version, gtk_minor_version, gtk_micro_version);
printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n",
major, minor, micro);
printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n");
printf("***\n");
printf("*** If you have already installed a sufficiently new version, this error\n");
printf("*** probably means that the wrong copy of the gtk-config shell script is\n");
printf("*** being found. The easiest way to fix this is to remove the old version\n");
printf("*** of GTK+, but you can also set the GTK_CONFIG environment to point to the\n");
printf("*** correct copy of gtk-config. (In this case, you will have to\n");
printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
printf("*** so that the correct libraries are found at run-time))\n");
}
}
return 1;
}
],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
fi
fi
if test "x$no_gtk" = x ; then
AC_MSG_RESULT(yes)
ifelse([$2], , :, [$2])
else
AC_MSG_RESULT(no)
if test "$GTK_CONFIG" = "no" ; then
echo "*** The gtk-config script installed by GTK could not be found"
echo "*** If GTK was installed in PREFIX, make sure PREFIX/bin is in"
echo "*** your path, or set the GTK_CONFIG environment variable to the"
echo "*** full path to gtk-config."
else
if test -f conf.gtktest ; then
:
else
echo "*** Could not run GTK test program, checking why..."
CFLAGS="$CFLAGS $GTK_CFLAGS"
LIBS="$LIBS $GTK_LIBS"
AC_TRY_LINK([
#include <gtk/gtk.h>
#include <stdio.h>
], [ return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ],
[ echo "*** The test program compiled, but did not run. This usually means"
echo "*** that the run-time linker is not finding GTK or finding the wrong"
echo "*** version of GTK. If it is not finding GTK, you'll need to set your"
echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
echo "*** to the installed location Also, make sure you have run ldconfig if that"
echo "*** is required on your system"
echo "***"
echo "*** If you have an old version installed, it is best to remove it, although"
echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
echo "***"
echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that"
echo "*** came with the system with the command"
echo "***"
echo "*** rpm --erase --nodeps gtk gtk-devel" ],
[ echo "*** The test program failed to compile or link. See the file config.log for the"
echo "*** exact error that occured. This usually means GTK was incorrectly installed"
echo "*** or that you have moved GTK since it was installed. In the latter case, you"
echo "*** may want to edit the gtk-config script: $GTK_CONFIG" ])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
fi
fi
GTK_CFLAGS=""
GTK_LIBS=""
ifelse([$3], , :, [$3])
fi
AC_SUBST(GTK_CFLAGS)
AC_SUBST(GTK_LIBS)
rm -f conf.gtktest
])

1790
configure vendored Executable file

File diff suppressed because it is too large Load diff

81
configure.in Normal file
View file

@ -0,0 +1,81 @@
dnl ---------------------------------------------------------------------------
dnl Process this file with autoconf to produce a configure script.
dnl $Id$
dnl ---------------------------------------------------------------------------
AC_INIT(gtkslash.c)
GTKSLASH_VERSION=0.5.4
dnl ---------------------------------------------------------------------------
dnl for automake:
dnl ---------------------------------------------------------------------------
AUTOMAKE_OPTIONS=no-dependencies
VERSION=$GTKSLASH_VERSION
PACKAGE=gtkslash
dnl ---------------------------------------------------------------------------
dnl Initialize automake now
dnl ---------------------------------------------------------------------------
AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
AC_SUBST(GTKSLASH_VERSION)
dnl ---------------------------------------------------------------------------
dnl checks for needed compilers
dnl ---------------------------------------------------------------------------
dnl CFLAGS=""
dnl if test x${CFLAGS+set} = xset ; then
dnl :
dnl else
dnl CFLAGS="-O2 -g"
dnl fi
AC_PROG_CC
dnl AC_PROG_CXX
dnl AC_PROG_RANLIB
dnl ---------------------------------------------------------------------------
dnl clean compiles
dnl ---------------------------------------------------------------------------
compiler_warnings=yes
AC_ARG_ENABLE(
warnings,
[ --disable-warnings turn OFF gcc compiler warnings (not recommended)],
[if test $enableval = no; then
compiler_warnings=no
fi]
)
dnl ---------------------------------------------------------------------------
dnl now some other stuff
dnl AC_CANONICAL_HOST ... needs config.guess
dnl ---------------------------------------------------------------------------
AM_SANITY_CHECK
dnl ---------------------------------------------------------------------------
dnl check for GTK
dnl ---------------------------------------------------------------------------
AM_PATH_GTK(1.1.2,
[LIBS="$LIBS $GTK_LIBS"
CFLAGS="$CFLAGS $GTK_CFLAGS"],
AC_MSG_ERROR(Cannot find GTK+: Is gtk-config in executable path?))
dnl ---------------------------------------------------------------------------
dnl enable GUI/console type checking
dnl ---------------------------------------------------------------------------
dnl ---------------------------------------------------------------------------
dnl checks for correctly defined types
dnl ---------------------------------------------------------------------------
AC_HEADER_STDC
AC_HEADER_SYS_WAIT
dnl ---------------------------------------------------------------------------
dnl checks for header files & functions
dnl ---------------------------------------------------------------------------
AC_CHECK_HEADERS(unistd.h)
dnl ---------------------------------------------------------------------------
dnl Makefiles to create:
dnl ---------------------------------------------------------------------------
AC_OUTPUT(Makefile)

View file

@ -4,13 +4,11 @@
* Based on original code from slashes.pl
* (c) 1998 Alex Shnitman <alexsh@linux.org.il>
*
* Other cool code from gRun
* Other cool code from grun
* (c) 1998 Southern Gold Development <tangomanrulz@geocities.com>
*
* This code is distributed under the terms of the GNU
* General Public License, etc etc. Use it, don't abuse it.
* See the file "Copying" for the entire GNU Public
* License policy.
*/
/* just what it says - good for layout development
@ -24,8 +22,13 @@
#define DIR_CHAR "\\"
#define DOT_CHAR "_"
#else
/* TODO: add appropriate unix headers */
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/wait.h>
#define DIR_CHAR "/"
#define DOT_CHAR "."
/* these two allow Win people to "hide" a cmdline
@ -41,7 +44,6 @@
#define MAX_BUFF 1024
#define APP_RC "gtkslashrc"
/* localization, anyone? */
#define MSG_TITLE "Slashdot Headlines"
#define MSG_INIT "Initializing..."
#define MSG_LOAD "Loading ultramode.txt..."
@ -50,16 +52,19 @@
#define MSG_RETR_ERR "Error retrieving ultramode.txt!"
#define MSG_LAUNCH "Launching web browser..."
#define MSG_LAUNCH_ERR "Error launching browser!"
#define MSG_IDLE "Status: Idle (gtkSlash 0.5.3)"
#define MSG_IDLE "Status: Idle (gtkSlash 0.5.4)"
/* read in from the RC file */
static gint refresh_timeout;
static gchar browser_cmd[MAX_BUFF];
static gchar curl_cmd[MAX_BUFF];
static BOOL compact_mode;
static gint num_fields;
static GtkWidget *status;
static BOOL comments_flat;
/* read from RC file */
gint refresh_timeout;
gchar browser_cmd[MAX_BUFF];
gchar new_browser_cmd[MAX_BUFF];
gchar curl_cmd[MAX_BUFF];
BOOL compact_mode;
gint num_fields;
BOOL comments_flat;
/* some ugly global vars */
GtkWidget *status;
/* retrieves a line from a linefeed delimited textfile */
gchar *app_getLine(FILE *file) {
@ -116,6 +121,7 @@ BOOL app_loadFile(GtkWidget *list, const gchar *fname) {
}
gtk_clist_clear(GTK_CLIST(list));
gtk_clist_freeze(GTK_CLIST(list));
link = NULL;
while (line) {
for (i = 0 ; i<num_fields; i++) {
line = app_getLine(fHnd);
@ -155,12 +161,16 @@ BOOL app_loadFile(GtkWidget *list, const gchar *fname) {
/* launches a given app */
BOOL app_startApp(const gchar *cmd, BOOL bWait, WORD wShowState) {
#ifndef WIN32
char **args, *work, *twrk, **awrk;
int cnt, len, scnt, pid, term;
char **args, *work, *twrk;
int cnt, len, scnt, pid, sta;
pid = fork();
if (pid == 0) {
pid = fork();
/* if not waiting for return of app, fork() again to
* detach completely */
if (!bWait) {
pid = fork();
}
if (pid == 0) {
len = strlen(cmd);
scnt = 1;
@ -174,8 +184,7 @@ BOOL app_startApp(const gchar *cmd, BOOL bWait, WORD wShowState) {
if (scnt == 1) {
args[0] = g_malloc(sizeof(char) * (len + 1));
strcpy(args[0], cmd);
}
else {
} else {
work = g_malloc(sizeof(char) * (len + 1));
strcpy(work, cmd);
twrk = (char *) strsep(&work, " ");
@ -190,12 +199,18 @@ BOOL app_startApp(const gchar *cmd, BOOL bWait, WORD wShowState) {
}
/* TODO: wait for curl to finish on unix */
execvp(args[0], args);
} else {
_exit(0);
}
} else {
if (bWait) {
pid = wait(&sta);
return WIFEXITED(sta);
} else {
return TRUE;
}
else {
return FALSE;
}
}
return TRUE;
#else /* Win32 */
STARTUPINFO startupinfo;
PROCESS_INFORMATION processinfo;
@ -280,7 +295,6 @@ gint app_timer_refresh(GtkWidget *list) {
strcat(fname, DIR_CHAR);
strcat(fname, "ultramode.tmp");
gtk_list_clear_items (GTK_LIST(list), 0, -1);
retval = TRUE;
#ifndef _LOCAL_TEST_MODE
remove(fname);
@ -311,9 +325,12 @@ gint app_refresh(GtkWidget *widget, GtkWidget *list) {
}
/* launch our article */
gint app_article_browse(GtkWidget *widget, gpointer data) {
gchar *url;
void app_article_browse(GtkWidget *widget, gpointer data) {
gint rerr;
struct stat buff;
gchar *url, *fname, *home;
gchar cmd[MAX_BUFF];
url = gtk_clist_get_row_data(GTK_CLIST(data), GTK_CLIST(data)->focus_row);
if (comments_flat) {
gchar *tmp;
@ -321,12 +338,24 @@ gint app_article_browse(GtkWidget *widget, gpointer data) {
url[tmp - url] = '\0';
strcat(url, "_F.shtml");
}
#ifndef WIN32
home = getenv("HOME");
fname = g_malloc(sizeof(gchar) * (strlen(home) + 16));
strcpy(fname, home);
strcat(fname, "/.netscape/lock");
rerr = lstat(fname, &buff);
if (rerr == -1) {
sprintf(cmd, new_browser_cmd, url);
} else {
sprintf(cmd, browser_cmd, url);
}
#else
sprintf(cmd, browser_cmd, url);
#endif /* WIN32 */
gtk_label_set(GTK_LABEL(status), MSG_LAUNCH);
if (!app_startApp(cmd, FALSE, SW_SHOWDEFAULT))
gtk_label_set(GTK_LABEL(status), MSG_LAUNCH_ERR);
gtk_timeout_add(1000*5, app_timer_idle, NULL);
return FALSE;
}
/* sorting */
@ -375,6 +404,7 @@ BOOL app_parse_rc() {
compact_mode = RCGetBool("compact-mode", FALSE);
num_fields = RCGetInt("num-fields", 9);
RCGetString("browser-cmd", browser_cmd, "", sizeof(browser_cmd));
RCGetString("new-browser-cmd", new_browser_cmd, "", sizeof(new_browser_cmd));
RCGetString("curl-cmd", curl_cmd, "", sizeof(curl_cmd));
comments_flat = RCGetBool("comments-flat", FALSE);
@ -383,7 +413,7 @@ BOOL app_parse_rc() {
}
void app_window() {
GtkWidget *window, *vbox, *clist, *scrolled_win;
GtkWidget *window, *vbox, *clist, *scrolled_win, *hbox, *but;
gchar *titles[4] = {"Title", "Author", "Topic", "Comments"};
window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
@ -395,7 +425,11 @@ void app_window() {
vbox = gtk_vbox_new(FALSE, 5);
gtk_container_border_width (GTK_CONTAINER(vbox), 5);
gtk_container_add(GTK_CONTAINER(window), vbox);
gtk_widget_show(vbox);
scrolled_win = gtk_scrolled_window_new (NULL, NULL);
gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolled_win),
GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
gtk_box_pack_start(GTK_BOX(vbox), scrolled_win, TRUE, TRUE, 0);
clist = gtk_clist_new_with_titles(4, titles);
gtk_clist_set_selection_mode(GTK_CLIST(clist), GTK_SELECTION_BROWSE);
@ -405,17 +439,11 @@ void app_window() {
gtk_clist_set_column_width(GTK_CLIST(clist), 3, 10);
gtk_signal_connect(GTK_OBJECT (clist), "click_column",
(GtkSignalFunc)app_click_column, NULL);
gtk_widget_show(clist);
scrolled_win = gtk_scrolled_window_new (NULL, NULL);
gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolled_win),
GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
gtk_container_add(GTK_CONTAINER(scrolled_win), clist);
gtk_box_pack_start(GTK_BOX(vbox), scrolled_win, TRUE, TRUE, 0);
gtk_widget_show(clist);
gtk_widget_show(scrolled_win);
if (!compact_mode) {
GtkWidget *hbox, *but;
hbox = gtk_hbox_new(FALSE, 0);
but = gtk_button_new_with_label("Refresh");
gtk_widget_set_usize(GTK_WIDGET(but), 70, 24);
@ -443,14 +471,15 @@ void app_window() {
gtk_widget_show(hbox);
} else {
gtk_clist_column_titles_hide(GTK_CLIST(clist));
gtk_signal_connect(GTK_OBJECT(GTK_CLIST(clist)->selection), "select_row", (GtkSignalFunc) app_article_browse, (gpointer)clist);
gtk_signal_connect(GTK_OBJECT (clist), "select_row", (GtkSignalFunc) app_article_browse, (gpointer)clist);
status = gtk_label_new("");
}
gtk_timeout_add(1000*refresh_timeout, app_timer_refresh, clist);
gtk_timeout_add(1000*refresh_timeout, (GtkFunction) app_timer_refresh, clist);
gtk_widget_show(vbox);
gtk_widget_show(window);
gtk_widget_draw_children(window);
app_refresh(NULL, clist);
}

45
gtkslashrc Normal file
View file

@ -0,0 +1,45 @@
# Configuration file for gtkSlash
#
# System Wide:
# /etc/gtkslashrc
# <windowsdir>\gtkslashrc
#
# Per user:
# <HOME>/.gtkslashrc
# <HOME>\_gtkslashrc
# Number of seconds before a refresh is performed...
# Since ultramode.txt only updates once in 30 minutes,
# the timeout is set to that value.
# Default: 1800
refresh-timeout 1800
# Netscape command, %s is replaced by the URL
# Default: none
#browser-cmd "D:\Netscape\Program\netscape.exe %s"
# Under *nix, we need two commands for netscape - one if the browser
# isn't running already, and one if it is
new-browser-cmd "/usr/bin/netscape %s"
browser-cmd "/usr/bin/netscape -remote openURL(%s, new_window)"
# Curl command, %s is replaced by ~/ultramode.tmp
# Default: none
#curl-cmd "C:\Util\curl.exe -s -o %s http://slashdot.org/ultramode.txt"
curl-cmd "/usr/local/bin/curl -s -o %s http://slashdot.org/ultramode.txt"
# If you'd like to run gtkslash in "compact" mode (without
# the buttons on the bottom & the column titles, and
# launching an article upon a click on its row) set this
# variable to ON. Default: OFF
compact-mode OFF
# Number of fields in ultramode.txt, delimited by the %%
# identifier. There are 9 fields per record as of 12/9/98.
# Default: 9
num-fields 9
# If you want the comments displayed 'flat' (ie, not in
# a threaded treeview mode) when going to /., set this to ON.
# Default: OFF
comments-flat OFF

250
install-sh Executable file
View file

@ -0,0 +1,250 @@
#!/bin/sh
#
# install - install a program, script, or datafile
# This comes from X11R5 (mit/util/scripts/install.sh).
#
# Copyright 1991 by the Massachusetts Institute of Technology
#
# Permission to use, copy, modify, distribute, and sell this software and its
# documentation for any purpose is hereby granted without fee, provided that
# the above copyright notice appear in all copies and that both that
# copyright notice and this permission notice appear in supporting
# documentation, and that the name of M.I.T. not be used in advertising or
# publicity pertaining to distribution of the software without specific,
# written prior permission. M.I.T. makes no representations about the
# suitability of this software for any purpose. It is provided "as is"
# without express or implied warranty.
#
# Calling this script install-sh is preferred over install.sh, to prevent
# `make' implicit rules from creating a file called install from it
# when there is no Makefile.
#
# This script is compatible with the BSD install script, but was written
# from scratch. It can only install one file at a time, a restriction
# shared with many OS's install programs.
# set DOITPROG to echo to test this script
# Don't use :- since 4.3BSD and earlier shells don't like it.
doit="${DOITPROG-}"
# put in absolute paths if you don't have them in your path; or use env. vars.
mvprog="${MVPROG-mv}"
cpprog="${CPPROG-cp}"
chmodprog="${CHMODPROG-chmod}"
chownprog="${CHOWNPROG-chown}"
chgrpprog="${CHGRPPROG-chgrp}"
stripprog="${STRIPPROG-strip}"
rmprog="${RMPROG-rm}"
mkdirprog="${MKDIRPROG-mkdir}"
transformbasename=""
transform_arg=""
instcmd="$mvprog"
chmodcmd="$chmodprog 0755"
chowncmd=""
chgrpcmd=""
stripcmd=""
rmcmd="$rmprog -f"
mvcmd="$mvprog"
src=""
dst=""
dir_arg=""
while [ x"$1" != x ]; do
case $1 in
-c) instcmd="$cpprog"
shift
continue;;
-d) dir_arg=true
shift
continue;;
-m) chmodcmd="$chmodprog $2"
shift
shift
continue;;
-o) chowncmd="$chownprog $2"
shift
shift
continue;;
-g) chgrpcmd="$chgrpprog $2"
shift
shift
continue;;
-s) stripcmd="$stripprog"
shift
continue;;
-t=*) transformarg=`echo $1 | sed 's/-t=//'`
shift
continue;;
-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
shift
continue;;
*) if [ x"$src" = x ]
then
src=$1
else
# this colon is to work around a 386BSD /bin/sh bug
:
dst=$1
fi
shift
continue;;
esac
done
if [ x"$src" = x ]
then
echo "install: no input file specified"
exit 1
else
true
fi
if [ x"$dir_arg" != x ]; then
dst=$src
src=""
if [ -d $dst ]; then
instcmd=:
else
instcmd=mkdir
fi
else
# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
# might cause directories to be created, which would be especially bad
# if $src (and thus $dsttmp) contains '*'.
if [ -f $src -o -d $src ]
then
true
else
echo "install: $src does not exist"
exit 1
fi
if [ x"$dst" = x ]
then
echo "install: no destination specified"
exit 1
else
true
fi
# If destination is a directory, append the input filename; if your system
# does not like double slashes in filenames, you may need to add some logic
if [ -d $dst ]
then
dst="$dst"/`basename $src`
else
true
fi
fi
## this sed command emulates the dirname command
dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
# Make sure that the destination directory exists.
# this part is taken from Noah Friedman's mkinstalldirs script
# Skip lots of stat calls in the usual case.
if [ ! -d "$dstdir" ]; then
defaultIFS='
'
IFS="${IFS-${defaultIFS}}"
oIFS="${IFS}"
# Some sh's can't handle IFS=/ for some reason.
IFS='%'
set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
IFS="${oIFS}"
pathcomp=''
while [ $# -ne 0 ] ; do
pathcomp="${pathcomp}${1}"
shift
if [ ! -d "${pathcomp}" ] ;
then
$mkdirprog "${pathcomp}"
else
true
fi
pathcomp="${pathcomp}/"
done
fi
if [ x"$dir_arg" != x ]
then
$doit $instcmd $dst &&
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
else
# If we're going to rename the final executable, determine the name now.
if [ x"$transformarg" = x ]
then
dstfile=`basename $dst`
else
dstfile=`basename $dst $transformbasename |
sed $transformarg`$transformbasename
fi
# don't allow the sed command to completely eliminate the filename
if [ x"$dstfile" = x ]
then
dstfile=`basename $dst`
else
true
fi
# Make a temp file name in the proper directory.
dsttmp=$dstdir/#inst.$$#
# Move or copy the file name to the temp name
$doit $instcmd $src $dsttmp &&
trap "rm -f ${dsttmp}" 0 &&
# and set any options; do chmod last to preserve setuid bits
# If any of these fail, we abort the whole thing. If we want to
# ignore errors from any of these, just make sure not to ignore
# errors from the above "$doit $instcmd $src $dsttmp" command.
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
# Now rename the file to the real destination.
$doit $rmcmd -f $dstdir/$dstfile &&
$doit $mvcmd $dsttmp $dstdir/$dstfile
fi &&
exit 0

188
missing Executable file
View file

@ -0,0 +1,188 @@
#! /bin/sh
# Common stub for a few missing GNU programs while installing.
# Copyright (C) 1996, 1997 Free Software Foundation, Inc.
# Franc,ois Pinard <pinard@iro.umontreal.ca>, 1996.
# 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, 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.
if test $# -eq 0; then
echo 1>&2 "Try \`$0 --help' for more information"
exit 1
fi
case "$1" in
-h|--h|--he|--hel|--help)
echo "\
$0 [OPTION]... PROGRAM [ARGUMENT]...
Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
error status if there is no known handling for PROGRAM.
Options:
-h, --help display this help and exit
-v, --version output version information and exit
Supported PROGRAM values:
aclocal touch file \`aclocal.m4'
autoconf touch file \`configure'
autoheader touch file \`config.h.in'
automake touch all \`Makefile.in' files
bison create \`y.tab.[ch]', if possible, from existing .[ch]
flex create \`lex.yy.c', if possible, from existing .c
lex create \`lex.yy.c', if possible, from existing .c
makeinfo touch the output file
yacc create \`y.tab.[ch]', if possible, from existing .[ch]"
;;
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
echo "missing - GNU libit 0.0"
;;
-*)
echo 1>&2 "$0: Unknown \`$1' option"
echo 1>&2 "Try \`$0 --help' for more information"
exit 1
;;
aclocal)
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
you modified \`acinclude.m4' or \`configure.in'. You might want
to install the \`Automake' and \`Perl' packages. Grab them from
any GNU archive site."
touch aclocal.m4
;;
autoconf)
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
you modified \`configure.in'. You might want to install the
\`Autoconf' and \`GNU m4' packages. Grab them from any GNU
archive site."
touch configure
;;
autoheader)
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
you modified \`acconfig.h' or \`configure.in'. You might want
to install the \`Autoconf' and \`GNU m4' packages. Grab them
from any GNU archive site."
files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER([^):]*:\([^)]*\)).*/\1/p' configure.in`
if test -z "$files"; then
files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^):]*\)).*/\1/p' configure.in`
test -z "$files" || files="$files.in"
else
files=`echo "$files" | sed -e 's/:/ /g'`
fi
test -z "$files" && files="config.h.in"
touch $files
;;
automake)
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
you modified \`Makefile.am', \`acinclude.m4' or \`configure.in'.
You might want to install the \`Automake' and \`Perl' packages.
Grab them from any GNU archive site."
find . -type f -name Makefile.am -print \
| sed 's/^\(.*\).am$/touch \1.in/' \
| sh
;;
bison|yacc)
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
you modified a \`.y' file. You may need the \`Bison' package
in order for those modifications to take effect. You can get
\`Bison' from any GNU archive site."
rm -f y.tab.c y.tab.h
if [ $# -ne 1 ]; then
eval LASTARG="\${$#}"
case "$LASTARG" in
*.y)
SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
if [ -f "$SRCFILE" ]; then
cp "$SRCFILE" y.tab.c
fi
SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
if [ -f "$SRCFILE" ]; then
cp "$SRCFILE" y.tab.h
fi
;;
esac
fi
if [ ! -f y.tab.h ]; then
echo >y.tab.h
fi
if [ ! -f y.tab.c ]; then
echo 'main() { return 0; }' >y.tab.c
fi
;;
lex|flex)
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
you modified a \`.l' file. You may need the \`Flex' package
in order for those modifications to take effect. You can get
\`Flex' from any GNU archive site."
rm -f lex.yy.c
if [ $# -ne 1 ]; then
eval LASTARG="\${$#}"
case "$LASTARG" in
*.l)
SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
if [ -f "$SRCFILE" ]; then
cp "$SRCFILE" lex.yy.c
fi
;;
esac
fi
if [ ! -f lex.yy.c ]; then
echo 'main() { return 0; }' >lex.yy.c
fi
;;
makeinfo)
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
you modified a \`.texi' or \`.texinfo' file, or any other file
indirectly affecting the aspect of the manual. The spurious
call might also be the consequence of using a buggy \`make' (AIX,
DU, IRIX). You might want to install the \`Texinfo' package or
the \`GNU make' package. Grab either from any GNU archive site."
file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
if test -z "$file"; then
file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file`
fi
touch $file
;;
*)
echo 1>&2 "\
WARNING: \`$1' is needed, and you do not seem to have it handy on your
system. You might have modified some files without having the
proper tools for further handling them. Check the \`README' file,
it often tells you about the needed prerequirements for installing
this package. You may also peek at any GNU archive site, in case
some other package would contain this missing \`$1' program."
exit 1
;;
esac
exit 0

40
mkinstalldirs Executable file
View file

@ -0,0 +1,40 @@
#! /bin/sh
# mkinstalldirs --- make directory hierarchy
# Author: Noah Friedman <friedman@prep.ai.mit.edu>
# Created: 1993-05-16
# Public domain
# $Id: mkinstalldirs,v 1.10 1996/05/03 07:37:52 friedman Exp $
errstatus=0
for file
do
set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
shift
pathcomp=
for d
do
pathcomp="$pathcomp$d"
case "$pathcomp" in
-* ) pathcomp=./$pathcomp ;;
esac
if test ! -d "$pathcomp"; then
echo "mkdir $pathcomp" 1>&2
mkdir "$pathcomp" || lasterr=$?
if test ! -d "$pathcomp"; then
errstatus=$lasterr
fi
fi
pathcomp="$pathcomp/"
done
done
exit $errstatus
# mkinstalldirs ends here

View file

@ -4,13 +4,9 @@
*
* This is taken from the LiteStep Shell Source code
* (http://www.litestep.net) and modified a bunch to meet
* our RC needs along with using gdk.
*
* This code is distributed under the terms of the GNU
* General Public License, etc etc. Use it, don't abuse it.
* See the file "Copying" for the entire GNU Public
* License policy.
*/
* our RC needs along with using gdk. It is released under
* the GPL and any litestep licensing restrictions.
*/
#include <gdk/gdk.h>
#ifdef WIN32
@ -154,7 +150,11 @@ gchar* RCFindLine(const gchar *lpKeyName)
gint l = strlen(lpKeyName);
for (i = 0; i < RCLen; i++) {
#ifdef WIN32
if (!strnicmp(RCBuffer[i], lpKeyName, l))
#else
if (!strncasecmp(RCBuffer[i], lpKeyName, l))
#endif
return RCBuffer[i];
}
@ -197,7 +197,11 @@ BOOL RCGetBool(const gchar *lpKeyName, BOOL ifFound)
count = RCTokenize (line, tokens, 2, NULL);
if (count < 2)
return ifFound;
#ifdef WIN32
if (strnicmp (token2, "OFF", 3) == 0)
#else
if (strncasecmp (token2, "OFF", 3) == 0)
#endif
return FALSE;
else
return TRUE; /* ON */
@ -236,8 +240,8 @@ void RCVarExpansion(gchar *buffer, const gchar *value)
gchar buf2[255];
strcpy(buffer, value);
if (startDollar = strchr(value, '$')) {
if (endDollar = strchr(&startDollar[1], '$')) {
if ((startDollar = strchr(value, '$'))) {
if ((endDollar = strchr(&startDollar[1], '$'))) {
i = strlen(startDollar) - strlen(endDollar) - 1;
j = strlen(value) - strlen(startDollar);
string1 = startDollar;

View file

@ -1,24 +1,18 @@
#ifndef _RCFUNCS_H_
#define _RCFUNCS_H_
/*
* rcfuncs - routines to parse generic RC files
* tengel@sonic.net
*
* This is taken from the LiteStep Shell Source code
* (http://www.litestep.net) and modified a bunch to meet
* our RC needs along with using gdk.
*
* This code is distributed under the terms of the GNU
* General Public License, etc etc. Use it, don't abuse it.
* See the file "Copying" for the entire GNU Public
* License policy.
*/
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#ifndef WIN32
typedef gboolean BOOL;
typedef guint DWORD;
typedef gushort WORD;
#include <ctype.h>
#include <stdlib.h>
#endif
FILE* RCOpen(const gchar *szFile);
BOOL RCClose(FILE *f);
gint RCTokenize(const gchar *szString, gchar **lpszBuffers, DWORD dwNumBuffers, gchar *szExtraParameters);