commit chmlib for openSUSE:Factory
![](https://seccdn.libravatar.org/avatar/e2145bc5cf53dda95c308a3c75e8fef3.jpg?s=120&d=mm&r=g)
Hello community, here is the log from the commit of package chmlib for openSUSE:Factory checked in at Mon May 25 00:25:31 CEST 2009. -------- --- chmlib/chmlib.changes 2009-02-27 23:20:05.000000000 +0100 +++ /mounts/work_src_done/STABLE/chmlib/chmlib.changes 2009-05-24 14:21:50.000000000 +0200 @@ -1,0 +2,9 @@ +Sun May 24 14:16:05 CEST 2009 - vuntz@novell.com + +- Update to version 0.40: + + minor bugfix release + + fix a few bugs related to the example programs, including + stability issues related to chm_http. + + remove the bashisms from mozilla_helper.sh. + +------------------------------------------------------------------- calling whatdependson for head-i586 Old: ---- chmlib-0.39.tar.bz2 New: ---- chmlib-0.40.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ chmlib.spec ++++++ --- /var/tmp/diff_new_pack.Q12814/_old 2009-05-25 00:23:28.000000000 +0200 +++ /var/tmp/diff_new_pack.Q12814/_new 2009-05-25 00:23:28.000000000 +0200 @@ -1,5 +1,5 @@ # -# spec file for package chmlib (Version 0.39) +# spec file for package chmlib (Version 0.40) # # Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany. # @@ -23,11 +23,10 @@ License: LGPL v2.1 or later Group: System/Libraries AutoReqProv: on -Version: 0.39 -Release: 102 -%define rversion 0.39 +Version: 0.40 +Release: 1 Source0: %{name}-%{version}.tar.bz2 -Patch: %{name}-%{version}.diff +Patch: %{name}-0.39.diff Url: http://www.jedrea.com/chmlib/ BuildRoot: %{_tmppath}/%{name}-%{version}-build Summary: A library for dealing with ITSS/CHM files @@ -59,7 +58,7 @@ Jed Wing <jedwin@ugcs.caltech.edu> %prep -%setup -q -n "%{name}-%{rversion}" +%setup -q %patch %build @@ -83,16 +82,22 @@ %files %defattr(-, root, root) %doc AUTHORS COPYING NEWS README -%{_prefix}/%_lib/*.so.* +%{_libdir}/*.so.* %files devel %defattr(-, root, root) -/usr/include/chm_lib.h -/usr/include/lzx.h -%{_prefix}/%_lib/*.so +%{_includedir}/chm_lib.h +%{_includedir}/lzx.h +%{_libdir}/*.so %changelog -* Fri Feb 27 2009 crrodriguez@suse.de +* Sun May 24 2009 vuntz@novell.com +- Update to version 0.40: + + minor bugfix release + + fix a few bugs related to the example programs, including + stability issues related to chm_http. + + remove the bashisms from mozilla_helper.sh. +* Sat Feb 28 2009 crrodriguez@suse.de - remove static libraries and "la" files * Thu Feb 08 2007 dmueller@suse.de - fix -devel requir'ing release number ++++++ chmlib-0.39.tar.bz2 -> chmlib-0.40.tar.bz2 ++++++ ++++ 58760 lines of diff (skipped) ++++ retrying with extended exclude list diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/chmlib-0.39/configure.in new/chmlib-0.40/configure.in --- old/chmlib-0.39/configure.in 2007-01-25 03:02:27.000000000 +0100 +++ new/chmlib-0.40/configure.in 2009-05-23 17:11:09.000000000 +0200 @@ -1,5 +1,5 @@ dnl Process this file with autoconf to produce a configure script. -AC_INIT([chmlib],[0.39]) +AC_INIT([chmlib],[0.40]) dnl,[Jed Wing <jedwin@ugcs.caltech.edu>]) AC_CONFIG_SRCDIR(src/chm_lib.c) AM_INIT_AUTOMAKE diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/chmlib-0.39/contrib/mozilla_helper.sh new/chmlib-0.40/contrib/mozilla_helper.sh --- old/chmlib-0.39/contrib/mozilla_helper.sh 2006-06-16 21:57:32.000000000 +0200 +++ new/chmlib-0.40/contrib/mozilla_helper.sh 2009-05-23 16:43:31.000000000 +0200 @@ -8,15 +8,13 @@ chm_http --port=$port --bind=$host "$*" >chm.log 2>&1 & HTTP=/tmp/chm2http.html -echo -e "<html><head>\n<title>$*</title>" >$HTTP -echo -e "<meta http-equiv='refresh' content=\"5; -url=http://$host:$port/\">" >>$HTTP -echo -e "<title>working</title></head>" >>$HTTP -echo -e "<body>please wait while I unpack :$*:<br>working...<br><br>" ->>$HTTP -echo -e "chm_http reports:<br>" >>$HTTP +echo "<html><head><title>$*</title>" >$HTTP +echo "<meta http-equiv='refresh' content=\"5; url=http://$host:$port/\">" >>$HTTP +echo "<title>working</title></head>" >>$HTTP +echo "<body>please wait while I unpack :$*:<br>working...<br><br>" >>$HTTP +echo "chm_http reports:<br>" >>$HTTP cat chm.log >>$HTTP -echo -e "</body></html>" >>$HTTP +echo "</body></html>" >>$HTTP mozilla -remote "openURL($HTTP)" rm -f /tmp/chm.log /tmp/chm2http.html diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/chmlib-0.39/INSTALL new/chmlib-0.40/INSTALL --- old/chmlib-0.39/INSTALL 2006-11-27 03:51:30.000000000 +0100 +++ new/chmlib-0.40/INSTALL 2009-05-23 16:43:52.000000000 +0200 @@ -1,16 +1,19 @@ Installation Instructions ************************* -Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005 Free -Software Foundation, Inc. +Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, +2006, 2007, 2008 Free Software Foundation, Inc. -This file is free documentation; the Free Software Foundation gives + This file is free documentation; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. Basic Installation ================== -These are generic installation instructions. + Briefly, the shell commands `./configure; make; make install' should +configure, build, and install this package. The following +more-detailed instructions are generic; see the `README' file for +instructions specific to this package. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses @@ -23,9 +26,9 @@ It can also use an optional file (typically called `config.cache' and enabled with `--cache-file=config.cache' or simply `-C') that saves -the results of its tests to speed up reconfiguring. (Caching is +the results of its tests to speed up reconfiguring. Caching is disabled by default to prevent problems with accidental use of stale -cache files.) +cache files. If you need to do unusual things to compile the package, please try to figure out how `configure' could check whether to do them, and mail @@ -35,20 +38,17 @@ may remove or edit it. The file `configure.ac' (or `configure.in') is used to create -`configure' by a program called `autoconf'. You only need -`configure.ac' if you want to change it or regenerate `configure' using -a newer version of `autoconf'. +`configure' by a program called `autoconf'. You need `configure.ac' if +you want to change it or regenerate `configure' using a newer version +of `autoconf'. The simplest way to compile this package is: 1. `cd' to the directory containing the package's source code and type - `./configure' to configure the package for your system. If you're - using `csh' on an old version of System V, you might need to type - `sh ./configure' instead to prevent `csh' from trying to execute - `configure' itself. + `./configure' to configure the package for your system. - Running `configure' takes awhile. While running, it prints some - messages telling which features it is checking for. + Running `configure' might take a while. While running, it prints + some messages telling which features it is checking for. 2. Type `make' to compile the package. @@ -67,42 +67,57 @@ all sorts of other programs in order to regenerate files that came with the distribution. + 6. Often, you can also type `make uninstall' to remove the installed + files again. + Compilers and Options ===================== -Some systems require unusual options for compilation or linking that the -`configure' script does not know about. Run `./configure --help' for -details on some of the pertinent environment variables. + Some systems require unusual options for compilation or linking that +the `configure' script does not know about. Run `./configure --help' +for details on some of the pertinent environment variables. You can give `configure' initial values for configuration parameters by setting variables in the command line or in the environment. Here is an example: - ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix + ./configure CC=c99 CFLAGS=-g LIBS=-lposix *Note Defining Variables::, for more details. Compiling For Multiple Architectures ==================================== -You can compile the package for more than one kind of computer at the + You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their -own directory. To do this, you must use a version of `make' that -supports the `VPATH' variable, such as GNU `make'. `cd' to the +own directory. To do this, you can use GNU `make'. `cd' to the directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the source code in the directory that `configure' is in and in `..'. - If you have to use a `make' that does not support the `VPATH' -variable, you have to compile the package for one architecture at a -time in the source code directory. After you have installed the -package for one architecture, use `make distclean' before reconfiguring -for another architecture. + With a non-GNU `make', it is safer to compile the package for one +architecture at a time in the source code directory. After you have +installed the package for one architecture, use `make distclean' before +reconfiguring for another architecture. + + On MacOS X 10.5 and later systems, you can create libraries and +executables that work on multiple system types--known as "fat" or +"universal" binaries--by specifying multiple `-arch' options to the +compiler but only a single `-arch' option to the preprocessor. Like +this: + + ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ + CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ + CPP="gcc -E" CXXCPP="g++ -E" + + This is not guaranteed to produce working output in all cases, you +may have to build one architecture at a time and combine the results +using the `lipo' tool if you have problems. Installation Names ================== -By default, `make install' installs the package's commands under + By default, `make install' installs the package's commands under `/usr/local/bin', include files under `/usr/local/include', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PREFIX'. @@ -125,7 +140,7 @@ Optional Features ================= -Some packages pay attention to `--enable-FEATURE' options to + Some packages pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part of the package. They may also pay attention to `--with-PACKAGE' options, where PACKAGE is something like `gnu-as' or `x' (for the X Window System). The @@ -137,14 +152,36 @@ you can use the `configure' options `--x-includes=DIR' and `--x-libraries=DIR' to specify their locations. +Particular systems +================== + + On HP-UX, the default C compiler is not ANSI C compatible. If GNU +CC is not installed, it is recommended to use the following options in +order to use an ANSI C compiler: + + ./configure CC="cc -Ae" + +and if that doesn't work, install pre-built binaries of GCC for HP-UX. + + On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot +parse its `<wchar.h>' header file. The option `-nodtk' can be used as +a workaround. If GNU CC is not installed, it is therefore recommended +to try + + ./configure CC="cc" + +and if that doesn't work, try + + ./configure CC="cc -nodtk" + Specifying the System Type ========================== -There may be some features `configure' cannot figure out automatically, -but needs to determine by the type of machine the package will run on. -Usually, assuming the package is built to be run on the _same_ -architectures, `configure' can figure that out, but if it prints a -message saying it cannot guess the machine type, give it the + There may be some features `configure' cannot figure out +automatically, but needs to determine by the type of machine the package +will run on. Usually, assuming the package is built to be run on the +_same_ architectures, `configure' can figure that out, but if it prints +a message saying it cannot guess the machine type, give it the `--build=TYPE' option. TYPE can either be a short name for the system type, such as `sun4', or a canonical name which has the form: @@ -170,9 +207,9 @@ Sharing Defaults ================ -If you want to set default values for `configure' scripts to share, you -can create a site shell script called `config.site' that gives default -values for variables like `CC', `cache_file', and `prefix'. + If you want to set default values for `configure' scripts to share, +you can create a site shell script called `config.site' that gives +default values for variables like `CC', `cache_file', and `prefix'. `configure' looks for `PREFIX/share/config.site' if it exists, then `PREFIX/etc/config.site' if it exists. Or, you can set the `CONFIG_SITE' environment variable to the location of the site script. @@ -181,7 +218,7 @@ Defining Variables ================== -Variables not defined in a site shell script can be set in the + Variables not defined in a site shell script can be set in the environment passed to `configure'. However, some packages may run configure again during the build, and the customized values of these variables may be lost. In order to avoid this problem, you should set @@ -190,21 +227,29 @@ ./configure CC=/usr/local2/bin/gcc causes the specified `gcc' to be used as the C compiler (unless it is -overridden in the site shell script). Here is a another example: +overridden in the site shell script). - /bin/bash ./configure CONFIG_SHELL=/bin/bash +Unfortunately, this technique does not work for `CONFIG_SHELL' due to +an Autoconf bug. Until the bug is fixed you can use this workaround: -Here the `CONFIG_SHELL=/bin/bash' operand causes subsequent -configuration-related scripts to be executed by `/bin/bash'. + CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash `configure' Invocation ====================== -`configure' recognizes the following options to control how it operates. + `configure' recognizes the following options to control how it +operates. `--help' `-h' - Print a summary of the options to `configure', and exit. + Print a summary of all of the options to `configure', and exit. + +`--help=short' +`--help=recursive' + Print a summary of the options unique to this package's + `configure', and exit. The `short' variant lists options used + only in the top level, while the `recursive' variant lists options + also present in any nested packages. `--version' `-V' @@ -231,6 +276,16 @@ Look for the package's source code in directory DIR. Usually `configure' can determine that directory automatically. +`--prefix=DIR' + Use DIR as the installation prefix. *Note Installation Names:: + for more details, including other options available for fine-tuning + the installation locations. + +`--no-create' +`-n' + Run the configure checks, but stop before creating any output + files. + `configure' also accepts some other, not widely useful, options. Run `configure --help' for more details. diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/chmlib-0.39/missing new/chmlib-0.40/missing --- old/chmlib-0.39/missing 2006-11-27 03:51:30.000000000 +0100 +++ new/chmlib-0.40/missing 2009-05-23 16:43:52.000000000 +0200 @@ -1,9 +1,9 @@ #! /bin/sh # Common stub for a few missing GNU programs while installing. -scriptversion=2005-06-08.21 +scriptversion=2006-05-10.23 -# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005 +# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006 # Free Software Foundation, Inc. # Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996. @@ -33,6 +33,8 @@ fi run=: +sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' +sed_minuso='s/.* -o \([^ ]*\).*/\1/p' # In the cases where this matters, `missing' is being run in the # srcdir already. @@ -44,7 +46,7 @@ msg="missing on your system" -case "$1" in +case $1 in --run) # Try to run requested program, and just exit if it succeeds. run= @@ -77,6 +79,7 @@ aclocal touch file \`aclocal.m4' autoconf touch file \`configure' autoheader touch file \`config.h.in' + autom4te touch the output file, or create a stub one 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 @@ -106,7 +109,7 @@ # Now exit if we have it, but it failed. Also exit now if we # don't have it and --version was passed (most likely to detect # the program). -case "$1" in +case $1 in lex|yacc) # Not GNU programs, they don't have --version. ;; @@ -135,7 +138,7 @@ # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. -case "$1" in +case $1 in aclocal*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if @@ -164,7 +167,7 @@ test -z "$files" && files="config.h" touch_files= for f in $files; do - case "$f" in + case $f in *:*) touch_files="$touch_files "`echo "$f" | sed -e 's/^[^:]*://' -e 's/:.*//'`;; *) touch_files="$touch_files $f.in";; @@ -192,8 +195,8 @@ You can get \`$1' as part of \`Autoconf' from any GNU archive site." - file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'` - test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'` + file=`echo "$*" | sed -n "$sed_output"` + test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else @@ -214,25 +217,25 @@ 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 + if test $# -ne 1; then eval LASTARG="\${$#}" - case "$LASTARG" in + case $LASTARG in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` - if [ -f "$SRCFILE" ]; then + if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` - if [ -f "$SRCFILE" ]; then + if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.h fi ;; esac fi - if [ ! -f y.tab.h ]; then + if test ! -f y.tab.h; then echo >y.tab.h fi - if [ ! -f y.tab.c ]; then + if test ! -f y.tab.c; then echo 'main() { return 0; }' >y.tab.c fi ;; @@ -244,18 +247,18 @@ 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 + if test $# -ne 1; then eval LASTARG="\${$#}" - case "$LASTARG" in + case $LASTARG in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` - if [ -f "$SRCFILE" ]; then + if test -f "$SRCFILE"; then cp "$SRCFILE" lex.yy.c fi ;; esac fi - if [ ! -f lex.yy.c ]; then + if test ! -f lex.yy.c; then echo 'main() { return 0; }' >lex.yy.c fi ;; @@ -267,11 +270,9 @@ \`Help2man' package in order for those modifications to take effect. You can get \`Help2man' from any GNU archive site." - file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` - if test -z "$file"; then - file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'` - fi - if [ -f "$file" ]; then + file=`echo "$*" | sed -n "$sed_output"` + test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` + if test -f "$file"; then touch $file else test -z "$file" || exec >$file @@ -289,11 +290,17 @@ DU, IRIX). You might want to install the \`Texinfo' package or the \`GNU make' package. Grab either from any GNU archive site." # The file to touch is that specified with -o ... - file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` + file=`echo "$*" | sed -n "$sed_output"` + test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -z "$file"; then # ... or it is the one specified with @setfilename ... infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` - file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $infile` + file=`sed -n ' + /^@setfilename/{ + s/.* \([^ ]*\) *$/\1/ + p + q + }' $infile` # ... or it is derived from the source name (dir/f.texi becomes f.info) test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info fi @@ -317,13 +324,13 @@ fi firstarg="$1" if shift; then - case "$firstarg" in + case $firstarg in *o*) firstarg=`echo "$firstarg" | sed s/o//` tar "$firstarg" "$@" && exit 0 ;; esac - case "$firstarg" in + case $firstarg in *h*) firstarg=`echo "$firstarg" | sed s/h//` tar "$firstarg" "$@" && exit 0 diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/chmlib-0.39/src/chm_http.c new/chmlib-0.40/src/chm_http.c --- old/chmlib-0.39/src/chm_http.c 2006-06-16 21:54:34.000000000 +0200 +++ new/chmlib-0.40/src/chm_http.c 2009-05-23 17:08:18.000000000 +0200 @@ -35,7 +35,8 @@ #include <stdlib.h> #include <string.h> #if __sun || __sgi - #include <strings.h> +#include <strings.h> +#define strrchr rindex #endif /* includes for networking */ @@ -193,6 +194,7 @@ break; pthread_create(&tid, NULL, _slave, (void *)slave); + pthread_detach(tid); } free(slave); } @@ -219,6 +221,7 @@ static const char CONTENT_404[] = "HTTP/1.1 404 File not found\r\nConnection: close\r\nContent-Type: text/html; charset=iso-8859-1\r\n\r\n<html><head><title>404 File Not Found</title></head><body><h1>404 File not found</h1></body></html>\r\n"; static const char CONTENT_500[] = "HTTP/1.1 500 Unknown thing\r\nConnection: close\r\nContent-Type: text/html; charset=iso-8859-1\r\n\r\n<html><head><title>500 Unknown thing</title></head><body><h1>500 Unknown thing</h1></body></html>\r\n"; +static const char INTERNAL_ERROR[] = "HTTP/1.1 500 Internal error\r\nConnection: close\r\nContent-Type: text/html; charset=iso-8859-1\r\n\r\n<html><head><title>500 Unknown thing</title></head><body><h1>500 Server error</h1></body></html>\r\n"; struct mime_mapping { @@ -307,7 +310,7 @@ } /* send the file back */ - ext = rindex(filename, '.'); + ext = strrchr(filename, '.'); fprintf(fout, "HTTP/1.1 200 OK\r\nConnection: close\r\nContent-Length: %d\r\nContent-Type: %s\r\n\r\n", (int)ui.length, lookup_mime(ext)); @@ -334,6 +337,13 @@ char buffer2[4096]; char *end; FILE *fout = fdopen(fd, "w+b"); + if (fout == NULL) + { + perror("chm_http: failed to fdopen client stream"); + write(fd, INTERNAL_ERROR, strlen(INTERNAL_ERROR)); + close(fd); + return; + } fgets(buffer, 4096, fout); while (1) @@ -343,7 +353,7 @@ if (buffer2[0] == '\r' || buffer2[0] == '\n' || buffer2[0] == '\0') break; } - end = rindex(buffer, ' '); + end = strrchr(buffer, ' '); if (strncmp(end+1, "HTTP", 4) == 0) *end = '\0'; if (strncmp(buffer, "GET ", 4) == 0) diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/chmlib-0.39/src/extract_chmLib.c new/chmlib-0.40/src/extract_chmLib.c --- old/chmlib-0.39/src/extract_chmLib.c 2006-06-16 21:57:49.000000000 +0200 +++ new/chmlib-0.40/src/extract_chmLib.c 2009-05-23 16:52:30.000000000 +0200 @@ -19,19 +19,13 @@ #include "chm_lib.h" #include <stdio.h> #include <stdlib.h> +#include <string.h> #ifdef WIN32 #include <windows.h> #include <direct.h> -#include <string.h> #define mkdir(X, Y) _mkdir(X) #define snprintf _snprintf -#define rindex strrchr #else -#if __i386__ -#include <string.h> -#else -#include <strings.h> -#endif #include <unistd.h> #include <sys/stat.h> #include <sys/types.h> @@ -78,7 +72,7 @@ * have run out of components */ - char *i = rindex(path, '/'); + char *i = strrchr(path, '/'); if(path[0] == '\0' || dir_exists(path)) return 0; @@ -137,7 +131,7 @@ /* make sure that it isn't just a missing directory before we abort */ char newbuf[32768]; strcpy(newbuf, buffer); - i = rindex(newbuf, '/'); + i = strrchr(newbuf, '/'); *i = '\0'; rmkdir(newbuf); if ((fout = fopen(buffer, "wb")) == NULL) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org
participants (1)
-
root@Hilbert.suse.de