[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Texmacs-dev] [patch] Update for new Axiom prompt
From: |
David MENTRE |
Subject: |
[Texmacs-dev] [patch] Update for new Axiom prompt |
Date: |
Sat, 27 Sep 2003 01:29:10 +0200 |
User-agent: |
Gnus/5.1002 (Gnus v5.10.2) Emacs/21.2 (gnu/linux) |
Hello,
Here is a patch that allow to use TeXmacs with latest (and future)
release of Axiom. The issue is that the old proprietary Axiom from NAG
was using a double prompt at startup. The new free Axiom not. This patch
fixes the issue (plus some compilation warning fixes).
This patch was taken against TeXmacs 1.0.1. From changelog, nothing has
changed for Axiom interface between 1.0.1 and 1.0.2 versions.
BTW, in the Texte>Session french menu of TeXmacs, Axiom session is
written "Axiome" and not "Axiom". Juding from occurences of "axiome" in
TeXmacs sources, it seems that automatic translation is a bit to speedy
on the Session menu. :)
Yet another point: would it be possible to add a link to Axiom on the
"Mathematics" link (http://texmacs.org/Web/Links3.html) on TeXmacs web
site?
Axiom http://www.nongnu.org/axiom/
Thanks a lot.
--- tm_axiom.c.orig Sat Sep 27 01:06:27 2003
+++ tm_axiom.c Sat Sep 27 01:06:40 2003
@@ -9,7 +9,7 @@
#define TYPE 5
#define LEN 128
-/*#define LOG "/home/grozin/tmax/log"*/
+/* #define LOG "/tmp/tm_axiom.log" */
char buf[LEN];
int len,code,writing=1,wait_type=0;
@@ -78,7 +78,7 @@
{ for (k=0;k<j;) buf[i++]=prompt[k++];
j=0;
if (i>LEN-4) { code=LONG; break; }
- else if (c==EOF) { code==END; break; }
+ else if (c==EOF) { code=END; break; }
else if (c=='\n') { buf[i++]='\n'; code=NORMAL; break; }
else buf[i++]=c;
}
@@ -177,7 +177,7 @@
}
void session(void)
-{ int c,i,mmode,delims=0,prompts=0;
+{ int c,mmode,delims=0;
#ifdef LOG
log=fopen(LOG,"w");
#endif
@@ -188,7 +188,7 @@
while (1)
{ iline();
if (code==TYPE) { if ((++delims)==2) writing=0; }
- else if (code==PROMPT) { if ((++prompts)==2) break; }
+ else if (code==PROMPT) break;
}
/* force-feeding */
fputs(")set messages prompt plain\n",axin); fflush(axin);
@@ -258,4 +258,5 @@
axin=fdopen(p2[1],"w"); axout=fdopen(p1[0],"r");
session();
}
+ return 0;
}
Yours,
d.
--
David Mentré <address@hidden>
http://www.linux-france.org/~dmentre/david-mentre-public-key.asc
GnuPG key fingerprint: A7CD 7357 3EC4 1163 745B 7FD3 FB3E AD7C 2A18 BE9E
- [Texmacs-dev] [patch] Update for new Axiom prompt,
David MENTRE <=