cdcover-0.9.1.orig/0040750000175000017500000000000007112470205012562 5ustar bunkbunkcdcover-0.9.1.orig/resback.tex0100640000175000017500000000264207106044222014717 0ustar bunkbunk%%%%%%%% % BACK % %%%%%%%% \newlength{\Test%i} \settowidth{\Test%i}{{%SIDETEXTLEFT%}\hfill~{%SIDETEXTRIGHT%}} \ifthenelse{\lengthtest{\Test%i > 12.0cm}} { \settowidth{\Test%i}{\small {%SIDETEXTLEFT%}\hfill~{%SIDETEXTRIGHT%}} \ifthenelse{\lengthtest{\Test%i > 12.0cm}} { \settowidth{\Test%i}{\footnotesize {%SIDETEXTLEFT%}\hfill~{%SIDETEXTRIGHT%}} \ifthenelse{\lengthtest{\Test%i > 12.0cm}} { \settowidth{\Test%i}{\scriptsize {%SIDETEXTLEFT%}\hfill~{%SIDETEXTRIGHT%}} \ifthenelse{\lengthtest{\Test%i > 12.0cm}} { \newcommand{\sidetext%i}{\parbox{11.6cm}{\tiny {%SIDETEXTLEFT%}\hfill~{%SIDETEXTRIGHT%}}} } { \newcommand{\sidetext%i}{\parbox{11.6cm}{\scriptsize {%SIDETEXTLEFT%}\hfill~{%SIDETEXTRIGHT%}}} } } { \newcommand{\sidetext%i}{\parbox{11.6cm}{\footnotesize {%SIDETEXTLEFT%}\hfill~{%SIDETEXTRIGHT%}}} } } { \newcommand{\sidetext%i}{\parbox{11.6cm}{\small {%SIDETEXTLEFT%}\hfill~{%SIDETEXTRIGHT%}}} } } { \newcommand{\sidetext%i}{\parbox{11.6cm}{{%SIDETEXTLEFT%}\hfill~{%SIDETEXTRIGHT%}}} } \noindent \framebox{\parbox[c][11.6cm][t]{3mm} { \rotatebox{90}{\sidetext%i} }}\framebox{\parbox[c][11.6cm][t]{13.6cm} { \vspace{-0.1cm} \vspace{-0.2cm} \vspace{0.5cm} \color{black} {\footnotesize \begin{tabular}{l@{\hspace{1em}}p{5.6cm}l@{}l@{\hspace{1em}}p{5.6cm}} %BACKCOVERTEXT% \end{tabular} } }}\framebox{\parbox[c][11.6cm][t]{3mm} { \rotatebox{-90}{\sidetext%i} }} %%%%%%%% cdcover-0.9.1.orig/resfront.tex0100640000175000017500000000061607106044625015155 0ustar bunkbunk %%%%%%%%% % FRONT % %%%%%%%%% \noindent \framebox{\parbox[c][12.0cm][t]{12.0cm} { \vspace{1cm} \noindent \begin{center} { \parbox{10cm}{{\Large\color{black}%TITLE%}} \rule{10cm}{1pt} \vspace{0.1cm} \noindent \parbox{10cm}{{\hfill\large{\color{black}%SUBTITLE%}}} } \end{center} \vfill \begin{center} \parbox{10cm}{{\footnotesize\sffamily\mylabel}} \end{center} }} %%%%%%%%% \vspace{1cm} cdcover-0.9.1.orig/reshead.tex0100640000175000017500000000126707104315774014735 0ustar bunkbunk\documentclass[]{article} \usepackage{ifthen,isolatin1,graphicx,color} \graphicspath{{/tmp/disc-cover-8568/}} \renewcommand{\thepage}{} \setlength{\oddsidemargin}{0pt} \setlength{\evensidemargin}{0pt} \setlength{\voffset}{-100pt} \setlength{\footskip}{0pt} \setlength{\textheight}{780pt} \hyphenpenalty=10000 \renewcommand{\dotfill}{\leaders\hbox to 2mm{\hfil.\hfil}\hfill} \newcommand{\mylabel}{\color{black}} \begin{document} \noindent \parbox{11cm} { {\small Printed with \emph{cd cover creator} (C) (GPL) by Ulli Meybohm, www.meybohm.de The program uses the tex-template from Disc-Cover. Disc-Cover is available at \texttt{http://www.liacs.nl/\~{}jvhemert/disc-cover}} } \vspace{0.5cm} cdcover-0.9.1.orig/reshead.h0100640000175000017500000000176307112470114014352 0ustar bunkbunk/* Created by text2h , (c) by Ulli Meybohm, www.meybohm.de */ #ifndef reshead_H #define reshead_H char * resheadV[]= { {"\\documentclass[]{article}"}, {"\\usepackage{ifthen,isolatin1,graphicx,color}"}, {"\\graphicspath{{/tmp/disc-cover-8568/}}"}, {"\\renewcommand{\\thepage}{}"}, {"\\setlength{\\oddsidemargin}{0pt}"}, {"\\setlength{\\evensidemargin}{0pt}"}, {"\\setlength{\\voffset}{-100pt}"}, {"\\setlength{\\footskip}{0pt}"}, {"\\setlength{\\textheight}{780pt}"}, {"\\hyphenpenalty=10000"}, {"\\renewcommand{\\dotfill}{\\leaders\\hbox to 2mm{\\hfil.\\hfil}\\hfill}"}, {""}, {"\\newcommand{\\mylabel}{\\color{black}}"}, {""}, {""}, {"\\begin{document}"}, {""}, {"\\noindent"}, {"\\parbox{11cm}"}, {"{"}, {"{\\small Printed with \\emph{cd cover creator} (C) (GPL) by Ulli Meybohm, www.meybohm.de"}, {"The program uses the tex-template from Disc-Cover."}, {"Disc-Cover is available at \\texttt{http://www.liacs.nl/\\~{}jvhemert/disc-cover}}"}, {"}"}, {"\\vspace{0.5cm}"}, {""} }; int resheadC=25; #endif cdcover-0.9.1.orig/ccc.cc0100640000175000017500000000656307112470040013626 0ustar bunkbunk/* CCC - CD COVER CREATOR Copyright (C) 2000 Ulli Meybohm, www.meybohm.de (ulli@meybohm.de) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "bytevector.h" #include "stringlist.h" #include "ccchelp.h" #include "texmaker.h" /*String Ressources:*/ #include "cccpara.h" Stringlist parameter(cccparaC,cccparaV); #include "cccpara2.h" Stringlist standalone_parameter(cccpara2C,cccpara2V); /* Global Variables */ Stringlist arg; Bytevector temp; Cover cover; //Cover is defined in texmaker.h Bytevector outputfile; Bytevector errormsg("cdcover: "); /* Error Messages */ void error_exit(){ errormsg.fwriteln(fileno(stderr)); exit(1); } void print_help() { errormsg=Stringlist(ccchelpC,ccchelpV).toBytevector(); error_exit(); } void missing_value_error(Bytevector para){ errormsg+= Bytevector("No value for last parameter ")+ para; error_exit(); } void unknown_parameter_error(Bytevector para){ errormsg+= Bytevector("Unknown parameter: ")+ para; error_exit(); } void count_error(Bytevector cnt){ errormsg+= Bytevector("wrong value for-c or --count: ")+ cnt; error_exit(); } void fopen_error(){ errormsg+= Bytevector("can't open outputfile ")+ outputfile; error_exit(); } /* Parsing the program arguments */ void parse_arguments(){ int pnr; int i=1; while ((unsigned int)i 12.0cm}}"}, {"{"}, {" \\settowidth{\\Test%i}{\\small {%SIDETEXTLEFT%}\\hfill~{%SIDETEXTRIGHT%}}"}, {" \\ifthenelse{\\lengthtest{\\Test%i > 12.0cm}}"}, {" {"}, {" \\settowidth{\\Test%i}{\\footnotesize {%SIDETEXTLEFT%}\\hfill~{%SIDETEXTRIGHT%}}"}, {" \\ifthenelse{\\lengthtest{\\Test%i > 12.0cm}}"}, {" {"}, {" \\settowidth{\\Test%i}{\\scriptsize {%SIDETEXTLEFT%}\\hfill~{%SIDETEXTRIGHT%}}"}, {" \\ifthenelse{\\lengthtest{\\Test%i > 12.0cm}}"}, {" {"}, {" \\newcommand{\\sidetext%i}{\\parbox{11.6cm}{\\tiny {%SIDETEXTLEFT%}\\hfill~{%SIDETEXTRIGHT%}}}"}, {" }"}, {" {"}, {" \\newcommand{\\sidetext%i}{\\parbox{11.6cm}{\\scriptsize {%SIDETEXTLEFT%}\\hfill~{%SIDETEXTRIGHT%}}}"}, {" }"}, {" }"}, {" {"}, {" \\newcommand{\\sidetext%i}{\\parbox{11.6cm}{\\footnotesize {%SIDETEXTLEFT%}\\hfill~{%SIDETEXTRIGHT%}}}"}, {" }"}, {" }"}, {" {"}, {" \\newcommand{\\sidetext%i}{\\parbox{11.6cm}{\\small {%SIDETEXTLEFT%}\\hfill~{%SIDETEXTRIGHT%}}}"}, {" }"}, {"}"}, {"{"}, {" \\newcommand{\\sidetext%i}{\\parbox{11.6cm}{{%SIDETEXTLEFT%}\\hfill~{%SIDETEXTRIGHT%}}}"}, {"}"}, {""}, {"\\noindent"}, {"\\framebox{\\parbox[c][11.6cm][t]{3mm}"}, {"{"}, {" \\rotatebox{90}{\\sidetext%i}"}, {"}}\\framebox{\\parbox[c][11.6cm][t]{13.6cm}"}, {"{"}, {" \\vspace{-0.1cm}"}, {" \\vspace{-0.2cm}"}, {" \\vspace{0.5cm}"}, {" \\color{black}"}, {""}, {" {\\footnotesize"}, {" \\begin{tabular}{l@{\\hspace{1em}}p{5.6cm}l@{}l@{\\hspace{1em}}p{5.6cm}}"}, {"%BACKCOVERTEXT% "}, {" \\end{tabular}"}, {" }"}, {"}}\\framebox{\\parbox[c][11.6cm][t]{3mm}"}, {"{"}, {" \\rotatebox{-90}{\\sidetext%i}"}, {"}}"}, {""}, {"%%%%%%%%"}, {""} }; int resbackC=58; #endif cdcover-0.9.1.orig/texmaker.h0100640000175000017500000000242307106043452014555 0ustar bunkbunk/* CCC - CD COVER CREATOR Copyright (C) 2000 Ulli Meybohm, www.meybohm.de (ulli@meybohm.de) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef texmaker_H #define texmaker_H #include "bytevector.h" #include "stringlist.h" /* Class, which produces the latex-output */ class Cover{ private: Bytevector getCover(int i); Bytevector replaceVar(Bytevector b, int i); Bytevector resfront, resback; public: Cover(); Cover(const Cover &c); Bytevector texcover(); Bytevector title; Bytevector subtitle; Bytevector backcover; Bytevector sidetext_left; Bytevector sidetext_right; int count; }; #endif cdcover-0.9.1.orig/Makefile0100640000175000017500000000167007112467422014233 0ustar bunkbunkCC=g++ INSTDIR=/usr/local/bin CFLAGS=-Wall STRINGLIB=bytevector.o stringlist.o ccc: ccc.o $(CC) $(STRINGLIB) texmaker.o ccc.o -o cdcover $(CFLAGS) ccc.o: ccc.cc texmaker.o stringlist.o bytevector.o $(CC) -c ccc.cc $(CFLAGS) texmaker.o: texmaker.h texmaker.cc stringlist.o bytevector.o $(CC) -c texmaker.cc $(CFLAGS) headers: text2h ccchelp ccchelp.h text2h cccpara cccpara.h text2h cccpara2 cccpara2.h text2h reshead reshead.h text2h resback resback.h text2h resfront resfront.h text2h: text2h.o bytevector.o stringlist.o $(CC) $(STRINGLIB) text2h.o -o text2h $(CFLAGS) text2h.o: text2h.cc $(CC) -c text2h.cc $(CFLAGS) bytevector.o: bytevector.h bytevector.cc ${CC} -c bytevector.cc $(CFLAGS) stringlist.o: bytevector.o stringlist.h stringlist.cc $(CC) -c stringlist.cc $(CFLAGS) clean: rm *.o cdcover install: ccc cp cdcover $(INSTDIR) cdcover-0.9.1.orig/ccchelp.h0100640000175000017500000000245307112470113014334 0ustar bunkbunk/* Created by text2h , (c) by Ulli Meybohm, www.meybohm.de */ #ifndef ccchelp_H #define ccchelp_H char * ccchelpV[]= { {"CD Cover Creator Version 0.9.1 (stable) "}, {"Creating LaTeX cd-cover files"}, {"Copyright (C) 2000, Ulli Meybohm, www.meybohm.de (GNU General Public License)"}, {""}, {"Start: cdcover [options]"}, {""}, {"Options: "}, {"-t, --title Set Frontcover Title"}, {"-s, --subtitle <SUBTITLE> Set Frontcover Subtitle"}, {"-b, --backcovertext <BACKCOVERTEXT> Set Backcovertext (can be multiline)"}, {"-l, --sidetext-left <LEFTSIDETEXT> Set left sidetext (default=<TITLE>) "}, {"-r, --sidetext-right <RIGHTSIDETEXT> Set right \" (default=<SUBTITLE>) "}, {"-c, --count <COUNT> Set Number of CDs (default=1)"}, {"-o, --outputfile <FILENAME> Set Outputfile (*.tex) (default=stdout)"}, {""}, {"You can use the variables %i and %n in the string-parameters if you make covers"}, {"for cd-sets with more than one disk. (see example below, 6 CDs) "}, {""}, {"Examples:"}, {"cdcover -t \"SuSE Linux 6.3\" -s \"Disc %i/%n\" -b \"SuSE Linux\" -c 6 -o suse.tex"}, {"cdcover -t \"Backup\" -s \"Date: 04-2000\" -b \"`ls -1 /backup/*.tgz`\" -o backup.tex"}, {""} }; int ccchelpC=21; #endif ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������cdcover-0.9.1.orig/ccchelp.txt����������������������������������������������������������������������0100640�0001750�0001750�00000002030�07112467715�014731� 0����������������������������������������������������������������������������������������������������ustar �bunk����������������������������bunk�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������CD Cover Creator Version 0.9.1 (stable) Creating LaTeX cd-cover files Copyright (C) 2000, Ulli Meybohm, www.meybohm.de (GNU General Public License) Start: cdcover [options] Options: -t, --title <TITLE> Set Frontcover Title -s, --subtitle <SUBTITLE> Set Frontcover Subtitle -b, --backcovertext <BACKCOVERTEXT> Set Backcovertext (can be multiline) -l, --sidetext-left <LEFTSIDETEXT> Set left sidetext (default=<TITLE>) -r, --sidetext-right <RIGHTSIDETEXT> Set right " (default=<SUBTITLE>) -c, --count <COUNT> Set Number of CDs (default=1) -o, --outputfile <FILENAME> Set Outputfile (*.tex) (default=stdout) You can use the variables %i and %n in the string-parameters if you make covers for cd-sets with more than one disk. (see example below, 6 CDs) Examples: cdcover -t "SuSE Linux 6.3" -s "Disc %i/%n" -b "SuSE Linux" -c 6 -o suse.tex cdcover -t "Backup" -s "Date: 04-2000" -b "`ls -1 /backup/*.tgz`" -o backup.tex ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������cdcover-0.9.1.orig/texmaker.cc����������������������������������������������������������������������0100640�0001750�0001750�00000006612�07106256732�014726� 0����������������������������������������������������������������������������������������������������ustar �bunk����������������������������bunk�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* CCC - CD COVER CREATOR Copyright (C) 2000 Ulli Meybohm, www.meybohm.de (ulli@meybohm.de) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "texmaker.h" #include "reshead.h" #include "resfront.h" #include "resback.h" /*Cover Class-Constructors */ Cover::Cover(){ count=1; } Cover::Cover(const Cover &c){ title=c.title; subtitle=c.subtitle; backcover=c.backcover; count=c.count; sidetext_left=c.sidetext_left; sidetext_right=c.sidetext_right; } /*Replace special charachters with tex-entities*/ Bytevector Cover::replaceVar(Bytevector b, int i){ Bytevector tab(1); tab.data[0]=9; b.replace("%n",count); b.replace("%i",i); /* Fucking Backslash-Sequenzes */ b.replace("$","%%$EURO_RULEZ$%%"); b.replace("\\","$\\backslash$"); b.replace("%%$EURO_RULEZ$%%","\\$"); b.replace("#","\\#"); b.replace("%","\\%"); b.replace("&","\\&"); b.replace("~","\\~"); b.replace("_","\\_"); b.replace("{","\\{"); b.replace("}","\\}"); b.replace("[","{[}"); b.replace("]","{]}"); b.replace("*","{*}"); b.replace(" ","~"); b.replace(tab,"~~~~~~~~"); b.replace("^",""); // made some trouble... #ifndef I_AM_A_SUCKER /* notice: Microsoft is a trademark of Microsoft Cooperation, USA To Microsoft: Be lucky that this is an open source project :-) */ b.replace("Microsoft","Microsoft SUCKS"); b.replace("MICROSOFT","MICROSOFT SUCKS"); /* Revenge for kerberos! It's Judgement Day! Isn't it fun to be a hacker? SPASS MUSS SEIN (german wise saying) */ #endif return b; } Bytevector Cover::getCover(int i){ Bytevector t=replaceVar(title,i); Bytevector s=replaceVar(subtitle,i); Bytevector sl=replaceVar(sidetext_left,i); Bytevector sr=replaceVar(sidetext_right,i); Bytevector b=replaceVar(backcover,i); Bytevector front=resfront; Bytevector back=resback; Bytevector nr(i); /* need alphas as tex-identifiers */ for (int x=0; x< nr.size; x++) nr.data[x]='a'+(nr.data[x]-'0'); back.replace("%i",nr); front.replace("%TITLE%",t); front.replace("%SUBTITLE%",s); if (sidetext_left.size>0) { back.replace("%SIDETEXTLEFT%",sl); } else { back.replace("%SIDETEXTLEFT%",t); } if (sidetext_right.size>0) { back.replace("%SIDETEXTRIGHT%",sr); } else { back.replace("%SIDETEXTRIGHT%",s); } b.replace("\n","\\\\"); back.replace("%BACKCOVERTEXT%",b); return Bytevector ( front+back ); } /* public function, which assembles and returns the latex code of the cd-cover */ Bytevector Cover::texcover() { resback=Stringlist(resbackC,resbackV).toBytevector(); resfront=Stringlist(resfrontC,resfrontV).toBytevector(); Bytevector cover(Stringlist(resheadC,resheadV).toBytevector()); for (int i=1; i<=count; i++) { cover+=getCover(i); } cover+=Bytevector("\n\\end{document}\n"); return cover; } ����������������������������������������������������������������������������������������������������������������������cdcover-0.9.1.orig/resfront.h�����������������������������������������������������������������������0100640�0001750�0001750�00000001367�07112470114�014601� 0����������������������������������������������������������������������������������������������������ustar �bunk����������������������������bunk�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Created by text2h , (c) by Ulli Meybohm, www.meybohm.de */ #ifndef resfront_H #define resfront_H char * resfrontV[]= { {""}, {"%%%%%%%%%"}, {"% FRONT %"}, {"%%%%%%%%%"}, {""}, {"\\noindent"}, {"\\framebox{\\parbox[c][12.0cm][t]{12.0cm}"}, {"{"}, {"\\vspace{1cm}"}, {""}, {"\\noindent"}, {"\\begin{center}"}, {"{"}, {"\\parbox{10cm}{{\\Large\\color{black}%TITLE%}}"}, {""}, {"\\rule{10cm}{1pt}"}, {"\\vspace{0.1cm}"}, {""}, {"\\noindent"}, {"\\parbox{10cm}{{\\hfill\\large{\\color{black}%SUBTITLE%}}}"}, {"}"}, {"\\end{center}"}, {""}, {"\\vfill"}, {"\\begin{center}"}, {""}, {"\\parbox{10cm}{{\\footnotesize\\sffamily\\mylabel}}"}, {"\\end{center}"}, {""}, {"}}"}, {""}, {"%%%%%%%%%"}, {""}, {""}, {"\\vspace{1cm}"}, {""} }; int resfrontC=35; #endif �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������cdcover-0.9.1.orig/cccpara.txt����������������������������������������������������������������������0100640�0001750�0001750�00000000170�07106042656�014723� 0����������������������������������������������������������������������������������������������������ustar �bunk����������������������������bunk�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������-h --help -t --title -s --subtitle -b --backcovertext -c --count -o --outputfile -l --sidetext-left -r --sidetext-right ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������cdcover-0.9.1.orig/cccpara2.txt���������������������������������������������������������������������0100640�0001750�0001750�00000000033�07105313244�014774� 0����������������������������������������������������������������������������������������������������ustar �bunk����������������������������bunk�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������-h --help -i --interactive �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������cdcover-0.9.1.orig/cccpara2.h�����������������������������������������������������������������������0100640�0001750�0001750�00000000317�07112470114�014407� 0����������������������������������������������������������������������������������������������������ustar �bunk����������������������������bunk�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Created by text2h , (c) by Ulli Meybohm, www.meybohm.de */ #ifndef cccpara2_H #define cccpara2_H char * cccpara2V[]= { {"-h"}, {"--help"}, {"-i"}, {"--interactive"}, {""} }; int cccpara2C=4; #endif �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������cdcover-0.9.1.orig/cccpara.h������������������������������������������������������������������������0100640�0001750�0001750�00000000545�07112470114�014330� 0����������������������������������������������������������������������������������������������������ustar �bunk����������������������������bunk�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Created by text2h , (c) by Ulli Meybohm, www.meybohm.de */ #ifndef cccpara_H #define cccpara_H char * cccparaV[]= { {"-h"}, {"--help"}, {"-t"}, {"--title"}, {"-s"}, {"--subtitle"}, {"-b"}, {"--backcovertext"}, {"-c"}, {"--count"}, {"-o"}, {"--outputfile"}, {"-l"}, {"--sidetext-left"}, {"-r"}, {"--sidetext-right"}, {""} }; int cccparaC=16; #endif �����������������������������������������������������������������������������������������������������������������������������������������������������������cdcover-0.9.1.orig/bytevector.h���������������������������������������������������������������������0100640�0001750�0001750�00000010660�07106311521�015120� 0����������������������������������������������������������������������������������������������������ustar �bunk����������������������������bunk�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* STRINGLIB Ulli Meybohm's C++ String Library Copyright (C) 2000 Ulli Meybohm, www.meybohm.de (ulli@meybohm.de) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef binary_H #define binary_H /* Bytevector-Class , Storage for Strings or binary data */ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <iostream> #include <fstream> #include <fcntl.h> #include <unistd.h> #include <ctype.h> #include <vector> #ifdef STRINGLIB_USE_GLIBC #include <fnmatch.h> #include <wordexp.h> #include <regex.h> #endif #ifndef BYTEVECTOR_CFGSEPERATOR #define BYTEVECTOR_CFGSEPERATOR "=" #endif class VectorIndexList : public vector<int> { }; class Bytevector{ private: void create(int newsize); public: int size; //data size char* data; /*Container for binary/string data data automatically terminates with Zero at data[size] First Item is data[0] , Last Item is data[size-1] ! Bytevector.data is public for speed advantage, so don't play with it and only use read-only access!! Manual free(data), data=XY or other pointer arithmethic operations will surely cause a segmentation fault! */ Bytevector(); Bytevector(Bytevector &b); Bytevector(const Bytevector &b); Bytevector(int n); Bytevector(const char* pchar); Bytevector(char* pchar); ~Bytevector(); void copyFromString(char* pchar); void copyFromString(const char* pchar); void copyFromBytevector(Bytevector &source, int start, int len); void copyFromBytevector(const Bytevector &source, int start, int len); void resize(int newsize); int find(char c, int startpos); int find(Bytevector &b, int startpos); VectorIndexList findall(Bytevector b); bool freadln(int file,char seperator); // returns false when eof bool freadln(int file); // returns false when eof void freadeof(int file); void fwrite(int file); void fwriteln(int file); bool readfile(Bytevector file); void replace(Bytevector from, Bytevector to); void append(Bytevector &source); void append(const Bytevector &source); void override(Bytevector &source, int overridepos); void override(const Bytevector &source, int overridepos); Bytevector copy(int start, int len); Bytevector copyRange(int indexA, int indexB); int toInt(); bool toBool(); //For config-files id=value Bytevector id(); Bytevector value(); void setValue(Bytevector &value); void setValue(const Bytevector &value); void setValue(const char *c); void setValue(int n); void setValue(bool b); #ifdef STRINGLIB_USE_GLIBC bool fnmatch(Bytevector filenamepattern); bool getstdout(Bytevector shellcommand); bool regexmatch(Bytevector regex); //SET/GET Environmentvariables void setEnv(Bytevector varname); void getEnv(Bytevector varname); void cfg2env(); //= setenv(id(),value()); #endif Bytevector* clone(); char* clonePCHAR(); // Note: The memory, which is occupied by the cloned data // WILL NOT be released when Bytevector-Object is deleted // use delete(Bytevector*) or free(pchar) char& operator[](int i); //slow! Use Bytevector.data[i] for high speed access char* operator*(); //returns Bytevector.data Bytevector operator+(Bytevector b); Bytevector& operator+=(Bytevector &b); Bytevector& operator+=(const Bytevector &b); Bytevector& operator+=(const char *c); Bytevector& operator+=(char *c); Bytevector& operator=(Bytevector &b); Bytevector& operator=(int n); Bytevector& operator=(const Bytevector &b); Bytevector& operator=(const char* pchar); Bytevector& operator=(char* pchar); bool operator==(Bytevector &b); bool operator!=(Bytevector &b); /* friend ifstream& operator >> (ifstream& s, Configuration& c); friend ofstream& operator << (ofstream& s, Configuration& c); friend ostream& operator << (ostream& s, Configuration& c); friend istream& operator >> (istream& s, Configuration& c);*/ }; #endif ��������������������������������������������������������������������������������cdcover-0.9.1.orig/bytevector.cc��������������������������������������������������������������������0100640�0001750�0001750�00000027715�07105772730�015303� 0����������������������������������������������������������������������������������������������������ustar �bunk����������������������������bunk�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* STRINGLIB Ulli Meybohm's C++ String Library Copyright (C) 2000 Ulli Meybohm, www.meybohm.de (ulli@meybohm.de) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "bytevector.h" Bytevector::Bytevector(){ data=NULL; create(0); } Bytevector::Bytevector(Bytevector &b){ data=NULL; create(0); operator=(b); } #ifdef STRINGLIB_USE_GLIBC bool Bytevector::fnmatch(Bytevector filenamepattern){ return ( std::fnmatch(filenamepattern.data, this->data, 0)==0); } bool Bytevector::regexmatch(Bytevector regex){ regex_t *r; r=new regex_t; if (regcomp(r,regex.data,0)){ /*ERROR*/ delete r; return false; } if (regexec(r,data,0,0,0)) { /*Some Error occured or string does not match*/ regfree(r); delete r; return false; } else { regfree(r); delete r; return true; } } bool Bytevector::getstdout(Bytevector shellcommand){ int err; wordexp_t *result; result= new wordexp_t; Bytevector source; source=Bytevector(Bytevector("\"`")+shellcommand+Bytevector("`\"")); if ((err=std::wordexp(source.data, result, 0))==0) { (*this)=result->we_wordv[0]; } wordfree(result); delete result; return (err!=0); } void Bytevector::setEnv(Bytevector varname){ setenv(varname.data,data,true); } void Bytevector::getEnv(Bytevector varname){ copyFromString(getenv(varname.data)); } void Bytevector::cfg2env(){ setenv(id().data,value().data,true); } #endif bool Bytevector::readfile(Bytevector file){ int fd=open(file.data,O_RDONLY); if (fd>=0) { freadeof(fd); close(fd); return(true); } else return(false); } void Bytevector::fwrite(int file){ write(file, data, size); } void Bytevector::fwriteln(int file){ fwrite(file); write(file, "\n", 1); } bool Bytevector::Bytevector::freadln(int file){ return freadln(file,'\n'); } bool Bytevector::freadln(int file,char seperator){ vector<Bytevector*> v; Bytevector *b; int index=0; int status; b=new Bytevector; b->resize(1000); while( (status=read(file,&(b->data[index]),1)) && b->data[index++]!=seperator ){ if (index==1000) { v.push_back(b); b=new Bytevector; b->resize(1000); index=0; } } if (status==1) { index--; }; v.push_back(b); resize((v.size()-1)*1000+index); for (int i=0 ; i<(int)(v.size()-1); i++) { for (int j=0; j<1000; j++) { data[i*1000+j]=(v[i])->data[j]; } } for (int i=0; i<index; i++) { data[(v.size()-1)*1000+i]=(v[v.size()-1])->data[i]; } for (int i=0; i<(int)v.size(); i++) { delete v[i]; } return status; } void Bytevector::freadeof(int file){ vector<Bytevector*> v; Bytevector *b; int index=0; int status; b=new Bytevector; b->resize(1000); while( 0<(status=read(file,&(b->data[index++]),1))){ if (index==1000) { v.push_back(b); b=new Bytevector; b->resize(1000); index=0; } } index--; v.push_back(b); resize((v.size()-1)*1000+index); for (int i=0 ; i<(int)(v.size()-1); i++) { for (int j=0; j<1000; j++) { data[i*1000+j]=(v[i])->data[j]; } } for (int i=0; i<index; i++) { data[(v.size()-1)*1000+i]=(v[v.size()-1])->data[i]; } for (int i=0; i<(int)v.size(); i++) { delete v[i]; } } int Bytevector::toInt(){ bool negative=false; int result=0; int index=0; Bytevector b(*this); b.replace(Bytevector(" "),Bytevector()); if (b.size>0) { switch(b[0]) { case '+': index++; break; case '-': negative=true; index++; break; } while ( index<size ) { if ( isdigit( data[index] ) ) { result*=10; result+=( data[index]-'0'); } index++; } } return negative?-result:result; } bool Bytevector::toBool(){ if (toInt()==0) { return false; } else { return true; } } char* Bytevector::operator*() { return data; } char& Bytevector::operator[](int i) { return data[i]; } Bytevector::Bytevector(const Bytevector &b){ data=NULL; create(0); operator=(b); } void Bytevector::setValue(const char *c){ setValue(Bytevector(c)); } //Little strange: void Bytevector::setValue(int n){ Bytevector newValue; newValue=n; setValue(newValue); } void Bytevector::setValue(bool b) { if (b) { setValue(1); } else { setValue(0); } } void Bytevector::setValue(Bytevector &value){ int pos; if ((pos=find('=',0))!=-1) { resize(pos+value.size+1); override(value,pos+1); } } void Bytevector::setValue(const Bytevector &value){ int pos; if ((pos=find('=',0))!=-1) { resize(pos+value.size+1); override(value,pos+1); } } void Bytevector::override(Bytevector &source, int overridepos){ for (int i=0; i<source.size; i++) { data[overridepos+i]=source.data[i]; } } void Bytevector::override(const Bytevector &source, int overridepos){ for (int i=0; i<source.size; i++) { data[overridepos+i]=source.data[i]; } } Bytevector& Bytevector::operator=( char* pchar){ copyFromString(pchar); return *this; } Bytevector& Bytevector::operator=( const char* pchar){ copyFromString(pchar); return *this; } Bytevector& Bytevector::operator=(Bytevector &b){ create(0); copyFromBytevector(b,0,b.size); return *this; } Bytevector& Bytevector::operator=(const Bytevector &b){ create(0); copyFromBytevector(b,0,b.size); return *this; } Bytevector& Bytevector::operator=(int n){ char c[50]; // is 50 Enough??? int pos=0; int value=(n>=0)?n:-n; Bytevector newValue; do { c[pos]='0'+value%10; pos++; } while ((value/=10)>0 ); if (n<0) c[pos]='-'; else pos--; newValue.resize(pos+1); while (pos>=0) { newValue.data[newValue.size-1-pos]=c[pos]; pos--; } *this=newValue; return *this; } Bytevector Bytevector::operator+(Bytevector b){ Bytevector *c; c=new Bytevector; *c=*this; c->append(b); return *c; } Bytevector& Bytevector::operator+=(Bytevector &b){ append(b); return *this; } Bytevector& Bytevector::operator+=(const Bytevector &b){ append(Bytevector(b)); return *this; } Bytevector& Bytevector::operator+=(const char *c){ append(Bytevector(c)); return *this; } Bytevector& Bytevector::operator+=(char *c){ append(Bytevector(c)); return *this; } Bytevector::Bytevector(int n){ data=NULL; size=0; *this=n; } Bytevector::Bytevector(const char* pchar){ data=NULL; create(0); copyFromString(pchar); } Bytevector::Bytevector(char* pchar){ data=NULL; create(0); copyFromString(pchar); } Bytevector::~Bytevector(){ if (data) free(data); } void Bytevector::copyFromString(char* pchar){ int i=0; create(strlen(pchar)); while(i<size) { data[i]=pchar[i]; i++; } } void Bytevector::copyFromString(const char* pchar){ int i=0; create(strlen(pchar)); while(i<size) { data[i]=pchar[i]; i++; } } char* Bytevector::clonePCHAR(){ char * result; int i=0; result = (char*) malloc (sizeof(char)*size+1); result[size]=0; while(i<size) { result[i]=data[i]; i++; } return result; } void Bytevector::create(int newsize){ if (data) free(data); size=newsize; data=(char*)malloc(sizeof(char)*size+1); data[size]=0; } void Bytevector::resize(int newsize){ char *newdata; if (size!=0) { newdata=(char*)malloc(sizeof(char)*newsize+1); for (int pos=0; pos<newsize; pos++){ if (pos<size) { newdata[pos]=data[pos]; } else { newdata[pos]=0; } } newdata[newsize]=0; free(data); size=newsize; data=newdata; } else { create(newsize); } } void Bytevector::copyFromBytevector(Bytevector &source, int start, int len){ create(len); for (int i=0; i<len; i++){ data[i]=source.data[start+i]; } } void Bytevector::copyFromBytevector(const Bytevector &source, int start, int len){ create(len); for (int i=0; i<len; i++){ data[i]=source.data[start+i]; } } int Bytevector::find(Bytevector &b, int startpos){ for (int i=startpos; i<(size-b.size+1); i++) { if (data[i]==b.data[0]) { bool eq=true; for (int j=0; j<b.size; j++) { eq = eq && (b.data[j]==data[i+j]); if (!eq) j=b.size; } if (eq) { return i; } } } return -1; } VectorIndexList Bytevector::findall(Bytevector b){ int startpos=0,fpos=0; VectorIndexList result; while ( (fpos=find(b,startpos)) !=-1 ) { result.push_back(fpos); startpos=fpos+b.size; } return VectorIndexList(result); } int Bytevector::find(char c, int startpos){ for (int i=startpos; i<size; i++) { if (data[i]==c) { return i; } } return -1; } Bytevector* Bytevector::clone(){ Bytevector *b; b=new Bytevector(*this); return b; } void Bytevector::replace(Bytevector from, Bytevector to){ if (!size) return; int matches=0; int pos,startpos=0; //calculate new size while ( (pos=find(from,startpos)) != -1 ) { matches++; startpos=pos+from.size; } int newsize=size+matches*(to.size-from.size); char *newdata=(char*) malloc(newsize*sizeof(char)+1); //save new data; startpos=0; int ubound; int newindex=0; do { //find next item pos=find(from,startpos); //set upper bound for copying from old stream if (pos==-1) { ubound=size; } else { ubound=pos; } //copying from old stream until eof or pos for (int i=startpos; i<ubound; i++) { newdata[newindex]=data[i]; newindex++; } //if item is found then insert new item "to" if (pos!=-1) { //cout<<"Insert to.data into target stream on pos "<<newindex<<"\n"; for (int i=0; i<to.size; i++) { newdata[newindex]=to.data[i]; newindex++; } } //Set new starting posistion startpos=pos+from.size; } while (pos!=-1); //Stop if nothing is found free(data); newdata[newsize]=0; data=newdata; size=newsize; } void Bytevector::append(Bytevector &source){ int oldsize=size; resize(size+source.size); for (int i=0; i<source.size; i++){ data[oldsize+i]=source.data[i]; } } void Bytevector::append(const Bytevector &source){ int oldsize=size; resize(size+source.size); for (int i=0; i<source.size; i++){ data[oldsize+i]=source.data[i]; } } Bytevector Bytevector::copy(int start, int len){ Bytevector b; b.copyFromBytevector(*this,start,len); return Bytevector(b.data); } Bytevector Bytevector::copyRange(int indexA, int indexB){ Bytevector b; if (indexA!=indexB) { int start=indexA<indexB?indexA:indexB; int end=indexA<indexB?indexB:indexA; int len=end-start+1; b.copyFromBytevector(*this,start,len); } else { b.resize(1); b.data[0]=data[indexA]; } return Bytevector(b); } Bytevector Bytevector::id(){ Bytevector b; Bytevector split; split=BYTEVECTOR_CFGSEPERATOR; int pos=find(split,0); if (pos>0) { b.copyFromBytevector(*this,0,pos); } return Bytevector(b); } Bytevector Bytevector::value(){ Bytevector b; Bytevector split; split=BYTEVECTOR_CFGSEPERATOR; int pos=find(split,0); if (pos>0) { b.copyFromBytevector(*this,pos+1,size-pos-1); } return Bytevector(b); } bool Bytevector::operator==(Bytevector &b){ bool result=size==b.size; if (!result) return result; result=true; for (int i=0; i<size; i++) { result=result && ( data[i]==b.data[i] ); } return result; } bool Bytevector::operator!=(Bytevector &b){ return !operator==(b); } ���������������������������������������������������cdcover-0.9.1.orig/stringlist.cc��������������������������������������������������������������������0100640�0001750�0001750�00000021056�07105773612�015307� 0����������������������������������������������������������������������������������������������������ustar �bunk����������������������������bunk�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* STRINGLIB Ulli Meybohm's C++ String Library Copyright (C) 2000 Ulli Meybohm, www.meybohm.de (ulli@meybohm.de) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "stringlist.h" Stringlist::Stringlist(){ lineSeperator=STRINGLIST_LS; fieldSeperator=STRINGLIST_FS; } Stringlist::Stringlist(Stringlist &s){ lineSeperator=STRINGLIST_LS; fieldSeperator=STRINGLIST_FS; add(s); } Stringlist::Stringlist(int argc,char *argv[]){ lineSeperator=STRINGLIST_LS; fieldSeperator=STRINGLIST_FS; add(argc,argv); } Stringlist::Stringlist(Stringlist &s, VectorIndexList& itemsToCopy){ lineSeperator=STRINGLIST_LS; fieldSeperator=STRINGLIST_FS; add(s,itemsToCopy); } void Stringlist::add(int argc, char *argv[]){ for (int i=0; i<argc; i++){ add(argv[i]); } } bool Stringlist::includes(Bytevector b){ return find(b,0)!=-1; } bool Stringlist::option(Bytevector option) { return find(option,0)>=0; } bool Stringlist::option(Bytevector option, Bytevector longoption){ if ( find(option,0)>=0 ) return true; if ( find(longoption,0)>=0 ) return true; return false; } Bytevector Stringlist::optionvalue(Bytevector option){ int pos=find(option,0); if ( (pos<0) || ((unsigned int)pos>=size()) ) return Bytevector(); else return (*this)[pos]; } Bytevector Stringlist::optionvalue(Bytevector option, Bytevector longoption){ int pos=find(option,0); if ( (pos>=0) && ((unsigned int)pos<size()) ) return (*this)[pos]; pos=find(longoption,0); if ( (pos>=0) && ((unsigned int)pos<size()) ) return (*this)[pos]; return Bytevector(); } #ifdef STRINGLIB_USE_GLIBC VectorIndexList Stringlist::grep(Bytevector regex){ int index=0; VectorIndexList vi; for (Stringlist::iterator i=begin(); i!=end(); i++, index++){ if ( (*i)->regexmatch(regex)) { vi.push_back(index); } } return VectorIndexList(vi); } int Stringlist::wordexpand(Bytevector source){ int err; wordexp_t *result; result= new wordexp_t; if ((err=std::wordexp(source.data, result, 0))==0) { clear(); add(result->we_wordc,result->we_wordv); } wordfree(result); delete result; return err; } void Stringlist::glob(Bytevector filenamepattern){ clear(); glob_t *result; result= new glob_t; std::glob(filenamepattern.data, GLOB_MARK, 0, result); add(result->gl_pathc,result->gl_pathv); globfree(result); delete result; } #endif void Stringlist::readfile(int file){ Bytevector *b; b=new Bytevector; while( b->freadln(file) ){ add(b); b=new Bytevector; } } void Stringlist::writefile(int file){ for (Stringlist::iterator i=begin(); i!=end(); i++) { (*i)->fwriteln(file); } } void Stringlist::copySplit(Bytevector &source){ copySplit(source, lineSeperator); } Stringlist& Stringlist::operator=(Stringlist &s) { Stringlist::clear(); add(s); return *this; } Bytevector Stringlist::operator()(int line, int field){ if ( line<(int)size() ){ Stringlist s; s.copySplit( (*this)[line] , fieldSeperator); if ( field<(int)s.size() ) { return s[field]; } }; return Bytevector(""); } void Stringlist::add(Stringlist &s, VectorIndexList& itemsToAdd){ for ( VectorIndexList::iterator i=itemsToAdd.begin(); i!=itemsToAdd.end(); i++) { add(s[*i]); } } Stringlist::iterator Stringlist::getID(Bytevector id){ for (Stringlist::iterator i=begin(); i!=end(); i++){ if ( (*i)->id()==id ) { return i; } } //else return end(); } VectorIndexList Stringlist::fgrep(Bytevector searchstring){ int index=0; VectorIndexList vi; for (Stringlist::iterator i=begin(); i!=end(); i++, index++){ if ( (*i)->find(searchstring,0)!=-1 ) { vi.push_back(index); } } return VectorIndexList(vi); } VectorIndexList Stringlist::findall(Bytevector b){ int index=0; VectorIndexList vi; for (Stringlist::iterator i=begin(); i!=end(); i++, index++){ if ( (*(*i))==b ) { vi.push_back(index); } } return VectorIndexList(vi); } int Stringlist::find(Bytevector b, int startpos){ int index=startpos; for (Stringlist::iterator i=begin()+startpos; i!=end(); i++, index++){ if ( (*(*i))==b ) { return index; } } return -1; } void Stringlist::set(Bytevector id, Bytevector value){ Stringlist::iterator item; item=getID(id); if (item!=end()) { (*item)->setValue(value); } else { Bytevector newItem; newItem+=id; newItem+="="; newItem+=value; add(Bytevector(newItem)); } } void Stringlist::set(Bytevector id, const char *value){ set(id,Bytevector(value)); } void Stringlist::set(Bytevector id, char *value){ set(id,Bytevector(value)); } void Stringlist::set(Bytevector id, int value){ set(id, Bytevector(value)); } void Stringlist::set(Bytevector id, bool value){ set(id, value?1:0 ); } Bytevector Stringlist::get(Bytevector id){ Stringlist::iterator item; item=getID(id); if (item==end()) return Bytevector(""); return (*getID(id))->value(); } bool Stringlist::getBool(Bytevector id){ Stringlist::iterator item; item=getID(id); if (item==end()) return false;//Exception better?? return (*getID(id))->value().toBool(); } int Stringlist::getInt(Bytevector id){ Stringlist::iterator item; item=getID(id); if (item==end()) return 0;//Exception better?? return (*getID(id))->value().toInt(); } Stringlist::~Stringlist(){ Stringlist::clear(); } void Stringlist::clear(){ for (Stringlist::iterator i=begin(); i!=end(); i++){ delete *i; } vector<Bytevector *>::clear(); } int Stringlist::totalTextSize(Bytevector seperator){ int result=0; for (Stringlist::iterator i=begin(); i!=end(); i++){ result+=(*(*i)).size; } result+=seperator.size*size(); return result; } Bytevector* Stringlist::text(){ return text(Bytevector(lineSeperator)); } //fast Bytevector* Stringlist::text(Bytevector Seperator) { Bytevector *b; b=new Bytevector; int s=totalTextSize(Seperator); b->resize(s); int overridepos=0; for (Stringlist::iterator i=begin(); i!=end(); i++) { b->override( *(*i), overridepos); overridepos+=(*i)->size; b->override( Seperator, overridepos); overridepos+=Seperator.size; } return b; } //slow Bytevector Stringlist::toBytevector(){ Bytevector b; int s=totalTextSize(lineSeperator); b.resize(s); int overridepos=0; for (Stringlist::iterator i=begin(); i!=end(); i++) { b.override( *(*i), overridepos); overridepos+=(*i)->size; b.override( lineSeperator, overridepos); overridepos+=lineSeperator.size; } return Bytevector(b); } void Stringlist::add(Stringlist &s) { for (Stringlist::iterator i=s.begin(); i!=s.end(); i++) { push_back( (*i)->clone() ); } } void Stringlist::add(Bytevector *b){ push_back(b); } void Stringlist::add(char *c){ Bytevector *b; b=new Bytevector; *b=c; push_back(b); } void Stringlist::add(const char *c){ Bytevector *b; b=new Bytevector; *b=c; push_back(b); } void Stringlist::add(Bytevector &b){ add(b.clone()); } void Stringlist::add(const Bytevector &b){ add(Bytevector(b)); } void Stringlist::insert(Bytevector *b, int pos){ iterator i=begin()+pos; vector<Bytevector *>::insert(i,b); } void Stringlist::insert(Bytevector &b, int pos){ insert(b.clone(),pos); } void Stringlist::del(int pos){ erase(begin()+pos); } void Stringlist::println() { for (int i=0; i<(int)size(); i++) { printf("%d. -%s-\n",i,(*this)[i].data); } } void Stringlist::copySplit(Bytevector &source, Bytevector lineSeperator){ int startpos=0; int index; Bytevector *b; while( (index=source.find(lineSeperator,startpos)) != -1 ) { b=new Bytevector; if (index!=startpos) { *b=source.copyRange(startpos,index-1); } else { *b=""; } push_back(b); startpos=index+lineSeperator.size; } if (startpos<(source.size-1)){ b=new Bytevector; *b=source.copyRange(startpos,source.size-1); push_back(b); } } Bytevector& Stringlist::operator[](int i){ return *(vector<Bytevector *>::operator[](i)); } // ARGUMENTVECTOR /*char** Stringlist::argv(){ char** args; args=(char **) malloc (size()*sizeof(char*)); int index=0; for (Stringlist::iterator i=begin(); i!=end(); i++, index++) { args[index]= (*i)->clonePCHAR(); } return args; }*/ ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������cdcover-0.9.1.orig/stringlist.h���������������������������������������������������������������������0100640�0001750�0001750�00000010305�07106311375�015137� 0����������������������������������������������������������������������������������������������������ustar �bunk����������������������������bunk�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* STRINGLIB Ulli Meybohm's C++ String Library Copyright (C) 2000 Ulli Meybohm, www.meybohm.de (ulli@meybohm.de) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef stringlist_H #define stringlist_H #include <vector> #include <iostream> #include <stdio.h> #ifdef STRINGLIB_USE_GLIBC #include <glob.h> #include <wordexp.h> #endif #include "bytevector.h" /*Definition of default Line and Field Seperators*/ #ifndef STRINGLIST_FS #define STRINGLIST_FS "," #endif #ifndef STRINGLIST_LS #define STRINGLIST_LS "\n" #endif //class VectorIndexList in "bytevector.h" class MatrixIndex{ public: int x; int y; MatrixIndex(){x=0;y=0;}; MatrixIndex(MatrixIndex &m){ (*this)=m; }; MatrixIndex(int x, int y) { this->x=x; this->y=y; }; MatrixIndex& operator=(MatrixIndex &m) { this->x=m.x; this->y=m.y; return *this; } }; class MatrixIndexList: public vector<MatrixIndex> { }; class Stringlist : public vector<Bytevector*> { private: Stringlist::iterator getID(Bytevector id); public: Bytevector lineSeperator; //Default='\n' Bytevector fieldSeperator; // Default=',' Stringlist(); Stringlist(Stringlist &s); Stringlist(Stringlist &s, VectorIndexList& itemsToCopy); Stringlist(int argc, char *argv[]); ~Stringlist(); //Destroys Binaries! void copySplit(Bytevector &source, Bytevector lineSeperator); void copySplit(Bytevector &source); void readfile(int file); void writefile(int file); void clear(); void add(int argc,char *argv[]); void add(char *c); void add(const char *c); //add copy of *b void add(Bytevector *b); //insert *b without making a copy (fast, but little dangerous!) void add(Bytevector &b); //insert copy void add(const Bytevector &b); //insert copy void add(Stringlist &s); void add(Stringlist &s, VectorIndexList& itemsToAdd); void insert(Bytevector *b, int pos); //takeover *b without copying void insert(Bytevector &b, int pos); //insert copy void del(int pos); #ifdef STRINGLIB_USE_GLIBC void glob(Bytevector filenamepattern); int wordexpand(Bytevector source); VectorIndexList grep(Bytevector regex); #endif VectorIndexList fgrep(Bytevector searchstring); //fast grep without regular expressions VectorIndexList findall(Bytevector b); //Returns all "b==Stringlist[i]" int find(Bytevector b,int startpos); //Returns first occurance from startpos of b in Stringlist bool includes(Bytevector b); // b in *this ? Bytevector* text(); // uses default line Seperator Bytevector* text(Bytevector Seperator); //uses alternative LineSeperator Bytevector toBytevector(); int totalTextSize(Bytevector seperator); //Configfile functions, maybe outsourced to derived class later! //structure: id=value //Can also be used as kind of hashtable (slow!) void set(Bytevector id, Bytevector value); void set(Bytevector id, const char *value); void set(Bytevector id, char *value); void set(Bytevector id, int value); void set(Bytevector id, bool value); Bytevector get(Bytevector id); bool getBool(Bytevector id); int getInt(Bytevector id); //Functions for commandline-options bool option(Bytevector option); bool option(Bytevector option, Bytevector longoption); Bytevector optionvalue(Bytevector option); // command -option value Bytevector optionvalue(Bytevector option, Bytevector longoption); void println(); //just for testing! Bytevector& operator[](int i); Bytevector operator()(int line, int field); Stringlist& operator=(Stringlist &s); }; #endif ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������cdcover-0.9.1.orig/text2h.cc������������������������������������������������������������������������0100640�0001750�0001750�00000004020�07105605506�014307� 0����������������������������������������������������������������������������������������������������ustar �bunk����������������������������bunk�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* text2h - Converting textfiles to C/C++ includefiles Copyright (C) 2000 Ulli Meybohm, www.meybohm.de (ulli@meybohm.de) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "bytevector.h" Bytevector head("#ifndef %VAR%_H\n#define %VAR%_H\n\n"); Bytevector pcharstart("char * %VAR%V[]=\n{\n"); Bytevector pcharend("};\n"); Bytevector linecount("\nint %VAR%C=%COUNT%;\n\n"); Bytevector tail("\n#endif\n"); int main(int argc, char* argv[]){ Bytevector varname; Bytevector input; int count=0; if (argc<=1) { fprintf(stderr,"text2h, converts any text to a c-headerfile with a char* vector[]\n"); fprintf(stderr,"example: cat <inputfile> | text2h <VARNAME> > <outputfile>\n"); exit(1); } varname=argv[1]; head.replace("%VAR%",varname); tail.replace("%VAR%",varname); pcharstart.replace("%VAR%",varname); pcharend.replace("%VAR%",varname); linecount.replace("%VAR%",varname); Bytevector("/* Created by text2h , (c) by Ulli Meybohm, www.meybohm.de */").fwriteln(1); head.fwrite(1); pcharstart.fwrite(1); while( input.freadln(0) ) { count++; Bytevector("{\"").fwrite(1); input.replace("\\","\\\\"); input.replace("\"","\\\""); input.fwrite(1); Bytevector("\"},").fwriteln(1); } Bytevector("{\"\"}\n").fwrite(1); pcharend.fwrite(1); linecount.replace("%COUNT%",Bytevector(count)); linecount.fwrite(1); tail.fwrite(1); return 0; } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������cdcover-0.9.1.orig/AUTHOR���������������������������������������������������������������������������0100640�0001750�0001750�00000000124�07105607724�013514� 0����������������������������������������������������������������������������������������������������ustar �bunk����������������������������bunk�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Ulli Meybohm Giessener Str.24 35410 Hungen (Germany) www.meybohm.de ulli@meybohm.de��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������cdcover-0.9.1.orig/COPYING��������������������������������������������������������������������������0100640�0001750�0001750�00000043077�06674665504�013652� 0����������������������������������������������������������������������������������������������������ustar �bunk����������������������������bunk������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������� GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. <one line to give the program's name and a brief idea of what it does.> Copyright (C) 19yy <name of author> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) 19yy name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. <signature of Ty Coon>, 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������cdcover-0.9.1.orig/ChangeLog������������������������������������������������������������������������0100640�0001750�0001750�00000000271�07112470110�014325� 0����������������������������������������������������������������������������������������������������ustar �bunk����������������������������bunk�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������2000-05-23 Version 0.9.1 -executable name changed from "ccc" to "cdcover" because the name "ccc" was already used by the Compaq C Compiler 2000-05-09 Version 0.9 -first public release ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������cdcover-0.9.1.orig/INSTALL��������������������������������������������������������������������������0100640�0001750�0001750�00000002374�07105607755�013635� 0����������������������������������������������������������������������������������������������������ustar �bunk����������������������������bunk�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������CCC INSTALLATION ---------------- GNU\LINUX and UNIX-Systems: Extract the sourcefiles from the tar-archive. If you have an other c++ compiler than the g++-compiler, you need to change the entry "COMPILER=g++" in the Makefile to "COMPILER=<your compiler name>". Then type "make" in the direcroty of the ccc-Makefile to build the executable "ccc". Ccopy the executable in a directory of your choice that is listet in the $PATH Variable. This should usually be "/usr/local/bin" or "/usr/bin". You can also type "make install" to install the file automatically to "/usr/local/bin". Windows 95,98,2000,NT: Unlike all the Unix-Systems, Windows doesn't come with a C-Compiler. If you haven't got a C-Compiler then first download and install the free compiler form www.cygnus.com . Extract the files from the tar-archive then start the shell and change the directory in which you extracted the source-files. If you have an other compiler than the g++-compiler, you need to change the entry "COMPILER=g++" in the Makefile to "COMPILER=<your compiler name>". Pre-compiled binaries exist for Windows, GNU\Linux i386 and Sun Solaris (Sparc Station). Check www.meybohm.de for updates.��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������cdcover-0.9.1.orig/HACKING��������������������������������������������������������������������������0100640�0001750�0001750�00000003221�07105612737�013557� 0����������������������������������������������������������������������������������������������������ustar �bunk����������������������������bunk�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������HACKING ------- This file is for every hacker who wants to reuse some code of the ccc-program or who wants to make improvements or bugfixes. Read this text first. STRINGLIB The ccc program makes heavy use of the c++-classes "Bytevector" and "Stringlist", which are defined in bytevector.cc and stringlist.cc. I don't like the stirng-class of the c++ standard library, so I have written my own. You can use these classes as black boxes. They are well tested and should work properly. Take a look to the header files "bytevector.h" and "stringlist.h" to get information about available functions. Only very few functions are needed in ccc. TEXT2H text2h is a little program which converts textfiles into c++ header files with "char* argv[]" vector constants. See text2h.cc for the source code. This tool is used to create the string-ressource files, which are used to include the tex-templates and the ccc-ressources. CCC The ccc program consists of the following files: ccc.cc - main program, parameter, error messages cccpara.h - ccc parameters cccpara2.h - ccc parameters WITHOUT value These two files are needed by ccc.cc for parameter-parsing texmaker.h - cover class interface is defined here texmaker.cc - implementation of the cover class res*.h - c++ headers with latex template constants created from the texfiles by the text2h utility Check especially the "texmaker.*" files, if you want to reuse the cover-generator in other applications. If you have special questions or if you have made improvements feel free to contact me: ccc-author: Ulli Meybohm : ulli@meybohm.de �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������cdcover-0.9.1.orig/README���������������������������������������������������������������������������0100644�0001750�0001750�00000006020�07106267676�013465� 0����������������������������������������������������������������������������������������������������ustar �bunk����������������������������bunk�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������CCC - CD COVER CREATOR Creating Data-CD Covers AUTHOR : Ulli Meybohm <ulli@meybohm.de>, www.meybohm.de LICENSE: GNU General Public License (read the file "COPYING") Copyright notice: The program uses the tex-template of the GPL'd program "disc-cover" (C) Jano van Hemert, which is a great program to create covers for audio-cds. It can be found at http://www.liacs.nl/~jvhemert/disc-cover MANUAL CCC is a little commandline tool which creates user-defined data-cd covers. After installing the program, open a shell and enter "ccc". The program gives you a overview of the supported parameters. Should be easy to use. PARAMETERS I will explain the parameters with the following example: I want to create covers for my SuSE Linux Distribution, which consists of 6 CDs. -c, --count <NUMBER OF CDs> Sets the number of cds. The default is "1". Example: -c 6 -t, --title <TITLE> Sets the title which appears on the top of the frontcover and on the left of each sidetext Example: -t "SuSE Linux 6.3" -s, --subtitle <SUBTITLE> Sets the subtitle which appears below the title on the frontcover and on the right of each sidetext. Remember that you can use the variables %i (number of the current cd-rom) and %n (total number of cd-roms) in every string constant (title, subtitle etc...). They will automatically be replaced by the program. Now back to the example. I wanted to create 6 cover for my Linux Distribution CDs. I think it would be good to use the subtitle for the enumberation ( Disc 1/6, Disc 2/6, ... Disc 6/6 ). Example: -s "Disc %i/%n" -b, --backcovertext <BACKCOVERTEXT> Sets the text, which should appear on the back of the cover. This text can contain linebreaks. Example 1 : -b "SuSE Linux Distribution Version 6.3" Example 2 : -b "`ls -1 /cdrom/*.tgz` Example 3 : -b "`cat`" -o, --outputfile <FILENAME> Finally you have got to specify the file were the latex output will be stored. The file should have the extension ".tex". If you don't specify an output file, the output will be written on the standard output. Example: -o suse.tex -l, --sidetext-left <SIDETEXT-LEFT> This is an optional parameter. Usually the title will be printed on the left side of each sidetext. If you want an other text than the title use this parameter. -r, --sidetext-right <SIDETEXT-RIGHT> This is also an optional parameter. Usually the subtitle will be printed on the right side of each sidetext. If you want an other text than the subtitle use this parameter. PRINTING Now you have the latex file. For example "suse.tex". To print or view this text you have to convert the file to PostScript. Enter the following commands: latex suse.tex If everything works correct you should find the file suse.dvi in the current directory. You have to convert this dvi-file to PostScript by entering: dvips suse.dvi -o suse.ps Now you finally have the postscript-file "suse.ps". You can now view this file with any postscript viewer. For example: gv suse.ps ghostview suse.ps kghostview suse.ps You can print the file with the lpr command: lpr suse.ps ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������cdcover-0.9.1.orig/TODO�����������������������������������������������������������������������������0100644�0001750�0001750�00000000217�07106264176�013267� 0����������������������������������������������������������������������������������������������������ustar �bunk����������������������������bunk�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������-GUI Frontend ( development is in progress ) -Better support for special charachters -User defined text-color -User defined backcover-fontsize ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������cdcover-0.9.1.orig/resback.log����������������������������������������������������������������������0100644�0001750�0001750�00000001726�07106044701�014710� 0����������������������������������������������������������������������������������������������������ustar �bunk����������������������������bunk�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������This is TeX, Version 3.14159 (Web2C 7.3.1) (format=latex 1999.11.8) 9 MAY 2000 19:24 **resback.tex resfront.tex reshead.tex suse.tex (resback.tex LaTeX2e <1998/12/01> patch level 1 Babel <v3.6x> and hyphenation patterns for american, french, german, ngerman, n ohyphenation, loaded. Runaway argument? {\Test \settowidth {\Test \ifthenelse {\lengthtest {\Test { \settowidth \ETC. ! Paragraph ended before \newlength was complete. <to be read again> \par l.36 ? ! Emergency stop. <to be read again> \par l.36 End of file on the terminal! Here is how much of TeX's memory you used: 7 strings out of 25901 61 string characters out of 197575 43956 words of memory out of 384000 3020 multiletter control sequences out of 10000+15000 3640 words of font info for 14 fonts, out of 400000 for 1000 14 hyphenation exceptions out of 1000 5i,0n,1p,148b,7s stack positions out of 300i,100n,500p,50000b,4000s No pages of output. ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������