From d82c87b169dd9ef6d0c2b971a07a7c9ef46785bf Mon Sep 17 00:00:00 2001 From: Kamil Dudka Date: Tue, 23 Feb 2010 14:21:11 +0000 Subject: [PATCH] - new upstream release, dropped applied patches --- .cvsignore | 2 +- sources | 2 +- units-1.87-gcc-warnings-1.patch | 234 -------------------------------- units-1.87-gcc-warnings-2.patch | 67 --------- units-1.88.tar.gz.sig | Bin 0 -> 72 bytes units.spec | 11 +- 6 files changed, 7 insertions(+), 309 deletions(-) delete mode 100644 units-1.87-gcc-warnings-1.patch delete mode 100644 units-1.87-gcc-warnings-2.patch create mode 100644 units-1.88.tar.gz.sig diff --git a/.cvsignore b/.cvsignore index 913fc93..017b085 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -units-1.87.tar.gz +units-1.88.tar.gz diff --git a/sources b/sources index 52a8a61..e86a38c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -8cf47adf29e38a9aa744e8d5246d1bec units-1.87.tar.gz +9b2ee6e7e0e9c62741944cf33fc8a656 units-1.88.tar.gz diff --git a/units-1.87-gcc-warnings-1.patch b/units-1.87-gcc-warnings-1.patch deleted file mode 100644 index b4e6f79..0000000 --- a/units-1.87-gcc-warnings-1.patch +++ /dev/null @@ -1,234 +0,0 @@ -diff --git a/parse.y b/parse.y -index 89a05b1..0bdd8a3 100644 ---- a/parse.y -+++ b/parse.y -@@ -29,6 +29,8 @@ - - #include "units.h" - -+int yylex(); -+void yyerror(char *); - - static int err; /* value used by parser to store return values */ - -@@ -114,7 +116,7 @@ funcunit(struct unittype *theunit, struct function *fun) - if (err) - return err; - } else if (fun->type==ANGLEOUT || fun->type == DIMENSIONLESS) { -- if (err=unit2num(theunit)) -+ if ((err=unit2num(theunit))) - return err; - - } else -@@ -278,7 +280,7 @@ struct { - "per" , DIVIDE, - 0, 0 }; - --yylex(YYSTYPE *lvalp, struct commtype *comm) -+int yylex(YYSTYPE *lvalp, struct commtype *comm) - { - int length, count; - struct unittype *output; -@@ -414,7 +416,7 @@ yylex(YYSTYPE *lvalp, struct commtype *comm) - } - - --yyerror(char *s){} -+void yyerror(char *s){} - - void - freelist(int startunit) -diff --git a/units.c b/units.c -index f5416b0..2cd6765 100644 ---- a/units.c -+++ b/units.c -@@ -29,6 +29,7 @@ - - #ifdef READLINE - # include -+# include - # define RVERSTR "with readline" - #else - # define RVERSTR "without readline" -@@ -489,7 +490,7 @@ readunits(char *file, FILE *errfile, - } - if (wronglocale) - continue; -- if (lineptr = strchr(line,COMMENTCHAR)) -+ if ((lineptr = strchr(line,COMMENTCHAR))) - *lineptr = 0; - unitname = strtok(line, WHITE); - if (!unitname || !*unitname) -@@ -519,9 +520,9 @@ readunits(char *file, FILE *errfile, - goterr=1; - continue; - } -- if (pfxptr = plookup(unitname)) { /* already there: redefinition */ -+ if ((pfxptr = plookup(unitname))) { /* already there: redefinition */ - goterr=1; -- if (errfile) -+ if (errfile) { - if (!strcmp(pfxptr->name, unitname)) - fprintf(errfile, - "%s: redefinition of prefix '%s-' on line %d of '%s' ignored.\n", -@@ -529,6 +530,7 @@ readunits(char *file, FILE *errfile, - else - fprintf(errfile, "%s: prefix '%s-' on line %d of '%s' is hidden by earlier definition of '%s-'.\n", - progname, unitname, linenum, file, pfxptr->name); -+ } - continue; - } - -@@ -948,7 +950,7 @@ lookupunit(char *unit,int prefixok) - struct prefixlist *pfxptr; - struct unitlist *uptr; - -- if (uptr = ulookup(unit)) -+ if ((uptr = ulookup(unit))) - return uptr->value; - - if (strlen(unit)>2 && unit[strlen(unit) - 1] == 's') { -@@ -1278,7 +1280,7 @@ completereduce(struct unittype *unit) - { - int err; - -- if (err=reduceunit(unit)) -+ if ((err=reduceunit(unit))) - return err; - sortunit(unit); - cancelunit(unit); -@@ -1340,7 +1342,7 @@ unit2num(struct unittype *input) - int err; - - initializeunit(&one); -- if (err=completereduce(input)) -+ if ((err=completereduce(input))) - return err; - if (compareunits(input,&one,ignore_nothing)) - return E_NOTANUMBER; -@@ -1404,13 +1406,13 @@ rootunit(struct unittype *inunit,int n) - int err; - - initializeunit(&outunit); -- if (err=completereduce(inunit)) -+ if ((err=completereduce(inunit))) - return err; -- if ((n & 1==0) && (inunit->factor<0)) return E_NOTROOT; -+ if (((n & 1)==0) && (inunit->factor<0)) return E_NOTROOT; - outunit.factor = pow(inunit->factor,1.0/(double)n); -- if (err = subunitroot(n, inunit->numerator, outunit.numerator)) -+ if ((err = subunitroot(n, inunit->numerator, outunit.numerator))) - return err; -- if (err = subunitroot(n, inunit->denominator, outunit.denominator)) -+ if ((err = subunitroot(n, inunit->denominator, outunit.denominator))) - return err; - freeunit(inunit); - initializeunit(inunit); -@@ -1482,9 +1484,9 @@ addunit(struct unittype *unita, struct unittype *unitb) - { - int err; - -- if (err=completereduce(unita)) -+ if ((err=completereduce(unita))) - return err; -- if (err=completereduce(unitb)) -+ if ((err=completereduce(unitb))) - return err; - if (compareunits(unita,unitb,ignore_nothing)) - return E_BADSUM; -@@ -1723,7 +1725,7 @@ showanswer(char *havestr,struct unittype *have, - { - struct unittype invhave; - int doingrec; /* reciprocal conversion? */ -- char *sep, *right, *left; -+ char *sep = NULL, *right = NULL, *left = NULL; - - doingrec=0; - havestr = removepadding(havestr); -@@ -1970,7 +1972,8 @@ addtolist(struct unittype *have, char *searchstring, char *rname, char *name, ch - int *count, int searchtype) - { - struct unittype want; -- int len,keepit; -+ int len = 0; -+ int keepit = 0; - - if (!name) - return; -@@ -2243,7 +2246,7 @@ completeunits(char *text, int state) - curunit = utab[uhash]; - } - if (!curunit && !curprefix){ -- if (curprefix = plookup(text)){ -+ if ((curprefix = plookup(text))){ - if (strlen(curprefix->name)>1 && strlen(curprefix->name)file; - unitline = function->linenumber; - } -- else if (unit = ulookup(str)){ -+ else if ((unit = ulookup(str))){ - unitline = unit->linenumber; - file = unit->file; - } -@@ -2678,7 +2681,7 @@ main(int argc, char **argv) - } - - if (!interactive) { -- if (funcval = isfunction(havestr)){ -+ if ((funcval = isfunction(havestr))){ - showfuncdefinition(funcval); - exit(0); - } -@@ -2688,7 +2691,7 @@ main(int argc, char **argv) - showdefinition(havestr,&have); - exit(0); - } -- if (funcval = isfunction(wantstr)){ -+ if ((funcval = isfunction(wantstr))){ - if (showfunc(havestr, &have, funcval)) - exit(1); - else -@@ -2710,7 +2713,7 @@ main(int argc, char **argv) - } while (isblankstr(havestr) || ishelpquery(havestr,0) || - (isfunction(havestr)==0 - && processunit(&have, havestr, queryhave, POINT))); -- if (funcval = isfunction(havestr)){ -+ if ((funcval = isfunction(havestr))){ - showfuncdefinition(funcval); - continue; - } -@@ -2728,7 +2731,7 @@ main(int argc, char **argv) - && processunit(&want, wantstr, querywant, POINT)); - if (isblankstr(wantstr)) - showdefinition(havestr,&have); -- else if (funcval = isfunction(wantstr)) -+ else if ((funcval = isfunction(wantstr))) - showfunc(havestr, &have, funcval); - else { - showanswer(havestr,&have,wantstr, &want); diff --git a/units-1.87-gcc-warnings-2.patch b/units-1.87-gcc-warnings-2.patch deleted file mode 100644 index 1a6f39c..0000000 --- a/units-1.87-gcc-warnings-2.patch +++ /dev/null @@ -1,67 +0,0 @@ -diff --git a/parse.y b/parse.y -index 0bdd8a3..3d2c8c2 100644 ---- a/parse.y -+++ b/parse.y -@@ -247,38 +247,38 @@ double strtod(); - - - struct function -- realfunctions[] = { "sin", sin, ANGLEIN, -- "cos", cos, ANGLEIN, -- "tan", tan, ANGLEIN, -- "ln", log, DIMENSIONLESS, -- "log", log10, DIMENSIONLESS, -- "log2", logb2, DIMENSIONLESS, -- "exp", exp, DIMENSIONLESS, -- "acos", acos, ANGLEOUT, -- "atan", atan, ANGLEOUT, -- "asin", asin, ANGLEOUT, -- 0, 0, 0}; -+ realfunctions[] = { {"sin", sin, ANGLEIN}, -+ {"cos", cos, ANGLEIN}, -+ {"tan", tan, ANGLEIN}, -+ {"ln", log, DIMENSIONLESS}, -+ {"log", log10, DIMENSIONLESS}, -+ {"log2", logb2, DIMENSIONLESS}, -+ {"exp", exp, DIMENSIONLESS}, -+ {"acos", acos, ANGLEOUT}, -+ {"atan", atan, ANGLEOUT}, -+ {"asin", asin, ANGLEOUT}, -+ {0, 0, 0}}; - - struct { - char op; - int value; --} optable[] = { '*', MULTIPLY, -- '/', DIVIDE, -- '|', NUMDIV, -- '+', ADD, -- '(', '(', -- ')', ')', -- '^', EXPONENT, -- '~', FUNCINV, -- 0, 0 }; -+} optable[] = { {'*', MULTIPLY}, -+ {'/', DIVIDE}, -+ {'|', NUMDIV}, -+ {'+', ADD}, -+ {'(', '('}, -+ {')', ')'}, -+ {'^', EXPONENT}, -+ {'~', FUNCINV}, -+ {0, 0}}; - - struct { - char *name; - int value; --} strtable[] = { "sqrt", SQRT, -- "cuberoot", CUBEROOT, -- "per" , DIVIDE, -- 0, 0 }; -+} strtable[] = { {"sqrt", SQRT}, -+ {"cuberoot", CUBEROOT}, -+ {"per" , DIVIDE}, -+ {0, 0}}; - - int yylex(YYSTYPE *lvalp, struct commtype *comm) - { diff --git a/units-1.88.tar.gz.sig b/units-1.88.tar.gz.sig new file mode 100644 index 0000000000000000000000000000000000000000..2a1898bd314669578d52191c50c4f2c91610dfff GIT binary patch literal 72 zcmV-O0Jr~$Mg#y60ssaD0!w-dIRFX?5EzNo@Ze)_NgZ$ipG|Bw(omYc*i+ozuke?c e9du30vjCq)&*1B6hZzQ}0dPrJ+FlgPfpfKeDIG2V literal 0 HcmV?d00001 diff --git a/units.spec b/units.spec index fddfa5c..9576287 100644 --- a/units.spec +++ b/units.spec @@ -1,10 +1,8 @@ Summary: A utility for converting amounts from one unit to another Name: units -Version: 1.87 -Release: 7%{?dist} +Version: 1.88 +Release: 1%{?dist} Source: ftp://ftp.gnu.org/gnu/units/%{name}-%{version}.tar.gz -Patch1: units-1.87-gcc-warnings-1.patch -Patch2: units-1.87-gcc-warnings-2.patch URL: http://www.gnu.org/software/units/units.html License: GPLv3+ Group: Applications/Engineering @@ -23,8 +21,6 @@ well as conversions such as Fahrenheit to Celsius. %prep %setup -q -%patch1 -p1 -%patch2 -p1 %build %configure @@ -59,6 +55,9 @@ fi %{_mandir}/man1/* %changelog +* Tue Feb 23 2010 Kamil Dudka - 1.88-1 +- new upstream release, dropped applied patches + * Tue Dec 01 2009 Kamil Dudka - 1.87-7 - add BuildRequires for bison