annotate docs/ccguide/write.refentry @ 2445:6231225a182e

Updated with SetStat and GetStat op entry points
author boisy
date Fri, 26 Feb 2010 12:38:07 +0000
parents 5894df624e1a
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
466
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
1 <refentry id="write">
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
2 <refnamediv>
468
60b821f18853 A little here and there.
roug
parents: 466
diff changeset
3 <refname>Write</refname>
60b821f18853 A little here and there.
roug
parents: 466
diff changeset
4 <refname>Writeln</refname>
60b821f18853 A little here and there.
roug
parents: 466
diff changeset
5 <refpurpose>write to a file or device</refpurpose>
466
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
6 </refnamediv>
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
7
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
8 <refsynopsisdiv>
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
9 <funcsynopsis>
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
10 <funcprototype>
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
11 <funcdef><function>write</function></funcdef>
580
7b3be7557b46 All function prototypes are added.
roug
parents: 552
diff changeset
12 <paramdef>int <parameter>pn</parameter></paramdef>
7b3be7557b46 All function prototypes are added.
roug
parents: 552
diff changeset
13 <paramdef>char *<parameter>buffer</parameter></paramdef>
7b3be7557b46 All function prototypes are added.
roug
parents: 552
diff changeset
14 <paramdef>int <parameter>count</parameter></paramdef>
7b3be7557b46 All function prototypes are added.
roug
parents: 552
diff changeset
15 </funcprototype>
7b3be7557b46 All function prototypes are added.
roug
parents: 552
diff changeset
16 <funcprototype>
7b3be7557b46 All function prototypes are added.
roug
parents: 552
diff changeset
17 <funcdef><function>writeln</function></funcdef>
7b3be7557b46 All function prototypes are added.
roug
parents: 552
diff changeset
18 <paramdef>int <parameter>pn</parameter></paramdef>
7b3be7557b46 All function prototypes are added.
roug
parents: 552
diff changeset
19 <paramdef>char *<parameter>buffer</parameter></paramdef>
7b3be7557b46 All function prototypes are added.
roug
parents: 552
diff changeset
20 <paramdef>int <parameter>count</parameter></paramdef>
466
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
21 </funcprototype>
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
22 </funcsynopsis>
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
23
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
24 </refsynopsisdiv>
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
25
548
00e2843836cd All "See Also" implemented
roug
parents: 468
diff changeset
26 <refsect1><title>Assembler Equivalent</title>
00e2843836cd All "See Also" implemented
roug
parents: 468
diff changeset
27 <para>
00e2843836cd All "See Also" implemented
roug
parents: 468
diff changeset
28 os9 I$WRITE
00e2843836cd All "See Also" implemented
roug
parents: 468
diff changeset
29 </para>
00e2843836cd All "See Also" implemented
roug
parents: 468
diff changeset
30 <para>
00e2843836cd All "See Also" implemented
roug
parents: 468
diff changeset
31 os9 I$WRITLN
00e2843836cd All "See Also" implemented
roug
parents: 468
diff changeset
32 </para>
00e2843836cd All "See Also" implemented
roug
parents: 468
diff changeset
33 </refsect1>
00e2843836cd All "See Also" implemented
roug
parents: 468
diff changeset
34
466
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
35 <refsect1><title>Description</title>
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
36 <para>
608
5894df624e1a All refentries finished.
roug
parents: 580
diff changeset
37 "Pn" must be a value returned by "open", "creat" or "dup" or
5894df624e1a All refentries finished.
roug
parents: 580
diff changeset
38 should be a 0(stdin), 1(stdout), or 2(stderr).
5894df624e1a All refentries finished.
roug
parents: 580
diff changeset
39 </para>
5894df624e1a All refentries finished.
roug
parents: 580
diff changeset
40 <para>
5894df624e1a All refentries finished.
roug
parents: 580
diff changeset
41 "Buffer should point to an area of memory from which "count"
5894df624e1a All refentries finished.
roug
parents: 580
diff changeset
42 bytes are to be written. Write returns the actual number of
5894df624e1a All refentries finished.
roug
parents: 580
diff changeset
43 bytes written, and if this is different from "count", an
5894df624e1a All refentries finished.
roug
parents: 580
diff changeset
44 error has occurred.
5894df624e1a All refentries finished.
roug
parents: 580
diff changeset
45 </para>
5894df624e1a All refentries finished.
roug
parents: 580
diff changeset
46 <para>
5894df624e1a All refentries finished.
roug
parents: 580
diff changeset
47 Writes in multiples of 256 bytes to file offset boundaries of
5894df624e1a All refentries finished.
roug
parents: 580
diff changeset
48 256 bytes are the most efficient.
5894df624e1a All refentries finished.
roug
parents: 580
diff changeset
49 </para>
5894df624e1a All refentries finished.
roug
parents: 580
diff changeset
50 <para>
5894df624e1a All refentries finished.
roug
parents: 580
diff changeset
51 Write causes no "line-editing" to occur on output. Writeln
5894df624e1a All refentries finished.
roug
parents: 580
diff changeset
52 causes line-editing and only writes up to the first "\n" in the
5894df624e1a All refentries finished.
roug
parents: 580
diff changeset
53 buffer if this is found before "count" is exhausted. For a
5894df624e1a All refentries finished.
roug
parents: 580
diff changeset
54 full description of the actions of these calls the reader is
5894df624e1a All refentries finished.
roug
parents: 580
diff changeset
55 referred to the OS-9 documentation.
466
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
56 </para>
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
57 </refsect1>
548
00e2843836cd All "See Also" implemented
roug
parents: 468
diff changeset
58
552
fcb97f0ba24b All diagnostics added.
roug
parents: 548
diff changeset
59 <refsect1><title>Diagnostics</title>
fcb97f0ba24b All diagnostics added.
roug
parents: 548
diff changeset
60 <para>
fcb97f0ba24b All diagnostics added.
roug
parents: 548
diff changeset
61 -1 is returned if "pn" is a bad path number, of "count" is
fcb97f0ba24b All diagnostics added.
roug
parents: 548
diff changeset
62 ridiculous or on physical i/o error.
fcb97f0ba24b All diagnostics added.
roug
parents: 548
diff changeset
63 </para>
fcb97f0ba24b All diagnostics added.
roug
parents: 548
diff changeset
64 </refsect1>
fcb97f0ba24b All diagnostics added.
roug
parents: 548
diff changeset
65
548
00e2843836cd All "See Also" implemented
roug
parents: 468
diff changeset
66 <refsect1><title>See Also</title>
00e2843836cd All "See Also" implemented
roug
parents: 468
diff changeset
67 <para>
00e2843836cd All "See Also" implemented
roug
parents: 468
diff changeset
68 <link linkend="creat">creat()</link>,
00e2843836cd All "See Also" implemented
roug
parents: 468
diff changeset
69 <link linkend="open">open()</link>
00e2843836cd All "See Also" implemented
roug
parents: 468
diff changeset
70 </para>
00e2843836cd All "See Also" implemented
roug
parents: 468
diff changeset
71 </refsect1>
00e2843836cd All "See Also" implemented
roug
parents: 468
diff changeset
72
466
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
73 </refentry>