EdInsFF.sgm 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. <!-- $XConsortium: EdInsFF.sgm /main/5 1996/08/30 13:00:20 rws $ -->
  2. <!-- (c) Copyright 1995 Digital Equipment Corporation. -->
  3. <!-- (c) Copyright 1995 Hewlett-Packard Company. -->
  4. <!-- (c) Copyright 1995 International Business Machines Corp. -->
  5. <!-- (c) Copyright 1995 Sun Microsystems, Inc. -->
  6. <!-- (c) Copyright 1995 Novell, Inc. -->
  7. <!-- (c) Copyright 1995 FUJITSU LIMITED. -->
  8. <!-- (c) Copyright 1995 Hitachi. -->
  9. <![ %CDE.C.CDE; [<RefEntry Id="CDEMX.XCSA.MAN31.rsml.1">]]>
  10. <![ %CDE.C.XO; [<RefEntry Id="XCSA.MAN31.rsml.1">]]>
  11. <RefMeta>
  12. <RefEntryTitle>DtEditorInsertFromFile</RefEntryTitle>
  13. <ManVolNum>library call</ManVolNum>
  14. </RefMeta>
  15. <RefNameDiv>
  16. <RefName><Function>DtEditorInsertFromFile</Function></RefName>
  17. <RefPurpose>insert data from a file into a DtEditor widget
  18. </RefPurpose>
  19. </RefNameDiv>
  20. <!-- CDE Common Source Format, Version 1.0.0-->
  21. <!-- *************************************************************************-->
  22. <!-- ** (c) Copyright 1993, 1994, 1995 Hewlett-Packard Company-->
  23. <!-- ** (c) Copyright 1993, 1994, 1995 International Business Machines Corp.-->
  24. <!-- ** (c) Copyright 1993, 1994, 1995 Sun Microsystems, Inc.-->
  25. <!-- ** (c) Copyright 1993, 1994, 1995 Novell, Inc.-->
  26. <!-- *************************************************************************-->
  27. <RefSynopsisDiv>
  28. <FuncSynopsis Remap="ANSI">
  29. <FuncSynopsisInfo>#include &lt;Dt/Editor.h>
  30. </FuncSynopsisInfo>
  31. <FuncDef>DtEditorErrorCode <Function>DtEditorInsertFromFile</Function></FuncDef>
  32. <ParamDef>Widget <Parameter>widget</Parameter></ParamDef>
  33. <ParamDef>char *<Parameter>fileName</Parameter></ParamDef>
  34. </FuncSynopsis>
  35. </RefSynopsisDiv>
  36. <RefSect1>
  37. <Title>DESCRIPTION</Title>
  38. <Para>The
  39. <Function>DtEditorInsertFromFile</Function> function inserts data from a file to
  40. the insertion cursor position in a DtEditor widget.
  41. After the data is inserted, the insertion cursor is positioned after the
  42. last character inserted.
  43. </Para>
  44. <Para>The
  45. <Symbol Role="Variable">widget</Symbol> argument specifies the DtEditor widget ID.
  46. </Para>
  47. <Para>The
  48. <Emphasis>fileName</Emphasis> argument is the pathname of the file
  49. relative to the local system.
  50. <![ %CDE.C.CDE; [</Para>
  51. <Para>For a complete definition of the DtEditor widget
  52. and its associated resources, see
  53. &cdeman.DtEditor;. ]]></Para>
  54. </RefSect1>
  55. <RefSect1>
  56. <Title>RETURN VALUE</Title>
  57. <Para>Upon successful completion, the
  58. <Function>DtEditorInsertFromFile</Function> function returns one of the following values:
  59. </Para>
  60. <VariableList>
  61. <VarListEntry>
  62. <Term>DtEDITOR_NO_ERRORS</Term>
  63. <ListItem>
  64. <Para>The file is readable and writable.
  65. </Para>
  66. </ListItem>
  67. </VarListEntry>
  68. <VarListEntry>
  69. <Term>DtEDITOR_READ_ONLY_FILE</Term>
  70. <ListItem>
  71. <Para>The file is read only.
  72. <![ %CDE.C.CDE; [</Para>
  73. </ListItem>
  74. </VarListEntry>
  75. <VarListEntry>
  76. <Term>DtEDITOR_NULLS_REMOVED</Term>
  77. <ListItem>
  78. <Para>The file contained embedded
  79. <SystemItem Class="Constant">NULL</SystemItem> characters, which were removed.
  80. ]]></Para>
  81. </ListItem>
  82. </VarListEntry>
  83. </VariableList>
  84. <Para>Otherwise, if it cannot insert the data into the DtEditor widget,
  85. <Function>DtEditorInsertFromFile</Function> returns one of the following values:
  86. </Para>
  87. <VariableList>
  88. <VarListEntry>
  89. <Term>DtEDITOR_NONEXISTENT_FILE</Term>
  90. <ListItem>
  91. <Para>The file does not exist.
  92. </Para>
  93. </ListItem>
  94. </VarListEntry>
  95. <VarListEntry>
  96. <Term>DtEDITOR_DIRECTORY</Term>
  97. <ListItem>
  98. <Para>The file is a directory.
  99. </Para>
  100. </ListItem>
  101. </VarListEntry>
  102. <VarListEntry>
  103. <Term>DtEDITOR_CHAR_SPECIAL_FILE</Term>
  104. <ListItem>
  105. <Para>The file is a character-special device.
  106. </Para>
  107. </ListItem>
  108. </VarListEntry>
  109. <VarListEntry>
  110. <Term>DtEDITOR_BLOCK_MODE_FILE</Term>
  111. <ListItem>
  112. <Para>The file is a block-mode device.
  113. </Para>
  114. </ListItem>
  115. </VarListEntry>
  116. <VarListEntry>
  117. <Term>DtEDITOR_NO_FILE_ACCESS</Term>
  118. <ListItem>
  119. <Para>The file cannot be accessed.
  120. <![ %CDE.C.CDE; [</Para>
  121. </ListItem>
  122. </VarListEntry>
  123. <VarListEntry>
  124. <Term>DtEDITOR_INSUFFICIENT_MEMORY</Term>
  125. <ListItem>
  126. <Para>Not enough system memory is available to insert the file.
  127. ]]></Para>
  128. </ListItem>
  129. </VarListEntry>
  130. <VarListEntry>
  131. <Term>DtEDITOR_UNREADABLE_FILE</Term>
  132. <ListItem>
  133. <Para>The file is unreadable for an unspecified reason.
  134. </Para>
  135. </ListItem>
  136. </VarListEntry>
  137. </VariableList>
  138. </RefSect1>
  139. <RefSect1>
  140. <Title>APPLICATION USAGE</Title>
  141. <Para>If the data is in memory, rather than a disk file, the application should
  142. use
  143. &cdeman.DtEditorInsert;.</Para>
  144. </RefSect1>
  145. <RefSect1>
  146. <Title>SEE ALSO</Title>
  147. <Para>&cdeman.Dt.Editor.h;, &cdeman.DtEditor;, &cdeman.DtEditorAppend;, &cdeman.DtEditorAppendFromFile;, &cdeman.DtEditorGetContents;, &cdeman.DtEditorInsert;, &cdeman.DtEditorReplace;, &cdeman.DtEditorReplaceFromFile;, &cdeman.DtEditorSaveContentsToFile;, &cdeman.DtEditorSetContents;, &cdeman.DtEditorGetInsertionPosition;, &cdeman.DtEditorSetInsertionPosition;, &cdeman.DtEditorSetContentsFromFile;.</Para>
  148. </RefSect1>
  149. </RefEntry>
  150. <!--fickle 1.12 mancsf-to-docbook 1.2 08/07/95 23:40:24-->