Thread View: de.comp.gnu
4 messages
4 total messages
Started by Bernd Rosenau
Sun, 11 Oct 1992 13:43
Portierung von GNU-AWK 2.10 auf COHERENT
Author: Bernd Rosenau
Date: Sun, 11 Oct 1992 13:43
Date: Sun, 11 Oct 1992 13:43
15 lines
770 bytes
770 bytes
Hallo, ich habe ein Problem bei der Portierung von GAWK auf COHERENT 4.0, und zwar gibt es im File "awk3.c" einen Funktionsaufruf der Funktion "gcvt", diese Funktion ist in den Libs von Coh. 4.0 nicht vorhanden. Kann mir jemand ein Beschreibung dieser Funktion geben, der Prototyp dieser Funktion lautet soweit ersichtlich: char *gcvt(double,int,char *) Vielen Dank im vorraus fuer eure Hilfe. Gruss, Bernd.
Re: Portierung von GNU-AWK 2.10 auf COHERENT
Author: Andreas Vogel
Date: Mon, 12 Oct 1992 22:03
Date: Mon, 12 Oct 1992 22:03
35 lines
1768 bytes
1768 bytes
In article <1992Oct11.134324.19735@nadia.stgt.sub.org> br@nadia.stgt.sub.org (Bernd Rosenau) writes:
>Hallo,
>
>ich habe ein Problem bei der Portierung von GAWK auf COHERENT 4.0,
>und zwar gibt es im File "awk3.c" einen Funktionsaufruf der
>Funktion "gcvt", diese Funktion ist in den Libs von Coh. 4.0
>nicht vorhanden.
>
>Kann mir jemand ein Beschreibung dieser Funktion geben,
>der Prototyp dieser Funktion lautet soweit ersichtlich:
>
>char *gcvt(double,int,char *)
>
Hallo Bernd,
Welche Version hast du denn?? Ich habe die Version 2.13.2. In diesem
Release gibt es keine Datei, die awk3.c heisst. Wenn ich mal alle *.[ch]
Files nach dem Pattern "gcvt" durchsuche, dann kommt folgendes:
CHANGES:Removed use of gcvt() and GCVT_MISSING -- turns out it was no faster than
CHANGES:Corrected missing/gcvt.c.
builtin.c: * printf's %g format [can't rely on gcvt()]
vms/unixlib.h:char *ecvt(), *fcvt(), *gcvt();
Wenn ich dann weiter im CHANGES File nachlese, dann steht da drin, dass die
Funktion gcvt() ueberhaupt nicht mehr benutzt wird, weil sie nicht schneller
sei als sprintf("%g") und es ausserdem Portabilitaetsprobleme gaebe.
Folgerung: Besorg dir mal 'ne neue Version von gawk.
--
Andreas Vogel Bahnhofstr. 13 / D-7300 Esslingen / Germany
Voice: +49-711/357613
E-Mail: av@ssw.de
Re: Portierung von GNU-AWK 2.10 auf COHERENT
Author: Hinrich Eilts
Date: Tue, 13 Oct 1992 12:01
Date: Tue, 13 Oct 1992 12:01
58 lines
2628 bytes
2628 bytes
In article <1992Oct11.134324.19735@nadia.stgt.sub.org> br@nadia.stgt.sub.org (Bernd Rosenau) writes:
ich habe ein Problem bei der Portierung von GAWK auf COHERENT 4.0,
und zwar gibt es im File "awk3.c" einen Funktionsaufruf der
Funktion "gcvt", diese Funktion ist in den Libs von Coh. 4.0
nicht vorhanden.
Kann mir jemand ein Beschreibung dieser Funktion geben,
der Prototyp dieser Funktion lautet soweit ersichtlich:
char *gcvt(double,int,char *)
Maine Manualseite vom NeXT lautet
ECVT(3) UNIX Programmer's Manual ECVT(3)
NAME
ecvt, fcvt, gcvt - output conversion
SYNOPSIS
char *ecvt(value, ndigit, decpt, sign)
double value;
int ndigit, *decpt, *sign;
char *fcvt(value, ndigit, decpt, sign)
double value;
int ndigit, *decpt, *sign;
char *gcvt(value, ndigit, buf)
double value;
char *buf;
DESCRIPTION
Ecvt converts the value to a null-terminated string of ndi-
git ASCII digits and returns a pointer thereto. The posi-
tion of the decimal point relative to the beginning of the
string is stored indirectly through decpt (negative means to
the left of the returned digits). If the sign of the result
is negative, the word pointed to by sign is non-zero, other-
wise it is zero. The low-order digit is rounded.
Fcvt is identical to ecvt, except that the correct digit has
been rounded for Fortran F-format output of the number of
digits specified by ndigits.
Gcvt converts the value to a null-terminated ASCII string in
buf and returns a pointer to buf. It attempts to produce
ndigit significant digits in Fortran F format if possible,
otherwise E format, ready for printing. Trailing zeros may
be suppressed.
SEE ALSO
printf(3)
BUGS
The return values point to static data whose content is
overwritten by each call.
MfG Hinrich
Re: Portierung von GNU-AWK 2.10 auf COHERENT
Author: Volker Heiss
Date: Tue, 13 Oct 1992 21:03
Date: Tue, 13 Oct 1992 21:03
50 lines
1604 bytes
1604 bytes
br@nadia.stgt.sub.org (Bernd Rosenau) writes: >Hallo, >ich habe ein Problem bei der Portierung von GAWK auf COHERENT 4.0, >und zwar gibt es im File "awk3.c" einen Funktionsaufruf der >Funktion "gcvt", diese Funktion ist in den Libs von Coh. 4.0 >nicht vorhanden. >Kann mir jemand ein Beschreibung dieser Funktion geben, >der Prototyp dieser Funktion lautet soweit ersichtlich: >char *gcvt(double,int,char *) Hier direkt mit OS/2 cut-and-paste aus der Borland-C-Hilfe (sorry, couldn't resist :-) Wandelt eine Gleitkommazahl in einen String um. Definition: char *gcvt(double value, int ndec, char *buf); Hinweis: gcvt wandelt value in einen, mit 0 beendeten, ASCII-String um und speichert ihn in buf. Die Funktion erzeugt, wenn moeglich, ndec signifikante Ziffern im F-Format von FORTRAN. Anderenfalls wird der Wert im E-Format von printf (druckfertig formatiert) geliefert. gcvt unterdrueckt abschliessende Nullen. Rueckgabewert: bei fehlerfreier Ausfuehrung: die Adresse des Strings *buf. Soll unter UNIX verfuegbar sein. Ist allerdings nicht im gcc222 drin. Gruss volker -- Volker Heiss volker@tpki.toppoint.de 2300 Kiel
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads