[SCM] aribas packaging branch, master, updated. upstream/1.20-37-g2007b9f

Ralf Treinen treinen at free.fr
Sun May 15 11:51:51 UTC 2011


The following commit has been merged in the master branch:
commit 2dbd7826f837f8f9db85c34b233390c690c18309
Author: Ralf Treinen <treinen at debian.org>
Date:   Wed Feb 10 21:24:43 2010 +0100

    Imported Debian patch 1.64-3

diff --git a/debian/aribas.install b/debian/aribas.install
new file mode 100644
index 0000000..ad33c1a
--- /dev/null
+++ b/debian/aribas.install
@@ -0,0 +1,4 @@
+src/aribas		usr/bin
+src/EL/aribas.el	usr/share/emacs/site-lisp/aribas
+src/aribas.hlp 		usr/lib/aribas
+
diff --git a/debian/changelog b/debian/changelog
index bd1457f..e5acd3f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,15 @@
+aribas (1.64-3) unstable; urgency=low
+
+  * debian/rules:
+    - use the standard Makefile on non-i386 architectures.
+    - use dh_install to install files
+    - use dh_installchangelogs to install upstream changelog
+  * Apply upstream's patch to fix warnings about casting from pointer to
+    integer of different size on 64bit architectures:
+    debian/patches/casting_pointers
+  
+ -- Ralf Treinen <treinen at debian.org>  Wed, 10 Feb 2010 21:24:43 +0100
+
 aribas (1.64-2) unstable; urgency=low
 
   * use improved manpage sent in by upstream author (patch manpage-improved, 
diff --git a/debian/patches/casting_pointers b/debian/patches/casting_pointers
new file mode 100644
index 0000000..29a7cf6
--- /dev/null
+++ b/debian/patches/casting_pointers
@@ -0,0 +1,789 @@
+Author: Otto Forster
+Description: fix warnings about cast from pointer to integer of different size
+	     on 64 bit architecture.
+
+Index: aribas-1.64/src/alloc.c
+===================================================================
+--- aribas-1.64.orig/src/alloc.c	2010-02-10 21:17:11.000000000 +0100
++++ aribas-1.64/src/alloc.c	2010-02-10 21:20:13.000000000 +0100
+@@ -41,6 +41,7 @@
+ ** 1997-12-26   small changes in iniconfig
+ ** 1998-01-06   fixed small bug in moveobj
+ ** 2002-04-05   changed some configuration constants
++** 2010-01-30   ArrayStack
+ */
+ 
+ #include "common.h"
+@@ -63,6 +64,7 @@
+ #define BLOCK0SIZE  SMALL_BLOCK0SIZE
+ #define BLOCKSIZE   SMALL_BLOCKSIZE
+ #define RESERVE     6000    /* soviel Bytes sollen freibleiben */
++#define ARRAYSTKSIZE SMALL_BLOCKSIZE
+ #define WORKSTKSIZE 6000    /* size of evaluation+work stack (word4's) */
+ #define ARGSTKSIZE  7000    /* size of argument+save stack (word4's) */
+ 
+@@ -72,12 +74,13 @@
+ #include <assert.h>
+ 
+ #define HASHTABSIZE     1009    /* size of hash table (prime) */
+-#define BLOCKMAX         192    /* must be < 255 */
++#define BLOCKMAX         200    /* must be < 255 */
+ #define BLOCK0SIZE     BIG_BLOCK0SIZE
+ #define BLOCKSIZE      BIG_BLOCKSIZE
+-#define RESERVE        16000
+-#define WORKSTKSIZE    BIG_BLOCKSIZE
+-#define ARGSTKSIZE     16000
++#define RESERVE        BIG_BLOCK0SIZE
++#define WORKSTKSIZE    BIG_BLOCK0SIZE
++#define ARRAYSTKSIZE   BIG_BLOCKSIZE
++#define ARGSTKSIZE     BIG_BLOCK0SIZE
+ 
+ #ifdef MEM
+ #if (MEM >= 1) && (MEM <= 32)
+@@ -121,7 +124,8 @@
+ PUBLIC trucptr *Symtab;     /* symbol table */
+ PUBLIC size_t hashtabSize;
+ PUBLIC truc *WorkStack;     /* evaluation stack (also work stack) */
+-PUBLIC truc *evalStkPtr, *workStkPtr;
++PUBLIC truc *ArrayStack, *ArrayStkCeil;
++PUBLIC truc *evalStkPtr, *workStkPtr, *arrayStkPtr;
+ PUBLIC truc *ArgStack;      /* argument stack (also save stack) */
+ PUBLIC truc *argStkPtr, *saveStkPtr;
+ PUBLIC truc *basePtr;
+@@ -161,7 +165,7 @@
+ 
+ PRIVATE size_t symBot, userBot;
+ PRIVATE size_t memBot, memCeil;
+-PRIVATE size_t argstkSize, workstkSize, blockSize, block0Size;
++PRIVATE size_t argstkSize, workstkSize, arrstkSize, blockSize, block0Size;
+ PRIVATE int curblock, noofblocks, auxindex0, maxblocks;
+ PRIVATE blkdesc blockinfo[BLOCKMAX+1];
+ 
+@@ -185,6 +189,7 @@
+ PRIVATE void endgc  _((void));
+ PRIVATE void mvsymtab   _((void));
+ PRIVATE void mvargstk   _((void));
++PRIVATE void mvarrstk   _((void));
+ PRIVATE void mvevalstk  _((void));
+ PRIVATE void moveobj    _((truc *x));
+ PRIVATE int toupdate    _((truc *x));
+@@ -215,6 +220,7 @@
+ #endif
+     argstkSize = ARGSTKSIZE;
+     workstkSize = WORKSTKSIZE;
++    arrstkSize = ARRAYSTKSIZE;
+     hashtabSize = HASHTABSIZE;
+     aribufSize = ARIBUFSIZE;
+     blockSize = BLOCKSIZE;
+@@ -303,6 +309,13 @@
+     }
+     if(ptr) {
+         WorkStack = (truc *)ptr;
++        size = sizeof(truc) * arrstkSize;
++        memallsize += size;
++        ptr = malloc(size);
++    }
++    if(ptr) {
++        ArrayStack = (truc *)ptr;
++        ArrayStkCeil = ArrayStack + arrstkSize;
+         size = sizeof(word2)*(aribufSize + PRIMTABSIZE + 16);
+         memallsize += size;
+         ptr = malloc(size);
+@@ -384,6 +397,7 @@
+     free(Symbol);
+     free(AriBuf);
+     free(WorkStack);
++    free(ArrayStack);
+     free(ArgStack);
+     free(Symtab);
+ }
+@@ -392,6 +406,7 @@
+ {
+     workStkPtr = WorkStack - 1;
+     evalStkPtr = WorkStack + workstkSize;
++    arrayStkPtr= ArrayStack - 1;
+     argStkPtr  = ArgStack - 1;
+     saveStkPtr = ArgStack + argstkSize;
+     basePtr    = ArgStack;
+@@ -603,8 +618,8 @@
+         else {
+             nact += c - b;
+             if(flg < FULL) {
+-            b = (i == curblock ? memBot : blockinfo[i].curbot);
+-            nfree += c - b;
++                b = (i == curblock ? memBot : blockinfo[i].curbot);
++                nfree += c - b;
+             }
+         }
+     }
+@@ -623,18 +638,20 @@
+ 
+     diff = s[1] - s[2];
+     n = s2form(OutBuf,"~8D Bytes reserved; ~D Bytes active ",
+-        (wtruc)s[0],(wtruc)s[1]);
+-    s2form(OutBuf+n,"(~D used, ~D free)",(wtruc)diff,(wtruc)s[2]);
++        intcast(s[0]),intcast(s[1]));
++    s2form(OutBuf+n,"(~D used, ~D free)",intcast(diff),intcast(s[2]));
+     fprintline(tstdout,OutBuf);
+     s1form(OutBuf,
+-      "~8D Bytes free for user defined symbols and symbol names", (wtruc)s[3]);
++      "~8D Bytes free for user defined symbols and symbol names", 
++      intcast(s[3]));
+     fprintline(tstdout,OutBuf);
+ }
+ /*---------------------------------------------------------*/
+ PRIVATE void gcstatistics()
+ {
+     fnewline(tstdout);
+-    s1form(OutBuf,"total number of garbage collections: ~D", (wtruc)gccount);
++    s1form(OutBuf,"total number of garbage collections: ~D", 
++      intcast(gccount));
+     fprintline(tstdout,OutBuf);
+ }
+ /*---------------------------------------------------------*/
+@@ -792,6 +809,7 @@
+     if(mode > 0) {
+         mvargstk();
+         mvevalstk();
++        mvarrstk();
+     }
+     endgc();
+ 
+@@ -859,6 +877,15 @@
+         moveobj(ptr);
+ }
+ /*------------------------------------------------------------*/
++PRIVATE void mvarrstk()
++{
++    truc *ptr;
++
++    ptr = ArrayStack - 1;
++    while(++ptr <= arrayStkPtr)
++        moveobj(ptr);
++}
++/*------------------------------------------------------------*/
+ PRIVATE void mvevalstk()
+ {
+     truc *ptr;
+Index: aribas-1.64/src/arity.c
+===================================================================
+--- aribas-1.64.orig/src/arity.c	2010-02-10 21:17:11.000000000 +0100
++++ aribas-1.64/src/arity.c	2010-02-10 21:20:16.000000000 +0100
+@@ -2,7 +2,7 @@
+ /* file arity.c
+ 
+ ARIBAS interpreter for Arithmetic
+-Copyright (C) 1996-2007 O.Forster
++Copyright (C) 1996-2010 O.Forster
+ 
+ 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
+@@ -490,7 +490,7 @@
+ {
+     char messbuf[80];
+ 
+-    s1form(messbuf,"~D",(wtruc)v);
++    s1form(messbuf,"~D",intcast(v));
+     fprintstr(tstdout,messbuf);
+     fflush(stdout);
+ }
+@@ -517,7 +517,7 @@
+             w = bmp->rank;
+             w *= 100;
+             w /= bmp->baslen;
+-            s2form(messbuf,"[~D/~D%]",(wtruc)z,(wtruc)w);
++            s2form(messbuf,"[~D/~D%]",intcast(z),intcast(w));
+             fprintstr(tstdout,messbuf);
+             fflush(stdout);
+         }
+@@ -529,7 +529,7 @@
+ {
+     char messbuf[80];
+ 
+-    s1form(messbuf,"~%factor found after ~D iterations",(wtruc)anz);
++    s1form(messbuf,"~%factor found after ~D iterations",intcast(anz));
+     fprintline(tstdout,messbuf);
+     fnewline(tstdout);
+ }
+@@ -540,7 +540,7 @@
+     char messbuf[80];
+ 
+     s2form(messbuf,"~%CF-algorithm: factorbase 2 ... ~D of length ~D",
+-        (wtruc)p,(wtruc)blen);
++        intcast(p),intcast(blen));
+     fprintline(tstdout,messbuf);
+     fprintstr(tstdout,"working ");
+ }
+@@ -553,7 +553,7 @@
+ 
+     s2form(messbuf,
+         "~%~D quadratic residues calculated, ~D completely factorized",
+-        (wtruc)n,(wtruc)nf);
++        intcast(n),intcast(nf));
+     fprintline(tstdout,messbuf);
+     fnewline(tstdout);
+ }
+@@ -563,10 +563,10 @@
+ {
+     char messbuf[80];
+ 
+-    s1form(messbuf,"~%quadratic sieve length = ~D, ",(wtruc)(2*srange));
++    s1form(messbuf,"~%quadratic sieve length = ~D, ",intcast(2*srange));
+     fprintstr(tstdout,messbuf);
+     s2form(messbuf,"factorbase 2 ... ~D of length ~D",
+-        (wtruc)p,(wtruc)blen);
++        intcast(p),intcast(blen));
+     fprintline(tstdout,messbuf);
+     fprintstr(tstdout,"working ");
+ }
+@@ -579,7 +579,7 @@
+ 
+     s2form(messbuf,
+         "~%~D polynomials, ~D completely factorized quadratic residues",
+-        (wtruc)n,(wtruc)nf);
++        intcast(n),intcast(nf));
+     fprintline(tstdout,messbuf);
+     fnewline(tstdout);
+ }
+@@ -592,11 +592,11 @@
+ {
+     char messbuf[80];
+ 
+-    s2form(messbuf,"~%~D polynomials, ~D + ",(wtruc)n,(wtruc)(nf-nf2));
++    s2form(messbuf,"~%~D polynomials, ~D + ",intcast(n),intcast(nf-nf2));
+     fprintstr(tstdout,messbuf);
+ 
+     s2form(messbuf,"~D = ~D factorized quadratic residues",
+-        (wtruc)nf2,(wtruc)nf);
++        intcast(nf2),intcast(nf));
+     fprintline(tstdout,messbuf);
+     fnewline(tstdout);
+ }
+@@ -609,7 +609,7 @@
+     char messbuf[80];
+ 
+     s1form(messbuf,"~%EC factorization with prime bound ~D ~%working ",
+-        (wtruc)bound);
++        intcast(bound));
+     fprintstr(tstdout,messbuf);
+ }
+ /*------------------------------------------------------------------*/
+@@ -620,7 +620,7 @@
+ 
+     s2form(messbuf,
+     "~%EC factorization, prime bound ~D, bigprime bound ~D~%working ",
+-        (wtruc)bound1, (wtruc)bound2);
++        intcast(bound1), intcast(bound2));
+     fprintstr(tstdout,messbuf);
+ }
+ /*------------------------------------------------------------------*/
+@@ -631,7 +631,7 @@
+ 
+     s2form(messbuf,
+         "~%factor found with curve parameter ~D and prime bound ~D~%",
+-        (wtruc)u,(wtruc)bound1);
++        intcast(u),intcast(bound1));
+     fprintline(tstdout,messbuf);
+ }
+ /*------------------------------------------------------------------*/
+@@ -642,7 +642,7 @@
+ 
+     s2form(messbuf,
+         "~%factor found with curve parameter ~D and bigprime ~D~%",
+-        (wtruc)u,(wtruc)bound2);
++        intcast(u),intcast(bound2));
+     fprintline(tstdout,messbuf);
+ }
+ /*------------------------------------------------------------------*/
+@@ -1324,20 +1324,6 @@
+     return(0);
+ }
+ /*-------------------------------------------------------------------*/
+-#ifdef DBGFILE
+-int showvect(vect,len)
+-word2 *vect;
+-int len;
+-{
+-    int i;
+-    fprintf(dbgf,"0x");
+-    for(i=len-1; i>=0; i--)
+-        fprintf(dbgf,"%04X",vect[i]);
+-    fprintf(dbgf,"\n");
+-    return len;
+-}
+-#endif
+-/*-------------------------------------------------------------------*/
+ /*
+ ** Rueckgabe = 0, falls letzte Zeile unabhaengig; sonst = 1
+ */
+Index: aribas-1.64/src/aritz.c
+===================================================================
+--- aribas-1.64.orig/src/aritz.c	2010-02-10 21:17:11.000000000 +0100
++++ aribas-1.64/src/aritz.c	2010-02-10 21:20:17.000000000 +0100
+@@ -2,7 +2,7 @@
+ /* file aritz.c
+ 
+ ARIBAS interpreter for Arithmetic
+-Copyright (C) 1996-2007 O.Forster
++Copyright (C) 1996-2010 O.Forster
+ 
+ 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
+Index: aribas-1.64/src/common.h
+===================================================================
+--- aribas-1.64.orig/src/common.h	2010-02-10 21:17:11.000000000 +0100
++++ aribas-1.64/src/common.h	2010-02-10 21:20:18.000000000 +0100
+@@ -50,6 +50,7 @@
+ ** 2001-03-30   Win32GUI, genWinGUI
+ ** 2002-03-27   WORKnpush, VECSTRUCTPTR
+ ** 2002-10-01   deleted some superfluous #define's
++** 2010-02-06   SAVEPTRpush, etc.
+ */
+ 
+ #include <stdio.h>
+@@ -189,7 +190,7 @@
+ #define FPREC_HIGH
+ #endif
+ 
+-#define VERSION_STRING "V 1.64, Jan. 2010"
++#define VERSION_STRING "V 1.64a, Feb. 2010"
+ #define VERSION_YEAR "2010"
+ #define VERSION_NO 164
+ 
+@@ -802,6 +803,8 @@
+     if(!((workStkPtr += (n)) < evalStkPtr)) reset(err_wrkstk)
+ #define WORKspace(n) \
+     (workStkPtr < evalStkPtr-(n)-32 ? workStkPtr += (n) : NULL)
++#define ARRAYspace(n) \
++    (arrayStkPtr < ArrayStkCeil-(n)-32 ? arrayStkPtr += (n) : NULL)
+ 
+ #define ARGpush(obj) \
+     if(++argStkPtr < saveStkPtr) *argStkPtr = (obj); \
+@@ -810,13 +813,11 @@
+ #define ARGpop()    argStkPtr--
+ #define ARGnpop(n)  argStkPtr -= (n)
+ 
+-#define SAVEpush(obj) \
+-    if(--saveStkPtr > argStkPtr) *saveStkPtr = (truc)(obj); \
++#define SAVEPTRpush(ptr) \
++    if(--saveStkPtr > argStkPtr) *saveStkPtr = (truc)(ptr - ArgStack); \
+     else reset(err_savstk)
+-#define SAVEretr()  (trucptr)(*saveStkPtr++)
+-#define SAVEpop()   saveStkPtr++
+-#define SAVEtop()   (trucptr)(*saveStkPtr)
+-#define SAVEnpop(n) saveStkPtr += (n)
++#define SAVEPTRretr()  (ArgStack + *saveStkPtr++)
++#define SAVEPTRtop()   (ArgStack + *saveStkPtr)
+ #define SAVEspace(n) \
+     (saveStkPtr > argStkPtr+(n) ? saveStkPtr -= (n) : NULL)
+ 
+@@ -882,7 +883,8 @@
+ extern truc *Symbol;
+ extern truc *Memory[];
+ extern trucptr *Symtab;
+-extern truc *WorkStack, *evalStkPtr, *workStkPtr;
++extern truc *ArrayStack, *ArrayStkCeil, *arrayStkPtr;
++extern truc *WorkStack, *evalStkPtr, *workStkPtr; 
+ extern truc *ArgStack, *argStkPtr, *saveStkPtr;
+ extern truc *basePtr;
+ extern word2 *AriBuf, *AriScratch, *AuxBuf, *PrimTab;
+@@ -1230,6 +1232,8 @@
+ extern void fnewline    _((truc strom));
+ extern void ffreshline  _((truc strom));
+ extern void flinepos0   _((truc strom));
++extern wtruc strcast    _((char *str));
++extern wtruc intcast    _((long x));
+ extern int s1form   _((char *buf, char *fmt, wtruc dat));
+ extern int s2form   _((char *buf, char *fmt, wtruc dat1, wtruc dat2));
+ 
+Index: aribas-1.64/src/control.c
+===================================================================
+--- aribas-1.64.orig/src/control.c	2010-02-10 21:17:11.000000000 +0100
++++ aribas-1.64/src/control.c	2010-02-10 21:20:18.000000000 +0100
+@@ -879,7 +879,7 @@
+     }
+     n0 = bigref(argStkPtr,&x,&sign);    /* start */
+     m = (n0 < inclen ? inclen : n0) + 3;
+-    slen = (m + inclen)/2 + 2;  /* unit of SaveStack is word4 */
++    slen = (m + inclen)/2 + 2;  /* unit of SaveStack is word4???? */
+     lauf = (word2 *)SAVEspace(slen);
+     if(lauf) {
+         cpyarr(x,n0,lauf);
+@@ -1037,13 +1037,13 @@
+     x = tim[0] + 1900;
+     y = tim[1] + 1;
+     str = OutBuf;
+-    str += s2form(str,"~04D:~02D:", (wtruc)x,(wtruc)y);
++    str += s2form(str,"~04D:~02D:", intcast(x),intcast(y));
+     x = tim[2];
+     y = tim[3];
+-    str += s2form(str,"~02D:~02D:",(wtruc)x,(wtruc)y);
++    str += s2form(str,"~02D:~02D:",intcast(x),intcast(y));
+     x = tim[4];
+     y = tim[5];
+-    s2form(str,"~02D:~02D",(wtruc)x,(wtruc)y);
++    s2form(str,"~02D:~02D",intcast(x),intcast(y));
+ 
+     return mkstr(OutBuf);
+ }
+Index: aribas-1.64/src/eval.c
+===================================================================
+--- aribas-1.64.orig/src/eval.c	2010-02-10 21:17:11.000000000 +0100
++++ aribas-1.64/src/eval.c	2010-02-10 21:20:20.000000000 +0100
+@@ -205,13 +205,13 @@
+         }
+         else
+             chk = 0;
+-        SAVEpush(argStkPtr);
++        SAVEPTRpush(argStkPtr);
+ 
+         k = *VARCPTR(ptr);
+         if(chk) {   /* provide default optional arguments */
+             ptr1 = VECTORPTR(PARMSPTR(ptr));
+             argvarspace(ptr1,n,VARSPTR(ptr),k);
+-            ptr1 = SAVEtop() + 1;
++            ptr1 = SAVEPTRtop() + 1;
+             ptr2 = ARG1PTR(evalStkPtr);
+             while(--i >= 0)
+             *ptr1++ = *ptr2++;
+@@ -223,14 +223,14 @@
+ 
+         if(flg == sVFUNCTION) {
+             parms = *PARMSPTR(ptr);
+-            ptr = SAVEtop() + 1;
++            ptr = SAVEPTRtop() + 1;
+             n = evalvargs(parms,ptr,n);
+         }
+         else {
+-            ptr = SAVEtop() + 1;
++            ptr = SAVEPTRtop() + 1;
+             n = evalargs(ptr,n);
+         }
+-        SAVEpush(basePtr);
++        SAVEPTRpush(basePtr);
+         basePtr = ptr;
+         if(n == aERROR || lvarsini(ptr+n,k) == aERROR)
+             obj = brkerr();
+@@ -248,8 +248,8 @@
+                 }
+             }
+         }
+-        basePtr = SAVEretr();
+-        argStkPtr = SAVEretr();
++        basePtr = SAVEPTRretr();
++        argStkPtr = SAVEPTRretr();
+         break;
+     case fWHILEXPR:
+         obj = Swhile();
+@@ -292,11 +292,11 @@
+     }
+     goto cleanup;
+   fnbineval:
+-    SAVEpush(argStkPtr);
++    SAVEPTRpush(argStkPtr);
+     ptr = TAddress(evalStkPtr);
+     k = stkevargs(ptr+1);
+     obj = (k == aERROR ? brkerr() : ((funptr1)binfun)(k));
+-    argStkPtr = SAVEretr();
++    argStkPtr = SAVEPTRretr();
+   cleanup:
+     EVALpop();
+     return(obj);
+@@ -318,16 +318,17 @@
+     int k;
+ 
+     fundefptr = TAddress(fun);
+-    SAVEpush(argStkPtr);
+-    SAVEpush(basePtr);
++    SAVEPTRpush(argStkPtr);
++    SAVEPTRpush(basePtr);
+     basePtr = argStkPtr + 1;
+ 
+     k = *VARCPTR(fundefptr);
+     argvarspace(arr,n,VARSPTR(fundefptr),k);
+     EVALpush(*(fundefptr + OFFS4body));
+ 
+-    if(lvarsini(basePtr+n,k) == aERROR)
++    if(lvarsini(basePtr+n,k) == aERROR) {
+         obj = brkerr();
++    }
+     else {  /* eval body, which is a compound statement */
+         obj = zero;
+         k = *FUNARGCPTR(evalStkPtr);
+@@ -343,8 +344,8 @@
+         }
+     }
+     EVALpop();
+-    basePtr = SAVEretr();
+-    argStkPtr = SAVEretr();
++    basePtr = SAVEPTRretr();
++    argStkPtr = SAVEPTRretr();
+     return(obj);
+ }
+ /*------------------------------------------------------------*/
+Index: aribas-1.64/src/file.c
+===================================================================
+--- aribas-1.64.orig/src/file.c	2010-02-10 21:17:11.000000000 +0100
++++ aribas-1.64/src/file.c	2010-02-10 21:20:21.000000000 +0100
+@@ -176,7 +176,7 @@
+     findarifile(argv[0],name);
+ 
+     if(verbose) {
+-        s1form(OutBuf,"(** loading file ~A **)",(wtruc)name);
++        s1form(OutBuf,"(** loading file ~A **)",strcast(name));
+         fprintline(tstdout,OutBuf);
+     }
+ 
+Index: aribas-1.64/src/LINUX/Makefile.linux
+===================================================================
+--- aribas-1.64.orig/src/LINUX/Makefile.linux	2010-02-10 21:17:30.000000000 +0100
++++ aribas-1.64/src/LINUX/Makefile.linux	2010-02-10 21:19:22.000000000 +0100
+@@ -13,8 +13,8 @@
+ 
+ ASSFLAGS = -v
+ 
+-MEMFLAG1 = -DMEM=16
+-# MEM may be set to any integer value from 1 to 32.
++MEMFLAG1 = -DMEM=8
++# MEM may be set to any integer value from 1 to 16.
+ # This is the size of the ARIBAS heap in Megabytes
+ # The value should not exceed one half of the RAM of your machine
+ # If MEMFLAG is not defined, MEM=2 will be used by default
+@@ -48,7 +48,7 @@
+ 
+ $(PROGRAM): $(OBJECTS) $(ASSOBJECTS)
+ 	$(CC) -o $(PROGRAM) $(LFLAGS) $(OBJECTS) $(ASSOBJECTS)
+-
++	strip $(PROGRAM)
+ clean:
+ 	\rm *.o
+ 
+Index: aribas-1.64/src/LINUX/README
+===================================================================
+--- aribas-1.64.orig/src/LINUX/README	2010-02-10 21:17:30.000000000 +0100
++++ aribas-1.64/src/LINUX/README	2010-02-10 21:19:23.000000000 +0100
+@@ -1,12 +1,12 @@
+ ######################################################################
+-# README file for the directory aribas-1.64/src/LINUX
++# README file for the directory aribas-1.63/src/LINUX
+ # Author: O.Forster 
+ #   Email: forster at mathematik.uni-muenchen.de
+ #   Web:   http://www.mathematik.uni-muenchen.de/~forster
+-# Date: 2010-01-25
++# Date: 2008-02-22
+ ######################################################################
+ 
+-COMPILATION of ARIBAS (V. 1.64, January 2010)
++COMPILATION of ARIBAS (V. 1.63, February 2008)
+ 
+ To compile ARIBAS for LINUX on a 80386 (or higher) computer, the 
+ following 26 files are necessary.
+Index: aribas-1.64/src/mainloop.c
+===================================================================
+--- aribas-1.64.orig/src/mainloop.c	2010-02-10 21:17:11.000000000 +0100
++++ aribas-1.64/src/mainloop.c	2010-02-10 21:20:22.000000000 +0100
+@@ -2,7 +2,7 @@
+ /* file mainloop.c
+ 
+ ARIBAS interpreter for Arithmetic
+-Copyright (C) 1996-2010 O.Forster
++Copyright (C) 1996-2008 O.Forster
+ 
+ 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
+@@ -571,10 +571,10 @@
+ PRIVATE void title()
+ {
+     s2form(OutBuf,"~%ARIBAS Interpreter for Arithmetic, ~A (~A)",
+-        (wtruc)Version,(wtruc)architec);
++        strcast(Version),strcast(architec));
+     fprintline(tstdout,OutBuf);
+     s2form(OutBuf,"Copyright (C) 1996-~A O.Forster <~A>",
+-        (wtruc)versionyear,(wtruc)Email);
++        strcast(versionyear),strcast(Email));
+     fprintline(tstdout,OutBuf);
+     displaypage(gpltxt);
+     fnewline(tstdout);
+@@ -593,12 +593,12 @@
+     ret = findarifile(fil,name);
+     if(verb) {
+         fnewline(tstdout);
+-        s1form(OutBuf,"(** loading ~A **)",(wtruc)name);
++        s1form(OutBuf,"(** loading ~A **)",strcast(name));
+         fprintline(tstdout,OutBuf);
+     }
+     ret = loadaux(name,verb,NULL);
+     if(ret == aERROR) {
+-        s1form(OutBuf,"error while loading file ~A",(wtruc)name);
++        s1form(OutBuf,"error while loading file ~A",strcast(name));
+         fprintline(tstderr,OutBuf);
+     }
+     return(ret);
+@@ -660,7 +660,7 @@
+ {
+     if(argn == 0 || *argStkPtr != zero) {
+         s2form(OutBuf,"ARIBAS Version ~A (~A)",
+-            (wtruc)Version,(wtruc)architec);
++            strcast(Version),strcast(architec));
+         fprintline(tstdout,OutBuf);
+     }
+     return(mkfixnum(version_no));
+@@ -955,7 +955,7 @@
+         }
+     }
+     else {
+-        s1form(OutBuf,"no help available for ~A",(wtruc)topic);
++        s1form(OutBuf,"no help available for ~A",strcast(topic));
+         fprintline(tstdout,OutBuf);
+     }
+     fclose(hfile);
+Index: aribas-1.64/src/Makefile
+===================================================================
+--- aribas-1.64.orig/src/Makefile	2010-02-10 21:17:11.000000000 +0100
++++ aribas-1.64/src/Makefile	2010-02-10 21:20:23.000000000 +0100
+@@ -14,7 +14,7 @@
+ CC = gcc
+ CFLAGS = -DUNiX -DPROTO -O -v
+ 
+-MEMFLAG1 = -DMEM=16
++MEMFLAG1 = -DMEM=12
+ # MEM may be set to any integer value from 1 to 32.
+ # This is the size of the ARIBAS heap in Megabytes
+ # The value should not exceed one half of the RAM of your machine
+@@ -44,7 +44,7 @@
+ 
+ $(PROGRAM): $(OBJECTS)
+ 	$(CC) -o $(PROGRAM) $(OBJECTS)
+-
++	strip $(PROGRAM)
+ clean:
+ 	\rm *.o
+ 
+Index: aribas-1.64/src/print.c
+===================================================================
+--- aribas-1.64.orig/src/print.c	2010-02-10 21:17:11.000000000 +0100
++++ aribas-1.64/src/print.c	2010-02-10 21:20:25.000000000 +0100
+@@ -54,6 +54,7 @@
+ ** 2002-08-03: baseprefix changed,
+ **      changed argument type of s1form, s2form, sformaux
+ ** 2003-02-21: Gformat also for gf2nint's
++** 2010-02-06: s1form, s2form
+ */
+ 
+ #include "common.h"
+@@ -75,6 +76,8 @@
+ PUBLIC void fnewline    _((truc strom));
+ PUBLIC void ffreshline  _((truc strom));
+ PUBLIC void flinepos0   _((truc strom));
++PUBLIC wtruc strcast    _((char *str));
++PUBLIC wtruc intcast    _((long int));
+ PUBLIC int s1form   _((char *buf, char *fmt, wtruc dat));
+ PUBLIC int s2form   _((char *buf, char *fmt, wtruc dat1, wtruc dat2));
+ PUBLIC int setprnprec _((int prec));
+@@ -1107,7 +1110,7 @@
+         fprintmarg(strom,OutBuf,strlen(OutBuf));
+     }
+     if(eflg) {
+-        k = s1form(OutBuf,"e~D",(wtruc)expo);
++        k = s1form(OutBuf,"e~D",intcast(expo));
+         fprintmarg(strom,OutBuf,k);
+     }
+ }
+@@ -1419,7 +1422,7 @@
+             expo = acc.expo + prec - 1;
+             acc.expo = -prec + 1;
+             n = fixstring(&acc,prec-1,buf);
+-            n += s1form(buf+n,"e~D",(wtruc)expo);
++            n += s1form(buf+n,"e~D",intcast(expo));
+         }
+     }
+     else {
+@@ -1483,10 +1486,10 @@
+     ch = v.pp.ww;
+     if(quotemode) {
+         if(ch < ' ' || ch == 127) {
+-            len = s1form(buf,"chr(~D)",(wtruc)ch);
++            len = s1form(buf,"chr(~D)",intcast(ch));
+         }
+         else {
+-            len = s1form(buf,"'~C'",(wtruc)ch);
++            len = s1form(buf,"'~C'",intcast(ch));
+         }
+         return(len);
+     }
+@@ -1535,7 +1538,7 @@
+     obj = PTRtarget(obj);
+     if(obj == nil)
+         return(strcopy(buf,SYMname(nil)));
+-    return(s1form(buf,"<PTR^~X>",(wtruc)truc2msf(obj)));
++    return(s1form(buf,"<PTR^~X>",intcast(truc2msf(obj))));
+ }
+ /*--------------------------------------------------------------*/
+ PRIVATE int obj2str(flg,obj,buf)
+@@ -1565,7 +1568,7 @@
+         else
+             str = "OBJECT";
+     }
+-    return(s2form(buf,"<~A:~X>",(wtruc)str,(wtruc)u));
++    return(s2form(buf,"<~A:~X>",strcast(str),intcast(u)));
+ }
+ /*--------------------------------------------------------------*/
+ PRIVATE int leftpad(buf,width,ch)
+@@ -1761,12 +1764,24 @@
+     return(big2xstr(x,n,buf));
+ }
+ /*--------------------------------------------------------------*/
++PUBLIC wtruc strcast(str)
++char *str;
++{
++    return (wtruc)str;
++}
++/*--------------------------------------------------------------*/
++PUBLIC wtruc intcast(x)
++long x;
++{
++    return (wtruc)x;
++}
++/*--------------------------------------------------------------*/
+ PUBLIC int s1form(buf,fmt,dat)
+ char *buf;
+ char *fmt;
+ wtruc dat;
+ {
+-    return(s2form(buf,fmt,dat,(wtruc)0));
++    return(s2form(buf,fmt,dat,dat));
+ }
+ /*--------------------------------------------------------------*/
+ PUBLIC int s2form(buf,fmt,dat1,dat2)
+Index: aribas-1.64/src/scanner.c
+===================================================================
+--- aribas-1.64.orig/src/scanner.c	2010-02-10 21:17:12.000000000 +0100
++++ aribas-1.64/src/scanner.c	2010-02-10 21:20:26.000000000 +0100
+@@ -1460,11 +1460,11 @@
+         strcopy(OutBuf,"error in function readln");
+     else {
+         if(inpsource == TERMINALINP)
+-            src = (wtruc)st;
++            src = strcast(st);
+         else    /* FILEINPUT */
+-            src = (wtruc)sf;
++            src = strcast(sf);
+         s2form(OutBuf,
+-        "error in line <= ~D of ~A",(wtruc)(cStream->lineno),src);
++        "error in line <= ~D of ~A",intcast(cStream->lineno),src);
+     }
+     fprintline(tstderr,OutBuf);
+     return(error(sym1,mess,sym2));
+Index: aribas-1.64/src/terminal.c
+===================================================================
+--- aribas-1.64.orig/src/terminal.c	2010-02-10 21:17:12.000000000 +0100
++++ aribas-1.64/src/terminal.c	2010-02-10 21:20:28.000000000 +0100
+@@ -204,7 +204,7 @@
+ #ifdef GETKEY
+     getkeysym = newsymsig("get_key",   sFBINARY,(wtruc)Fgetkey, s_0);
+ #endif
+-    s1form(text,"more than ~D lines",(wtruc)BUFLINES);
++    s1form(text,"more than ~D lines",intcast(BUFLINES));
+     bufovflsym = newselfsym(text,sINTERNAL);
+ }
+ /*------------------------------------------------------------*/
diff --git a/debian/patches/manpage-improved b/debian/patches/manpage-improved
index 5b5930e..d5d239e 100644
--- a/debian/patches/manpage-improved
+++ b/debian/patches/manpage-improved
@@ -1,5 +1,6 @@
-Index: aribas-1.64/doc/aribas.1
-===================================================================
+Author: Otto Forster
+Description: Some improvements of manpage
+
 --- aribas-1.64.orig/doc/aribas.1	2010-02-03 20:48:16.000000000 +0100
 +++ aribas-1.64/doc/aribas.1	2010-02-02 09:22:00.000000000 +0100
 @@ -2,7 +2,7 @@
diff --git a/debian/patches/no_strip b/debian/patches/no_strip
old mode 100755
new mode 100644
diff --git a/debian/patches/series b/debian/patches/series
index ad961d8..2d7c08e 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
 manpage-improved
 no_strip
+casting_pointers
diff --git a/debian/rules b/debian/rules
index 38e2cfe..0838975 100755
--- a/debian/rules
+++ b/debian/rules
@@ -15,13 +15,15 @@ build-stamp:
 	if [ "$(DEB_BUILD_ARCH)" = "i386" ];\
 	then \
 		cp src/LINUX/arito386.S src;\
+		MAKEFILE=LINUX/Makefile.linux;\
 		ASSOBJECTS="arito386.S";\
 		EXTRAFLAGS="-DLiNUX -DPROTO";\
 	else \
+		MAKEFILE=Makefile;\
 		ASSOBJECTS="";\
 		EXTRAFLAGS="-DUNiX -DPROTO";\
 	fi;\
-	cd src && make -f LINUX/Makefile.linux\
+	cd src && make -f $$MAKEFILE\
 			CC=gcc\
 			CFLAGS="$(OPTFLAGS) $$EXTRAFLAGS"\
 			ASSOBJECTS="$$ASSOBJECTS"
@@ -39,10 +41,7 @@ install: build
 	dh_testroot
 	dh_prep
 	dh_installdirs
-	install -m 755 src/aribas debian/aribas/usr/bin
-	cp src/EL/aribas.el debian/aribas/usr/share/emacs/site-lisp/aribas
-	cp src/aribas.hlp debian/aribas/usr/lib/aribas
-	cp CHANGES*.txt debian/aribas/usr/share/doc/aribas/changelog
+	dh_install
 
 binary-indep: build install
 
@@ -53,7 +52,7 @@ binary-arch: build install
 	dh_installexamples examples/*
 	dh_installemacsen
 	dh_installman doc/aribas.1
-	dh_installchangelogs
+	dh_installchangelogs CHANGES*.txt
 	dh_strip
 	dh_compress
 	dh_fixperms

-- 
aribas packaging



More information about the debian-science-commits mailing list