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

Re: [RFR] man://manpages-de/stdarg.3



* Chris Leick <c.leick@vollbio.de> [110120 20:10]:
> #. type: Plain text
> msgid ""
> "A function may be called with a varying number of arguments of varying "
> "types.  The include file I<E<lt>stdarg.hE<gt>> declares a type I<va_list> "
> "and defines three macros for stepping through a list of arguments whose "
> "number and types are not known to the called function."
> msgstr ""
> "Eine Funktion kann mit einer ver??nderlichen Anzahl von Argumenten "
> "ver??nderlichen Typs aufgerufen werden. Die Include-Datei I<stdarg.h> "
> "deklariert einen Typ B<va_list> und definiert drei Makros, um eine Liste von "
> "Argumenten durchzugehen, deren Anzahl und Typen der aufgerufenen Funktion "
> "unbekannt sind."

Sobald die Funktion aufgerufen wird, ist die Anzahl nicht mehr
veränderlich, insofern

s/veränderlichen Anzahl/unterschiedlichen Anzahl/
s/veränderlichen Type/verschiedenen Typs/

(aber bei den späteren passt veränderlich)

"not known to the called function" im Orginal kann man fast nur als
falsch bezeichnen...

> #. type: Plain text
> msgid ""
> "The B<va_start>()  macro initializes I<ap> for subsequent use by B<va_arg>"
> "()  and B<va_end>(), and must be called first."
> msgstr ""
> "Das Makro B<va_start>() initialisiert I<ap> f??r nachfolgende Benutzung durch "
> "B<va_arg>() und B<va_end>() und muss zuerst aufgerufen werden."

vielleicht s/für/zur/, oder zumindest s/für/für die/ ?

> #. type: Plain text
> msgid ""
> "Because the address of this argument may be used in the B<va_start>()  "
> "macro, it should not be declared as a register variable, or as a function or "
> "an array type."
> msgstr ""
> "Da die Adresse dieses Parameters im Makro B<va_start>() benutzt wird, sollte "
> "er nicht als eine Registervariable, als Funktion oder als ein Feldtyp "
> "deklariert sein."

s/sein/werden/

> #. type: Plain text
> msgid ""
> "The B<va_arg>()  macro expands to an expression that has the type and value "
> "of the next argument in the call.  The argument I<ap> is the I<va_list> "
> "I<ap> initialized by B<va_start>().  Each call to B<va_arg>()  modifies "
> "I<ap> so that the next call returns the next argument.  The argument I<type> "
> "is a type name specified so that the type of a pointer to an object that has "
> "the specified type can be obtained simply by adding a * to I<type>."
> msgstr ""
> "Das Makro B<va_arg>() expandiert zu einem Ausdruck, der den Typ und Wert des "
> "n??chsten aufzurufenden Argumentes hat. Das Argument I<ap> ist die B<va_list> "
> "I<ap>, initialisiert durch B<va_start>(). Jeder Aufruf von B<va_arg>() "
> "ver??ndert I<ap> so, dass der n??chste Aufruf das n??chste Argument zur??ckgibt. "

vielleicht "der folgende Aufruf"?

> "Der Parameter I<typ> ist ein Typenname, der so angegeben ist, dass der Typ "
> "eines Zeigers auf ein Objekt, das den angegebenen Typ hat, einfach durch "
> "Hinzuf??gen eines * zu I<typ> erhalten werden kann."

> "If there is no next argument, or if I<type> is not compatible with the type "
> "of the actual next argument (as promoted according to the default argument "
> "promotions), random errors will occur."
> msgstr ""
> "Wenn es kein weiteres Argument gibt oder wenn I<typ> nicht kompatibel mit "
> "dem Typ des n??chsten Argumentes ist (wie es entsprechend der "
> "Standardargumente bef??rdert wird), erscheinen zuf??llige Fehler."

Es werden nicht die Standardargument befördert, sondern es sind die
Standardregeln wie Typen von Argumenten verändert werden.

ich wäre für "(entsprechend der üblichen 'argument promotions')",
solange niemand hier das deutsche Wort dafür kenn.

> #. type: Plain text
> msgid ""
> "Each invocation of B<va_start>()  must be matched by a corresponding "
> "invocation of B<va_end>()  in the same function.  After the call B<va_end"
> "(>I<ap>B<)> the variable I<ap> is undefined.  Multiple traversals of the "
> "list, each bracketed by B<va_start>()  and B<va_end>()  are possible.  "
> "B<va_end>()  may be a macro or a function."
> msgstr ""
> "Jeder Aufruf von B<va_start>() muss zu einem zugeh??rigen Aufruf von "
> "B<va_end>() in der gleichen Funktion passen.

Zu jedem Aufruf ... muss es einen dazugehörigen Aufruf ... in der
gleichen Funktion geben.

> #.  Proposal from clive@demon.net, 1997-02-28
> #. type: Plain text
> # http://www.a-m-i.de/tips/stack/stack.php
> # http://de.wikipedia.org/wiki/Variadische_Funktion
> msgid ""
> "An obvious implementation would have a I<va_list> be a pointer to the stack "
> "frame of the variadic function.  In such a setup (by far the most common) "
> "there seems nothing against an assignment"
> msgstr ""
> "Eine eindeutige Implementierung h??tte eine I<va_list>,

s/eindeutig/naheliegende/

Der Text danach sagt ja gerade, dass das nicht so sein muss.

> die ein Zeiger auf den "

s/auf den/in den/

> "??Stack-Frame?? der variadischen Funktion w??re. In einer derartigen Einrichtung "

"Einrichtung" geht hier m.M. nach gar nicht.

vielleicht:

"In einem derartigen Szenario,"?

> #. type: Plain text
> msgid ""
> "Finally, on systems where arguments are passed in registers, it may be "
> "necessary for B<va_start>()  to allocate memory, store the arguments there, "
> "and also an indication of which argument is next, so that B<va_arg>()  can "
> "step through the list.  Now B<va_end>()  can free the allocated memory "
> "again.  To accommodate this situation, C99 adds a macro B<va_copy>(), so "
> "that the above assignment can be replaced by"
> msgstr ""
> "Letztlich k??nnte es auf Systemen, auf denen Argumente in Registern ??bergeben "

Das ist glaube eher ein "Zuletzt" oder ein "Schließlich" aber kein
"Letztlich".

> "werden, f??r B<va_start>() n??tig sein, Speicher zu reservieren, die Argumente "
> "und au??erdem eine Anzeige, welches Argument das n??chste ist, dort zu "
> "speichern, so dass B<va_arg>() die Liste durchgehen kann.

Der Satz ist extrem sperrig:


"Zu guter letzt kann es auf Systemen, die Argumente in Registern
übergeben, sogar nötig sein, dass B<va_start> Speicher reserviert und in
diesem die Argumente und einen Positionsanzeiger speichert, so dass
B<va_arg>() diese Liste durchschreiten kann.

> Nun kann "

s/Nun/Dann/

> "B<va_end>() den reservierten Speicher wieder freigeben. Um sich an diese "
> "Situation anzupassen,

Um diesem Problem Rechnung zu tragen,

> #. type: Plain text
> msgid ""
> "Each invocation of B<va_copy>()  must be matched by a corresponding "
> "invocation of B<va_end>()  in the same function.  Some systems that do not "
> "supply B<va_copy>()  have B<__va_copy> instead, since that was the name used "
> "in the draft proposal."
> msgstr ""
> "Jeder Aufruf von B<va_copy>() muss zu einem zugeh??rigen Aufruf von "
> "B<va_end>() in der gleichen Funktion passen.

siehe oben.

> Einige Systeme, die kein "
> "B<va_copy>() bereitstellen, haben stattdessen B<__va_copy>, da das der "
> "gleiche Name ist, der im Entwurfsvorschlag benutzt wurde."

", da dies der Name ist, der im ursprünglichen Vorschlag verwendet wurde."

> #. type: Plain text
> msgid ""
> "Unlike the B<varargs> macros, the B<stdarg> macros do not permit programmers "
> "to code a function with no fixed arguments.  This problem generates work "
> "mainly when converting B<varargs> code to B<stdarg> code, but it also "
> "creates difficulties for variadic functions that wish to pass all of their "
> "arguments on to a function that takes a I<va_list> argument, such as "
> "B<vfprintf>(3)."
> msgstr ""
> "Im Gegensatz zu den Makros B<varargs> erlauben die Makros B<stdarg> dem "
> "Programmierer nicht, eine Funktion ohne feste Argumente zu implementieren.  "
> "Dieses Problem macht haupts??chlich Arbeit, wenn man Code mit B<varargs> nach "
> "B<stdarg> konvertiert,

Das ist hauptsächlich dann ein Problem, wenn ...

> #. type: Plain text
> msgid ""
> "The function I<foo> takes a string of format characters and prints out the "
> "argument associated with each format character based on the type."
> msgstr ""
> "Die Funktion I<foo> nimmt eine Zeichenkette von Formatzeichen

entgegen

> und gibt das "
> "Argument aus, das mit jedem Formatzeichen in Zusammenhang gebracht wird, "
> "basierend auf dem Typ."

"und gibt für jedes Zeichen ein Argument des entsprechenden Typs aus."

	Bernhard R. Link


Reply to: