Bill Allombert on Fri, 27 Jun 2003 20:53:25 +0200


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

documentation fix for the description system


Hello PARI-dev,

Here a patch that make the documentation in line
with the change induced description system.

I will not commit it since I am no english writer and 
I have trouble with the TeX macros used here.

Cheers,
Bill.

Index: usersch4.tex
===================================================================
RCS file: /home/megrez/cvsroot/pari/doc/usersch4.tex,v
retrieving revision 1.43
diff -u -r1.43 usersch4.tex
--- usersch4.tex	2003/05/18 16:36:57	1.43
+++ usersch4.tex	2003/06/27 18:44:23
@@ -2297,41 +2297,19 @@
 complicated: you have to hardcode your function in the GP binary (or
 install \idx{Linux}). Here's what needs to be done: 
 
-In the definition of \kbd{functions\_basic} (file \kbd{language/init.c}),
-add your entry in exact alphabetical order by its GP name (note that digits
-come before letters), in a line of the form:
+You need to choose a section and add a file \kbd{functions/section/gpname}
+containing the following, keeping the notation above:
 \bprog
-{ "gpname", V, (void*)libname, secno, "code" }
+Function: gpname
+Section: section
+C-Name: libname
+Prototype: code
+Help: some help text
 @eprog
 
-\noindent where
+At this point you need to rebuild the database withrunning \kbd{make Def}
+in the directory \kbd{desc}.
 
-\kbd{libname} is the name of your function in library mode,
-
-\kbd{gpname} the name that you have chosen to call it under GP,
-
-\kbd{secno} is the section number of Chapter~3 in which this function would
-belong (type \kbd{?} in GP to see the list),
-
-\kbd{V} is a number between 0 and 99. Right now, for PARI there are only two
-significant values: zero means that it's possible to call the function
-without argument, and non-zero means it needs at least one argument.
-A binding of PARI to an external language (such as \kbd{Math::Pari}
-Perl module) may actually distinguish between different non-zero values.
-Better use 99 if you want a non-zero value which will not confuse anybody.
-
-\kbd{code} is the parser code.
-
-Once this has been done, in the file \kbd{language/helpmessages.c} add in
-exact alphabetical order a short message describing the effect of your
-function:
-\kbd{"name(x,y,...)=short descriptive message",}
-
-The message must be a single line, of arbitrary length. Do not use
-\kbd{\bs{n}}; the necessary newlines will be inserted by GP's online help
-functions. Optional arguments should be shown between braces (see the other
-messages for comparison).\smallskip
-
 Now, you can recompile GP.
 
 \subsec{Example}.
@@ -2371,10 +2349,18 @@
 user could explicitly supply an empty vector!
 
 \misctitle{Note:} If \kbd{install} were not available we would have to
-modify \kbd{language/helpmessages.c}, and \kbd{language/init.c} and
-recompile GP. The entry in \kbd{functions\_basic} corresponding to the
-function above is actually
+add a file \kbd{functions/number\_fields/bnfinit}
+containing the following:
 \bprog
-{ "bnfinit", 91, (void*)bnfinit0, 6, "GD0,L,DGp" }
+Function: bnfinit
+Section: number_fields
+C-Name: bnfinit0
+Prototype: GD0,L,DGp
+Help: bnfinit(P,{flag=0},{tech=[]}): compute the necessary data for future
+ use in ideal and unit group computations, including fundamental units if
+ they are not too large. flag and tech are both optional. flag can be any of
+ 0: default, 1: insist on having fundamental units, 2: do not compute units,
+ 3: small bnfinit, which can be converted to a big one using bnfmake. See
+ manual for details about tech
 @eprog
 \vfill\eject