diff --git a/.gitignore b/.gitignore index 9fa3b1b..ac7fdd6 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,26 @@ *.exe *.out *.app + +simple_entry +entry +datanode +*.pid +nfocleaner +foo-nukes +foo-pre +mp3info +foo-reset +createsfv +blehsfv +lfrtest +spy +webspy +zipcheck + +Makefile +config.h +config.status +config.cache +config.log + diff --git a/README.1st b/README.1st new file mode 100644 index 0000000..29fe41d --- /dev/null +++ b/README.1st @@ -0,0 +1,65 @@ + +Welcome to foo-tools. Good to see that you managed to download it ;-). +====================================================================== + +This is the first file you should be reading after downloading, it +contains the very basics of getting you started, so be sure to read +it all, top to bottom. + + +License: +-------- + +foo-tools is free software, licensed under the GPL. Please take a +few minutes to read through the included LICENSE.txt to learn about +what this means, since we are strong believers of free software, and +do not tolerate violations. + + +Requirements: +------------- + +foo-tools does not require glftpd, but many of the tools are specific +to glftpd, and will not work without it. + +Also, since the tools have been developed on Linux, some will not +work under other OSs. Most are known to be working under FreeBSD +with minor or no changes (mainly changing 'make' to 'gmake' in the +Makefiles). If someone have the skills/time to fix the portability +issues, please let us know. + + +Organization: +------------- + +* The tools, look at the src/ catalog. You can run the './configure' + script followed by 'make' to build. + +* Documentation, look in the doc/ catalog. + +* Older stuff, look in the unsorted-older/ catalog. + +* Not 100% finished but running, look in the testing/ catalog. + You are not adviced to use these, but if you have guts be my + guest :-). Some are running well, but just not well-documented + for release. + + +Bugs/improvements: +------------------ + +If you find bugs (yes, they are there for sure), or have ideas for +improvements, you are ofcause entitled to fix/improve by yourself, +but it would be highly appreciated, if you would follow the spirit +of foo-tools, and either send us patches, or make them available for +download. + +If you do are not a programmer, but got this great idea that just +fits so well into foo-tools, you can also tell us about it, and ask +us to implement it. If we have enough sparetime and the idea is good, +maybe we will do it ;-). + + + +Enjoy, Tanesha Team, + diff --git a/README.md b/README.md index 29fe41d..e213e22 100644 --- a/README.md +++ b/README.md @@ -1,65 +1,26 @@ +# foo-tools updates -Welcome to foo-tools. Good to see that you managed to download it ;-). -====================================================================== +- updates/fixes from https://github.com/glftpd/foo-tools +- Makefiles updated +- foo-pre has mp3 genre in PRE line (no module needed) -This is the first file you should be reading after downloading, it -contains the very basics of getting you started, so be sure to read -it all, top to bottom. +## Documentation: +- [README.1st](README.1st) Original README file +- [src/CHANGES](src/CHANGES) CHANGELOG +- [src/README.1st](src/README.1st) Building instructions +- [doc](doc) Documentation on installing/running the programs +- [README.mp3genre](src/pre/README.mp3genre) mp3genre specific README (install/configure) -License: --------- +## TODO: -foo-tools is free software, licensed under the GPL. Please take a -few minutes to read through the included LICENSE.txt to learn about -what this means, since we are strong believers of free software, and -do not tolerate violations. +### foo-pre +- [X] switch from mp3genre to master branch +- [X] add option in pre.cfg disable genre completely(?) +- [ ] replace pre/mp3genre by pzs-ng code or other id3 lib instead +- [X] change bytes to mb/gb: "Totals of this pre for announce: 3F 28734928B" +- [ ] FLAC support? - -Requirements: -------------- - -foo-tools does not require glftpd, but many of the tools are specific -to glftpd, and will not work without it. - -Also, since the tools have been developed on Linux, some will not -work under other OSs. Most are known to be working under FreeBSD -with minor or no changes (mainly changing 'make' to 'gmake' in the -Makefiles). If someone have the skills/time to fix the portability -issues, please let us know. - - -Organization: -------------- - -* The tools, look at the src/ catalog. You can run the './configure' - script followed by 'make' to build. - -* Documentation, look in the doc/ catalog. - -* Older stuff, look in the unsorted-older/ catalog. - -* Not 100% finished but running, look in the testing/ catalog. - You are not adviced to use these, but if you have guts be my - guest :-). Some are running well, but just not well-documented - for release. - - -Bugs/improvements: ------------------- - -If you find bugs (yes, they are there for sure), or have ideas for -improvements, you are ofcause entitled to fix/improve by yourself, -but it would be highly appreciated, if you would follow the spirit -of foo-tools, and either send us patches, or make them available for -download. - -If you do are not a programmer, but got this great idea that just -fits so well into foo-tools, you can also tell us about it, and ask -us to implement it. If we have enough sparetime and the idea is good, -maybe we will do it ;-). - - - -Enjoy, Tanesha Team, +### spy +- [ ] look into libhttpd.h since it's LGPL now (http://www.hughes.com.au/products/libhttpd) diff --git a/src/CHANGES b/src/CHANGES index be1bbc3..f6131bd 100644 --- a/src/CHANGES +++ b/src/CHANGES @@ -71,3 +71,21 @@ Nov 1 2011: * Fixed mktime timeout on configure (thks to peakz) * Added a little help file. Nov 2 2011: * Fixed a bug about "you're not in any of your predir" :) Mar 31 2013: * Fixed a strncpy bug while resolving links on x64 env. which lead to a "destination section's path doesnt exist" (overflow). + +Nov 2 2013: * compilation fixes +Nov 16 2013: * deleted some generated files and update configure +Mar 9 2014: * added current mp3info version +Mar 9 2014: * added stack protection flags to compilation + +//slv +Aug 08 2012: * MP3 genre added to PRE output (instead of in mod_idmp3) +Apr 09 2017: * cleaned up files +Apr 09 2017: * created makefile for mp3genre, fixed a few compiler warnings +Apr 09 2017: * merged commits 2014/15 commits from glftpd/foo-tools.git +Apr 09 2017: * updated mp3 genres from pzs-ng/zipscript/src/multimedia.c + + +//glftpd-scripts +Nov 8 2014: * add calendar weeks for pre, fix typo, add CW/KW as macro for dated pre-dirs +Sep 15 2015: * fix compile warning + diff --git a/src/Makefile.config b/src/Makefile.config index 65c3590..dc03cfd 100644 --- a/src/Makefile.config +++ b/src/Makefile.config @@ -10,7 +10,7 @@ INSTALL = install -m755 -o root -g root ## these prolly doesnt need to be changed. -CC = gcc -O0 -fPIC -D_FORTIFY_SOURCE=2 -fstack-protector-all -DSSP +CC = gcc -O0 -fPIC -D_FORTIFY_SOURCE=2 -fstack-protector-all -DSSP ## these should not be changed. diff --git a/src/Makefile.in b/src/Makefile.in index a827172..1399a9b 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -12,6 +12,7 @@ help: @echo Available targets: @echo " make build - builds most." @echo " make show - shows build binaries." + @echo " make foobnc - makes foobnc." @echo " make webspy - makes webspy." @echo " make clean - cleans." @@ -26,6 +27,9 @@ show: @size bouncer/simple_entry nfo/nfocleaner nukes/foo-nukes pre/foo-pre \ reset/foo-reset sfv/blehsfv sfv/createsfv who/spy who/webspy +foobnc: foobnc + (cd bouncer; make foobnc) + webspy: build (cd who; make webspy) @@ -36,8 +40,8 @@ clean: distclean: clean /bin/rm -f Makefile config.h config.status config.cache config.log - @for dir in ${DIRS}; do \ - (cd $$dir && $(MAKE) distclean) \ - || case "$(MFLAGS)" in *k*) fail=yes;; *) exit 1;; esac; \ - done && test -z "$$fail" +# @for dir in ${DIRS}; do \ +# (cd $$dir && $(MAKE) distclean) \ +# || case "$(MFLAGS)" in *k*) fail=yes;; *) exit 1;; esac; \ +# done && test -z "$$fail" diff --git a/src/bouncer/Makefile b/src/bouncer/Makefile deleted file mode 100644 index 9b6e305..0000000 --- a/src/bouncer/Makefile +++ /dev/null @@ -1,34 +0,0 @@ -# -# $Id: Makefile.in,v 1.3 2003/09/27 07:39:49 sorend Exp $ -# $Source: /home/cvs/footools/footools/src/bouncer/Makefile.in,v $ -# - -# make debug version, uncomment this to make running versino. -# DEFS = -DDEBUG=1 -# -# Use this one to run the bouncer on a win32 box with cygwin. -#DEFS = -DDEBUG=1 -DWIN32 -#DEFS = -DDNVIEW - -include ../Makefile.config - -LIBS = -lpthread -lncurses -lcrypto -lssl -#LIBS = -pthread -lncurses - -GENOBJS = ../lib/sockop.o ../collection/hashtable.o ../collection/strlist.o ../lib/common.o ../lib/stringtokenizer.o ../thread/threadpool.o ../util/linefilereader.o - -FOOBNCOBJS = foobnc.o $(GENOBJS) ../util/linereaderbuffer.o hammerprotect.o - -#DEFS = -DADMINPORT -SRCDIR = .. -I/usr/local/lib - -all: foobnc - - -foobnc: $(FOOBNCOBJS) - $(CC) -o $@ $(FOOBNCOBJS) -L/usr/local/lib -lpthread -lhttpd $(DEFS) - -clean: - rm -f *.o *~ simple_entry entry datanode *.pid - - diff --git a/src/bouncer/Makefile.in b/src/bouncer/Makefile.in index 9b6e305..f36786e 100644 --- a/src/bouncer/Makefile.in +++ b/src/bouncer/Makefile.in @@ -22,7 +22,8 @@ FOOBNCOBJS = foobnc.o $(GENOBJS) ../util/linereaderbuffer.o hammerprotect.o #DEFS = -DADMINPORT SRCDIR = .. -I/usr/local/lib -all: foobnc +#all: foobnc +all: foobnc: $(FOOBNCOBJS) diff --git a/src/checker/Makefile b/src/checker/Makefile deleted file mode 100644 index de2a2bc..0000000 --- a/src/checker/Makefile +++ /dev/null @@ -1,12 +0,0 @@ - -include ../Makefile.config - -SRCDIR = .. - -all: util.o - -clean: - rm -f *~ *.o - - - diff --git a/src/collection/Makefile b/src/collection/Makefile deleted file mode 100644 index 8eb6556..0000000 --- a/src/collection/Makefile +++ /dev/null @@ -1,27 +0,0 @@ -# -# $Id: Makefile.in,v 1.1 2003/05/24 05:39:36 sorend Exp $ -# $Source: /home/cvs/footools/footools/src/collection/Makefile.in,v $ -# -# Uncomment this to make win32/cygwin versions. -# DEFS = -DWIN32 -# -# Use this if you have a system without fnmatch() function. -# DEFS = -DNO_FNMATCH - -include ../Makefile.config - -SRCDIR = .. - -DEFS = -DHT_SUPPORT_FILEPROP - -OBJS = sortedlist.o strlist.o hashtable.o - -all: $(OBJS) - -clean: - rm -f *.o *~ - -release: - @mkdir $(RELEASEDIR)/collection - @cp *.c *.h Makefile $(RELEASEDIR)/collection - diff --git a/src/configure b/src/configure index eb0c4a6..bf624d9 100755 --- a/src/configure +++ b/src/configure @@ -5535,7 +5535,7 @@ fi done -ac_config_files="$ac_config_files Makefile bouncer/Makefile checker/Makefile collection/Makefile lib/Makefile nfo/Makefile nukes/Makefile pre/Makefile pre/modules/Makefile reset/Makefile sfv/Makefile thread/Makefile unzip/Makefile util/Makefile who/Makefile zip/Makefile" +ac_config_files="$ac_config_files Makefile bouncer/Makefile checker/Makefile collection/Makefile lib/Makefile nfo/Makefile nukes/Makefile pre/Makefile pre/mp3genre/Makefile pre/modules/Makefile reset/Makefile sfv/Makefile thread/Makefile unzip/Makefile util/Makefile who/Makefile zip/Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -6240,6 +6240,7 @@ do "nfo/Makefile") CONFIG_FILES="$CONFIG_FILES nfo/Makefile" ;; "nukes/Makefile") CONFIG_FILES="$CONFIG_FILES nukes/Makefile" ;; "pre/Makefile") CONFIG_FILES="$CONFIG_FILES pre/Makefile" ;; + "pre/mp3genre/Makefile") CONFIG_FILES="$CONFIG_FILES pre/mp3genre/Makefile" ;; "pre/modules/Makefile") CONFIG_FILES="$CONFIG_FILES pre/modules/Makefile" ;; "reset/Makefile") CONFIG_FILES="$CONFIG_FILES reset/Makefile" ;; "sfv/Makefile") CONFIG_FILES="$CONFIG_FILES sfv/Makefile" ;; diff --git a/src/lib/Makefile b/src/lib/Makefile deleted file mode 100644 index 6733281..0000000 --- a/src/lib/Makefile +++ /dev/null @@ -1,26 +0,0 @@ -# -# $Id: Makefile.in,v 1.1 2003/05/24 05:39:36 sorend Exp $ -# $Source: /home/cvs/footools/footools/src/lib/Makefile.in,v $ -# -# Uncomment this to make win32/cygwin versions. -# DEFS = -DWIN32 -# -# Use this if you have a system without fnmatch() function. -# DEFS = -DNO_FNMATCH - -include ../Makefile.config - -SRCDIR = .. - -OBJS = dirlist.o cookie.o common.o genlistc.o sfv.o macro.o gllogs.o pwdfile.o stringtokenizer.o security.o sockop.o who.o xferlog.o mpegtool.o - - -all: $(OBJS) - -clean: - rm -f *.o *~ - -release: - @mkdir $(RELEASEDIR)/lib - @cp Makefile README* *.c *.h $(RELEASEDIR)/lib - diff --git a/src/nfo/Makefile b/src/nfo/Makefile deleted file mode 100644 index 3db4863..0000000 --- a/src/nfo/Makefile +++ /dev/null @@ -1,21 +0,0 @@ - -include ../Makefile.config - -SRCDIR = .. - -OBJS = ../collection/strlist.o ../lib/macro.o ../collection/hashtable.o \ - ../util/linefilereader.o mod_nfo.o ../util/strmatch.o ../util/release.o - -all: nfocleaner - -nfocleaner: cleaner.o mod_nfo.o - gcc -O2 -o $@ $< $(OBJS) - -clean: - rm -f *~ *.o nfocleaner - -release: - mkdir $(RELEASEDIR)/nfo - cp nfo-*.txt Makefile mod_nfo.[ch] cleaner.c README $(RELEASEDIR)/nfo - - diff --git a/src/nukes/Makefile b/src/nukes/Makefile deleted file mode 100644 index 4724293..0000000 --- a/src/nukes/Makefile +++ /dev/null @@ -1,22 +0,0 @@ - -include ../Makefile.config - -SRCDIR = .. - -OBJS = ../collection/sortedlist.o ../collection/hashtable.o ../util/linefilereader.o \ - glnukelog.o nukes.o - -all: foo-nukes - -foo-nukes: $(OBJS) - gcc -O2 -o $@ $(OBJS) - -foo-nuketop: nuketop.o ../collection/sortedlist.o - gcc -O2 -o $@ nuketop.o ../collection/sortedlist.o - -clean: - rm -f *~ *.o foo-nukes - -release: - mkdir $(RELEASEDIR)/nukes - cp *.c *.h Makefile README $(RELEASEDIR)/nukes diff --git a/src/pre/.gitignore b/src/pre/.gitignore new file mode 100644 index 0000000..c16f897 --- /dev/null +++ b/src/pre/.gitignore @@ -0,0 +1,5 @@ +*_debug +*_new +*_old +genres-1.txt +genres-2.txt diff --git a/src/pre/Makefile b/src/pre/Makefile deleted file mode 100644 index 7a9327c..0000000 --- a/src/pre/Makefile +++ /dev/null @@ -1,23 +0,0 @@ - - -include ../Makefile.config - -SRCDIR = .. - -LIBS = ../collection/strlist.o ../lib/gllogs.o ../lib/pwdfile.o ../util/linefilereader.o ../collection/hashtable.o ../lib/stringtokenizer.o ./gl_userfile.o - -foo-pre: foo-pre.o $(LIBS) - $(CC) -o $@ $< $(LIBS) -ldl - -foo.Pre: foo.Pre.o - $(CC) -o $@ $< $(LIBS) - -all: foo-pre - -clean: - rm -f *.o *~ foo.Pre foo-pre - -release: - mkdir $(RELEASEDIR)/pre - cp *.c *.h Makefile README *.txt pre.cfg $(RELEASEDIR)/pre - diff --git a/src/pre/Makefile.in b/src/pre/Makefile.in index 7a9327c..5cd3d80 100644 --- a/src/pre/Makefile.in +++ b/src/pre/Makefile.in @@ -1,13 +1,14 @@ - include ../Makefile.config SRCDIR = .. LIBS = ../collection/strlist.o ../lib/gllogs.o ../lib/pwdfile.o ../util/linefilereader.o ../collection/hashtable.o ../lib/stringtokenizer.o ./gl_userfile.o +OBJS = ./mp3genre/mp3genre.o foo-pre: foo-pre.o $(LIBS) - $(CC) -o $@ $< $(LIBS) -ldl + $(MAKE) -C mp3genre + $(CC) -o $@ $< $(LIBS) $(OBJS) -ldl foo.Pre: foo.Pre.o $(CC) -o $@ $< $(LIBS) @@ -16,8 +17,10 @@ all: foo-pre clean: rm -f *.o *~ foo.Pre foo-pre + $(MAKE) -C mp3genre $@ release: mkdir $(RELEASEDIR)/pre cp *.c *.h Makefile README *.txt pre.cfg $(RELEASEDIR)/pre + $(MAKE) -C mp3genre $@ diff --git a/src/pre/README.mp3genre b/src/pre/README.mp3genre new file mode 100644 index 0000000..9c348f5 --- /dev/null +++ b/src/pre/README.mp3genre @@ -0,0 +1,41 @@ +Instructions foo-pre with mp3genre: +=================================== + +This is an ugly hack for foo-pre to add mp3 genre in PRE output (instead of in mod_idmp3). +It will add a new "genre" variable which you can use in PRE announces. + +compile as usual; +----------------- + +$ ./configure +$ make build +etc +(you do not need the mod_id3 module) + +configure pre.cfg; +------------------- + +The mp3genre hack introduces a new "%I" "macro": +group.DEFAULT.announce=PRE: "%PP/%R" "%R" "%G" "%D" "%F" "%S" "%C" "%W" "%U" "%g" "%T" "%I" + +If you have any other announces defined do not forget to add it to those too. + +Make sure addmp3genretogllog is set to "1". + +change ngBot.conf; +------------------ + +add genre variable: +set variables(PRE) "%pf %releasename %pregroup %section %files %mbytes %cds %who %user %g_name %tagline %genre" + +also change theme, eg default.zst: +announce.PRE = "[%b{%c1{pre} }][%section] %b{%relname} by %b{%pregroup} in %b{%files} files (%b{%mbytes}MB) of %b{%genre}." + +example output; +--------------- + +mp3 with genre: +Mon Jan 01 00:00:00 2017 PRE: "/site/mp3/0101/Example-Release-GRP" "Example-Release-GRP" "GRP" "mp3" "1" "10.0" "1" "user/10l.0Mb" "user" "GRP" "Tagline" "Pop" + +release without genre: +Mon Jan 01 00:00:00 2017 PRE: "/site/mv/week-01/Example-Release-GRP" "Example-Release-GRP" "GRP" "mv" "1" "100.0" "1" "user/100.0Mb" "user" GRP" "Tagline" "n/a" diff --git a/src/pre/foo-pre.c b/src/pre/foo-pre.c index de91cc7..620d009 100644 --- a/src/pre/foo-pre.c +++ b/src/pre/foo-pre.c @@ -20,6 +20,7 @@ */ /* * foo.Pre [C-version] (c) tanesha team, + slv 20170414 - mp3 genre added to PRE output (instead of in mod_idmp3) */ #include #include @@ -43,8 +44,9 @@ #include "foo-pre.h" #include "gl_userfile.h" +#include "mp3genre/mp3genre.h" -#define VERSION "$Id: foo-pre.c,v 1.18 2004/09/28 06:52:24 sorend Exp $" +#define VERSION "$Id: foo-pre.c,v 1.19 2017/04/14 14:14:00 sorend, slv Exp $" #define USAGE " * Syntax: SITE PRE [SECTION]\n" void quit(char *s, ...); @@ -53,8 +55,11 @@ extern int errno; hashtable_t *_config = 0; hashtable_t *_envctx = 0; +int touch_dir(char* dir); +int touch_file(char* fname); + /* - * Acecssor method for configuration. + * Acessor method for configuration. */ hashtable_t * get_config() { if (!_config) { @@ -965,7 +970,7 @@ int pre_do_module(char *module, filelist_t *files, char *path, char *argv[], str return 1; } -int pre_do_modules(filelist_t *files, char *path, char *argv[], struct subdir_list *subdirs) { +void pre_do_modules(filelist_t *files, char *path, char *argv[], struct subdir_list *subdirs) { hashtable_t *cfg, *env; stringtokenizer st; char *tmp; @@ -1005,11 +1010,23 @@ int pre(char *section, char *dest, char *src, char *rel, char *group, char *argv pass = pwd_getpwnam(ht_get(env, PROPERTY_USER)); + char *gtmp; + char *unit = "B"; + float bconv; + int addmp3genre; + if (!pass) { printf(" * Error, cannot get your passwd entry! \n"); return 0; } + + tmp = ht_get(cfg, PROPERTY_ADDMP3GENRE); + if (tmp) + addmp3genre = atoi(tmp); + else + addmp3genre = 0; + chown = chowninfo_find_by_group(group); olduid = getuid(); @@ -1021,7 +1038,11 @@ int pre(char *section, char *dest, char *src, char *rel, char *group, char *argv // get totals. flist_size(files, &bcount, &fnum); - printf(" * Totals of this pre for announce: %dF %.0fB\n", fnum, bcount); + + // convert bytes. + if (bcount>=(1024*1024) && bcount<(1024*1024*1024)) { unit = "Mb"; bconv = (float)bcount/(1024*1024); } + if (bcount>=(1024*1024*1024)) { unit = "Gb"; bconv = (float)bcount/(1024*1024*1024); } + printf(" * Totals of this pre for announce: %dF %.1f%s\n", fnum, bconv, unit); // get credits. credits = creditlist_create_from_filelist(files); @@ -1030,6 +1051,22 @@ int pre(char *section, char *dest, char *src, char *rel, char *group, char *argv printf(" -- %10.10s: %s\n", "From", src); printf(" -- %10.10s: %s", "To", dest); + /* + * slv - get filename.mp3 and call get_mp3_genre(filename). + */ + // get genre. + if (addmp3genre) { + for (ftmp = files; ftmp; ftmp = ftmp->next) { + tmp = strrchr(ftmp->file, '.'); + if (!strcmp(tmp, ".mp3")) { + sprintf(buf, "%s/%s", src, ftmp->file); + sprintf(gtmp, "%s", get_mp3_genre(buf)); + mp3_genre = gtmp; + break; + } + } + } + // dont forget to chown maindir chowninfo_apply_to_file(src, chown); @@ -1087,6 +1124,8 @@ int pre(char *section, char *dest, char *src, char *rel, char *group, char *argv pre_replace(buf, "%g", ht_get(env, PROPERTY_USERGROUP)); pre_replace(buf, "%D", section_get_property(section, PROPERTY_SECTION_NAME)); pre_replace(buf, "%R", rel); + if (addmp3genre) + pre_replace(buf, "%I", mp3_genre); gl_gllog_add(buf); @@ -1208,13 +1247,13 @@ char *section_expand_path(char *sec) { strftime(buf, 1024, "%V", tm_now); pre_replace(tmp, "CW", buf); pre_replace(tmp, "KW", buf); - + // if its a link then expand it. reps = readlink(tmp, buf, 1024); if (reps != -1) { if (buf[0] == '/') { - strncpy(tmp,buf,reps); + strncpy(tmp, buf, reps); tmp[reps] = '\0'; /* ensure null terminated */ buf[reps] = 0; } @@ -1250,6 +1289,8 @@ int pre_handler(int argc, char *argv[]) { char buf[1024]; int rc; + int addmp3genre; + env = get_context(); cfg = get_config(); @@ -1267,6 +1308,8 @@ int pre_handler(int argc, char *argv[]) { if (!groups) quit(" * Error finding your groups, go bug sysop!\n"); + tmp = ht_get(cfg, PROPERTY_ADDMP3GENRE); + if (argc < 2) { printf(USAGE); @@ -1275,6 +1318,11 @@ int pre_handler(int argc, char *argv[]) { quit(0); } + if (tmp) + addmp3genre = atoi(tmp); + else + addmp3genre = 0; + // check if someone are trying to fool us. if (strchr(argv[1], '/')) quit(" * You cant give paths in releasename ('/' not allowed)!\n"); @@ -1352,10 +1400,15 @@ int pre_handler(int argc, char *argv[]) { } // log DONE: "" "" "" "" - pre_log("DONE", "\"%s\" \"%s\" \"%s\" \"%s\"", - ht_get(env, PROPERTY_USER), group, - argv[1], destpath); - + // slv added: "" + if (addmp3genre) + pre_log("DONE", "\"%s\" \"%s\" \"%s\" \"%s\" \"%s\"", + ht_get(env, PROPERTY_USER), group, + argv[1], destpath, mp3_genre); + else + pre_log("DONE", "\"%s\" \"%s\" \"%s\" \"%s\" \"%s\"", + ht_get(env, PROPERTY_USER), group, + argv[1], destpath); return 0; } diff --git a/src/pre/foo-pre.h b/src/pre/foo-pre.h index d2fb68c..55d0017 100644 --- a/src/pre/foo-pre.h +++ b/src/pre/foo-pre.h @@ -72,6 +72,8 @@ typedef unsigned short int ushort; #define MODULE_SETCONFIG_FUNC "set_config" #define MODULE_SETENV_FUNC "set_env" +#define PROPERTY_ADDMP3GENRE "addmp3genretogllog" + /* * Holds info about chowns */ @@ -155,4 +157,6 @@ struct module_list { typedef struct module_list module_list_t; +char *mp3_genre = "Unknown"; + #endif diff --git a/src/pre/gl_userfile.c b/src/pre/gl_userfile.c index 4788eb7..600846a 100644 --- a/src/pre/gl_userfile.c +++ b/src/pre/gl_userfile.c @@ -23,6 +23,9 @@ #include #include #include +#include +#include +#include #include "gl_userfile.h" @@ -234,6 +237,11 @@ int gl_userfile_add_stats(char *userfile, int files, long kbytes, int seconds, l if (lfr_open(&lfr, userfile) < 0) return -1; + // stat current userfile so we can preserve uid/gid + struct stat userfile_sb; + if (stat(userfile, &userfile_sb) == -1) + return -1; + ufnew = malloc(strlen(userfile) + 10); sprintf(ufnew, "%s.pre-tmp", userfile); out = fopen(ufnew, "w"); @@ -263,6 +271,9 @@ int gl_userfile_add_stats(char *userfile, int files, long kbytes, int seconds, l fclose(out); lfr_close(&lfr); + // chown new userfile to uid/gid from old userfile + chown(ufnew, userfile_sb.st_uid, userfile_sb.st_gid); + rename(ufnew, userfile); free(ufnew); @@ -289,6 +300,11 @@ int gl_userfile_set_stats(char *userfile, int files, long kbytes, int seconds, s if (lfr_open(&lfr, userfile) < 0) return -1; + // stat current userfile so we can preserve uid/gid + struct stat userfile_sb; + if (stat(userfile, &userfile_sb) == -1) + return -1; + ufnew = malloc(strlen(userfile) + 10); sprintf(ufnew, "%s.pre-tmp", userfile); out = fopen(ufnew, "w"); @@ -329,6 +345,9 @@ int gl_userfile_set_stats(char *userfile, int files, long kbytes, int seconds, s fclose(out); lfr_close(&lfr); + // chown new userfile to uid/gid from old userfile + chown(ufnew, userfile_sb.st_uid, userfile_sb.st_gid); + rename(ufnew, userfile); free(ufnew); diff --git a/src/pre/modules/Makefile b/src/pre/modules/Makefile deleted file mode 100644 index 409569b..0000000 --- a/src/pre/modules/Makefile +++ /dev/null @@ -1,34 +0,0 @@ - - -include ../../Makefile.config - -SRCDIR = ../.. - -LIBS = $(SRCDIR)/lib/macro.o $(SRCDIR)/lib/gllogs.o $(SRCDIR)/lib/pwdfile.o $(SRCDIR)/util/linefilereader.o $(SRCDIR)/collection/hashtable.o $(SRCDIR)/lib/stringtokenizer.o - -all: mod_idmp3.so mod_sitenfoadd.so mod_nfohandler.so mod_chmod.so mod_symlink.so - -mod_idmp3.so: mod_idmp3.o - (cd mp3info; make) - $(CC) -g -shared -Wl,-soname,mod_idmp3.so -o $@ $< mp3info/mp3tech.o $(LIBS) - -mod_sitenfoadd.so: mod_sitenfoadd.o - $(CC) -g -shared -Wl,-soname,mod_sitenfoadd.so -o $@ $< $(LIBS) - -mod_chmod.so: mod_chmod.o - $(CC) -g -shared -Wl,-soname,mod_chmod.so -o $@ $< $(LIBS) - -mod_nfohandler.so: mod_nfohandler.o - $(CC) -g -shared -Wl,-soname,mod_nfohandler.so -o $@ $< $(LIBS) - -mod_symlink.so: mod_symlink.o - $(CC) -g -shared -Wl,-soname,mod_symlink.so -o $@ $< $(LIBS) - -tester: tester.o - $(CC) -o $@ $< ../../collection/hashtable.o ../../util/linefilereader.o -ldl - -clean: - (cd mp3info; make clean) - rm -f *.o *~ *.so - - diff --git a/src/pre/modules/mod_chmod.c b/src/pre/modules/mod_chmod.c index b5e5719..095e6fb 100644 --- a/src/pre/modules/mod_chmod.c +++ b/src/pre/modules/mod_chmod.c @@ -25,6 +25,7 @@ */ #include +#include // project includes #include "mod_chmod.h" diff --git a/src/pre/modules/mod_symlink.c b/src/pre/modules/mod_symlink.c index a3e9fa0..99b974b 100644 --- a/src/pre/modules/mod_symlink.c +++ b/src/pre/modules/mod_symlink.c @@ -25,7 +25,7 @@ */ #include - +#include // project includes #include "mod_symlink.h" #include "../foo-pre.h" diff --git a/src/pre/modules/mp3info-0.8.5a/Makefile b/src/pre/modules/mp3info-0.8.5a/Makefile index d62fea4..e421e2c 100644 --- a/src/pre/modules/mp3info-0.8.5a/Makefile +++ b/src/pre/modules/mp3info-0.8.5a/Makefile @@ -37,7 +37,6 @@ mandir = $(prefix)/man/man1 PROG = mp3info SRCS = mp3info.c textfunc.c mp3curs.c mp3tech.c OBJS = mp3info.o textfunc.o mp3curs.o mp3tech.o -XSRC = gmp3info.c XOBJ = mp3tech.o RM = /bin/rm INSTALL = /usr/bin/install -c @@ -47,21 +46,18 @@ LIBS = -lncurses CC = gcc CFLAGS = -g -O2 -Wall -fPIC -all: mp3info gmp3info doc +all: mp3info doc doc: mp3info.txt mp3info: $(OBJS) $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) -gmp3info: $(XSRC) $(XOBJ) - $(CC) $(XSRC) $(CFLAGS) -o $@ $(XOBJ) `pkg-config --cflags --libs gtk+-2.0` - mp3info.txt: mp3info.1 groff -t -e -mandoc -Tascii mp3info.1 | col -bx > mp3info.txt clean: - $(RM) -f $(OBJS) $(XOBJ) mp3info gmp3info core + $(RM) -f $(OBJS) $(XOBJ) mp3info core dist: clean doc @@ -73,15 +69,10 @@ install-mp3info: mp3info $(INSTALL) mp3info $(bindir)/mp3info $(INSTALL) mp3info.1 $(mandir)/mp3info.1 -install-gmp3info: gmp3info - $(STRIP) gmp3info - $(INSTALL) gmp3info $(bindir)/gmp3info - -install: install-mp3info install-gmp3info +install: install-mp3info uninstall: rm -f $(bindir)/mp3info - rm -f $(bindir)/gmp3info rm -f $(mandir)/mp3info.1 diff --git a/src/pre/modules/mp3info-0.8.5a/Makefileh b/src/pre/modules/mp3info-0.8.5a/Makefileh new file mode 100644 index 0000000..47d2edf --- /dev/null +++ b/src/pre/modules/mp3info-0.8.5a/Makefileh @@ -0,0 +1,88 @@ +# Makefile for MP3Info and GMP3Info +# +# Copyright (C) 2000-2006 Cedric Tefft +# +# 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., 675 Mass Ave, Cambridge, MA 02139, USA. +# +# *************************************************************************** +# +# This program is based in part on: +# +# * MP3Info 0.5 by Ricardo Cerqueira +# * MP3Stat 0.9 by Ed Sweetman and +# Johannes Overmann +# + +# bindir = where binaries get installed (default = /usr/local/bin) +# mandir = where the manual page gets installed (default = /usr/local/man/man1) + +prefix=/usr/local +bindir=${prefix}/bin +mandir = $(prefix)/man/man1 + +# No changes necessary below this line + +PROG = mp3info +SRCS = mp3info.c textfunc.c mp3curs.c mp3tech.c +OBJS = mp3info.o textfunc.o mp3curs.o mp3tech.o +#XSRC = gmp3info.c +XOBJ = mp3tech.o +RM = /bin/rm +INSTALL = /usr/bin/install -c +STRIP = strip + +LIBS = -lncurses +CC = gcc +CFLAGS = -g -O2 -Wall + +#all: mp3info gmp3info doc +all: mp3info doc + +doc: mp3info.txt + +mp3info: $(OBJS) + $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) + +gmp3info: $(XSRC) $(XOBJ) + $(CC) $(XSRC) $(CFLAGS) -o $@ $(XOBJ) `pkg-config --cflags --libs gtk+-2.0` + +mp3info.txt: mp3info.1 + groff -t -e -mandoc -Tascii mp3info.1 | col -bx > mp3info.txt + +clean: + $(RM) -f $(OBJS) $(XOBJ) mp3info gmp3info core + +dist: clean doc + +distclean: clean + $(RM) -f mp3info.txt + +install-mp3info: mp3info + $(STRIP) mp3info + $(INSTALL) mp3info $(bindir)/mp3info + $(INSTALL) mp3info.1 $(mandir)/mp3info.1 + +install-gmp3info: gmp3info + $(STRIP) gmp3info + $(INSTALL) gmp3info $(bindir)/gmp3info + +install: install-mp3info install-gmp3info + + +uninstall: + rm -f $(bindir)/mp3info + rm -f $(bindir)/gmp3info + rm -f $(mandir)/mp3info.1 + diff --git a/src/pre/mp3genre/Makefile.in b/src/pre/mp3genre/Makefile.in new file mode 100644 index 0000000..dfde313 --- /dev/null +++ b/src/pre/mp3genre/Makefile.in @@ -0,0 +1,15 @@ + +include ../../Makefile.config + +mp3genre: + $(CC) -c $@.c -o $@.o + +all: mp3genre + +clean: + rm -f *.o *~ + +release: + mkdir -p $(RELEASEDIR)/pre/mp3genre + cp *.c *.h $(RELEASEDIR)/pre/mp3genre + diff --git a/src/pre/mp3genre/mp3genre.c b/src/pre/mp3genre/mp3genre.c new file mode 100644 index 0000000..972d564 --- /dev/null +++ b/src/pre/mp3genre/mp3genre.c @@ -0,0 +1,83 @@ +/* + * slv 20170414 - mp3genre.c: + * + * reads last 128 bytes of mp3 and extracts genre tag + * ph33r my ugly "code" ;o + * + * this file is based in part on: + * + * * MP3Info 0.5 by Ricardo Cerqueira + * * MP3Stat 0.9 by Ed Sweetman and + * Johannes Overmann + * +*/ + +#include + +#include "mp3genre.h" + +char *genre_s[] = { + "Blues", "Classic Rock", "Country", "Dance", + "Disco", "Funk", "Grunge", "Hip-Hop", + "Jazz", "Metal", "New Age", "Oldies", + "Other", "Pop", "R&B", "Rap", + "Reggae", "Rock", "Techno", "Industrial", + "Alternative", "Ska", "Death Metal", "Pranks", + "Soundtrack", "Euro-Techno", "Ambient", "Trip-Hop", + "Vocal", "Jazz+Funk", "Fusion", "Trance", + "Classical", "Instrumental", "Acid", "House", + "Game", "Sound Clip", "Gospel", "Noise", + "AlternRock", "Bass", "Soul", "Punk", + "Space", "Meditative", "Instrumental Pop", "Instrumental Rock", + "Ethnic", "Gothic", "Darkwave", "Techno-Industrial", + "Electronic", "Pop-Folk", "Eurodance", "Dream", + "Southern Rock", "Comedy", "Cult", "Gangsta", + "Top 40", "Christian Rap", "Pop_Funk", "Jungle", + "Native American", "Cabaret", "New Wave", "Psychadelic", + "Rave", "Showtunes", "Trailer", "Lo-Fi", + "Tribal", "Acid Punk", "Acid Jazz", "Polka", + "Retro", "Musical", "Rock & Roll", "Hard Rock", + "Folk", "Folk-Rock", "National Folk", "Swing", + "Fast Fusion", "Bebob", "Latin", "Revival", + "Celtic", "Bluegrass", "Avantgarde", "Gothic Rock", + "Progressive Rock", "Psychedelic Rock", "Symphonic Rock", "Slow Rock", + "Big Band", "Chorus", "Easy Listening", "Acoustic", + "Humour", "Speech", "Chanson", "Opera", + "Chamber Music", "Sonata", "Symphony", "Booty Bass", + "Primus", "Porn Groove", "Satire", "Slow Jam", + "Club", "Tango", "Samba", "Folklore", + "Ballad", "Power Ballad", "Rhythmic Soul", "Freestyle", + "Duet", "Punk Rock", "Drum Solo", "A cappella", + "Euro-House", "Dance Hall", "Goa", "Drum & Bass", + "Club House", "Hardcore", "Terror", "Indie", + "BritPop", "Negerpunk", "Polsk Punk", "Beat", + "Christian Gangsta Rap", "Heavy Metal", "Black Metal", "Crossover", + "Contemporary Christian", "Christian Rock", "Merengue", "Salsa", + "Thrash Metal", "Anime", "JPop", "Synthpop", + "Unknown" +}; +unsigned char genre_count=149; + +char *get_mp3_genre(const char* filename) { + FILE *fp; + unsigned char id3_genre_num[1]; + char *id3_genre = "Unknown"; + char mp3_fbuf[2]; + if (!(fp=fopen(filename,"rb"))) { + return NULL; + } + if (fseek(fp,-128,SEEK_END)) { + return NULL; + } else { + fread(mp3_fbuf,1,3,fp); mp3_fbuf[3] = '\0'; + id3_genre_num[0]=255; + if (!strcmp((const char *)"TAG",(const char *)mp3_fbuf)) { + fseek(fp, -1, SEEK_END); + fread(id3_genre_num,1,1,fp); + if(id3_genre_num[0] != '\0' && id3_genre_num[0] > 0 && id3_genre_num[0] < genre_count) { + id3_genre = genre_s[id3_genre_num[0]]; + } + } + } + return id3_genre; +} diff --git a/src/pre/mp3genre/mp3genre.h b/src/pre/mp3genre/mp3genre.h new file mode 100644 index 0000000..ddaa29a --- /dev/null +++ b/src/pre/mp3genre/mp3genre.h @@ -0,0 +1,17 @@ +/* + * slv 20170414 - headers for mp3genre.c + * + * from pzs-ng zipscript/src/multimedia.c + * http://www.pzs-ng.com + * +*/ +#ifndef _mp3_genre_h +#define _mp3_genre_h + +#include + +extern char *genre_s[]; +extern unsigned char genre_count; +char *get_mp3_genre(const char* filename); + +#endif diff --git a/src/pre/pre.cfg b/src/pre/pre.cfg index db8b2d2..0e1c81f 100644 --- a/src/pre/pre.cfg +++ b/src/pre/pre.cfg @@ -34,6 +34,8 @@ group.LameGroup.dir=/site/private/LameGroup|/site/private/otherdisk/private/Lame # %g - group of the user who pres # %T - tagline of the user who pres # +# %I - id3 genre of mp3 file +# group.STAFF.announce=PRE-TEST: "lay down its only a > Staff pre Test < %U pred %R (%C cds, %F file/s, %S Mb) in %D [wannabes: %W]" # @@ -43,7 +45,7 @@ group.STAFF.announce=PRE-TEST: "lay down its only a > Staff pre Test < %U pred % # of a .tcl, please make it support this. Take a look at the README.foo-pre # for an example of what .tcl you might add to your bot.tcl # -group.DEFAULT.announce=PRE: "%R" "%G" "%D" "%P" "%PP" %F %S %C "%W" "%U" "%g" "%T" +group.DEFAULT.announce=PRE: "%R" "%G" "%D" "%P" "%PP" %F %S %C "%W" "%U" "%g" "%T" "%I" # # define which grps are allowed to pre in which sections. @@ -217,7 +219,7 @@ mod_nfohandler.output=PRE-NFO: "NFO" "%[%s]NFO%" "GENRE" "%[%s]GENRE%" "IMDB" "% # # output line for mod_idmp3, check README.mod_idmp3 in modules/ for info. # -mod_idmp3.output=PRE-MP3INFO: "%R" "%a" "%l" "%y" "%g" "%G" "%r" "%Q" "%o" "%m" "%s" "%S" "%L" +#mod_idmp3.output=PRE-MP3INFO: "%R" "%a" "%l" "%y" "%g" "%G" "%r" "%Q" "%o" "%m" "%s" "%S" "%L" # # properties for site nfo adder. @@ -235,3 +237,10 @@ mod_sitenfoadd.filename=mysite.nfo # set etcdir, if your passwd and group are not in /etc, then set this. # #etcdir=/etc/mysite1 + +# +# Add mp3 genre to gllog (1 = yes, 0 = no) +# +# This adds mp3 genre from id3 tag to PRE: announce (using "%I" macro). +# +addmp3genretogllog=1 diff --git a/src/reset/Makefile b/src/reset/Makefile deleted file mode 100644 index 676f13b..0000000 --- a/src/reset/Makefile +++ /dev/null @@ -1,20 +0,0 @@ - - -include ../Makefile.config - -SRCDIR = .. - -LIBS = ../collection/strlist.o ../lib/gllogs.o ../util/linefilereader.o ../collection/hashtable.o ../lib/stringtokenizer.o ../pre/gl_userfile.o ../util/filelock.o records.o ../util/date.o - -foo-reset: reset.o $(LIBS) - $(CC) -o $@ $< $(LIBS) - -all: foo-reset - -clean: - rm -f *.o *~ foo-reset - -release: - mkdir $(RELEASEDIR)/reset - cp *.c *.h Makefile README $(RELEASEDIR)/reset - diff --git a/src/sfv/Makefile b/src/sfv/Makefile deleted file mode 100644 index 6030a80..0000000 --- a/src/sfv/Makefile +++ /dev/null @@ -1,18 +0,0 @@ - -include ../Makefile.config - -SRCDIR = .. - -LIBS = ../lib/sfv.o ../lib/common.o ../util/linefilereader.o - -all: createsfv blehsfv - -createsfv: createsfv.o - gcc -O2 -o $@ $< $(LIBS) - -blehsfv: blehsfv.o - gcc -O2 -o $@ $< $(LIBS) - -clean: - rm -f *.o *~ createsfv blehsfv - diff --git a/src/thread/Makefile b/src/thread/Makefile deleted file mode 100644 index cceebc9..0000000 --- a/src/thread/Makefile +++ /dev/null @@ -1,24 +0,0 @@ -# -# $Id: Makefile.in,v 1.1 2003/05/24 05:39:36 sorend Exp $ -# $Source: /home/cvs/footools/footools/src/thread/Makefile.in,v $ -# -# Uncomment this to make win32/cygwin versions. -# DEFS = -DWIN32 -# -# Use this if you have a system without fnmatch() function. -# DEFS = -DNO_FNMATCH - -include ../Makefile.config - -OBJS = threadpool.o -SRCDIR = .. - -all: $(OBJS) - -clean: - rm -f *.o *~ - -release: - mkdir $(RELEASEDIR)/thread - cp Makefile *.c *.h $(RELEASEDIR)/thread - diff --git a/src/unzip/Makefile b/src/unzip/Makefile deleted file mode 100644 index d85b1e1..0000000 --- a/src/unzip/Makefile +++ /dev/null @@ -1,15 +0,0 @@ - -include ../Makefile.config - -SRCDIR = .. - -all: unzip.o - -clean: - rm -f *~ *.o - -release: - mkdir $(RELEASEDIR)/unzip - cp Makefile unzip.[ch] $(RELEASEDIR)/unzip - - diff --git a/src/util/Makefile b/src/util/Makefile deleted file mode 100644 index d869fae..0000000 --- a/src/util/Makefile +++ /dev/null @@ -1,25 +0,0 @@ -# -# $Id: Makefile.in,v 1.1 2003/05/24 05:39:36 sorend Exp $ -# $Source: /home/cvs/footools/footools/src/util/Makefile.in,v $ -# -# Uncomment this to make win32/cygwin versions. -# DEFS = -DWIN32 -# -# Use this if you have a system without fnmatch() function. -# DEFS = -DNO_FNMATCH - -include ../Makefile.config - -SRCDIR = .. - -OBJS = linefilereader.o fd.o date.o strmatch.o linereaderbuffer.o release.o filelock.o - -all: $(OBJS) - -clean: - rm -f *.o *~ lfrtest - -release: - @mkdir $(RELEASEDIR)/util - @cp *.[ch] Makefile $(RELEASEDIR)/util - diff --git a/src/who/Makefile b/src/who/Makefile deleted file mode 100644 index d3caa2e..0000000 --- a/src/who/Makefile +++ /dev/null @@ -1,36 +0,0 @@ -# -# $Id: Makefile.in,v 1.1 2003/05/24 05:39:36 sorend Exp $ -# $Source: /home/cvs/footools/footools/src/who/Makefile.in,v $ -# - -include ../Makefile.config - -SRCDIR = .. -LIBS = -lcurses - -OBJS = ../lib/who.o spy_view.o spy.o ../lib/dirlist.o ../collection/strlist.o ../util/linefilereader.o - -WEBSPYOBJS = ../lib/who.o webspy.o webspy_nodeview.o webspy_nodedetailsview.o webspy_dirview.o ../lib/dirlist.o ../collection/strlist.o ../util/linefilereader.o ../lib/macro.o ../collection/hashtable.o ../lib/pwdfile.o ../lib/stringtokenizer.o - -WEBSPYLIBS = -lhttpd - -# for webspy -#DEFS = -D__DEBUG__ - -all: spy - -webspy: $(WEBSPYOBJS) - $(CC) -static -o $@ $(WEBSPYOBJS) $(WEBSPYLIBS) $(DEFS) - -spy: $(OBJS) - $(CC) -o $@ $(OBJS) $(LIBS) $(DEFS) - -usage: usage.o ../lib/who.o ../collection/strlist.o ../util/linefilereader.o ../lib/common.o - $(CC) -o $@ usage.o ../lib/common.o ../lib/who.o ../collection/strlist.o ../util/linefilereader.o $(LIBS) $(DEFS) - -clean: - rm -f *.o *~ spy webspy - -release: - mkdir $(RELEASEDIR)/who - cp spy*.c spy*.h Makefile README $(RELEASEDIR)/who diff --git a/src/zip/Makefile b/src/zip/Makefile deleted file mode 100644 index ceb02f1..0000000 --- a/src/zip/Makefile +++ /dev/null @@ -1,18 +0,0 @@ - -include ../Makefile.config - -SRCDIR = .. - -OBJS = ../collection/strlist.o ../lib/common.o ../lib/macro.o ../collection/hashtable.o \ - ../util/linefilereader.o mod_zip.o ../lib/stringtokenizer.o zip.o ../unzip/unzip.o \ - ../checker/util.o ../lib/sfv.o ../lib/dirlist.o - -all: mod_zip.o zip.o zipcheck - -zipcheck: zipcheck.o - gcc -O2 -o $@ $< $(OBJS) -lz - -clean: - rm -f *~ *.o zipcheck - - diff --git a/src/zip/zipcheck.c b/src/zip/zipcheck.c index c071005..8d5837d 100644 --- a/src/zip/zipcheck.c +++ b/src/zip/zipcheck.c @@ -28,6 +28,8 @@ #include #include #include +#include +#include #include #include "mod_zip.h"