123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151 |
- <!-- $XConsortium: EdInsFF.sgm /main/5 1996/08/30 13:00:20 rws $ -->
- <!-- (c) Copyright 1995 Digital Equipment Corporation. -->
- <!-- (c) Copyright 1995 Hewlett-Packard Company. -->
- <!-- (c) Copyright 1995 International Business Machines Corp. -->
- <!-- (c) Copyright 1995 Sun Microsystems, Inc. -->
- <!-- (c) Copyright 1995 Novell, Inc. -->
- <!-- (c) Copyright 1995 FUJITSU LIMITED. -->
- <!-- (c) Copyright 1995 Hitachi. -->
- <![ %CDE.C.CDE; [<RefEntry Id="CDEMX.XCSA.MAN31.rsml.1">]]>
- <![ %CDE.C.XO; [<RefEntry Id="XCSA.MAN31.rsml.1">]]>
- <RefMeta>
- <RefEntryTitle>DtEditorInsertFromFile</RefEntryTitle>
- <ManVolNum>library call</ManVolNum>
- </RefMeta>
- <RefNameDiv>
- <RefName><Function>DtEditorInsertFromFile</Function></RefName>
- <RefPurpose>insert data from a file into a DtEditor widget
- </RefPurpose>
- </RefNameDiv>
- <!-- CDE Common Source Format, Version 1.0.0-->
- <!-- *************************************************************************-->
- <!-- ** (c) Copyright 1993, 1994, 1995 Hewlett-Packard Company-->
- <!-- ** (c) Copyright 1993, 1994, 1995 International Business Machines Corp.-->
- <!-- ** (c) Copyright 1993, 1994, 1995 Sun Microsystems, Inc.-->
- <!-- ** (c) Copyright 1993, 1994, 1995 Novell, Inc.-->
- <!-- *************************************************************************-->
- <RefSynopsisDiv>
- <FuncSynopsis Remap="ANSI">
- <FuncSynopsisInfo>#include <Dt/Editor.h>
- </FuncSynopsisInfo>
- <FuncDef>DtEditorErrorCode <Function>DtEditorInsertFromFile</Function></FuncDef>
- <ParamDef>Widget <Parameter>widget</Parameter></ParamDef>
- <ParamDef>char *<Parameter>fileName</Parameter></ParamDef>
- </FuncSynopsis>
- </RefSynopsisDiv>
- <RefSect1>
- <Title>DESCRIPTION</Title>
- <Para>The
- <Function>DtEditorInsertFromFile</Function> function inserts data from a file to
- the insertion cursor position in a DtEditor widget.
- After the data is inserted, the insertion cursor is positioned after the
- last character inserted.
- </Para>
- <Para>The
- <Symbol Role="Variable">widget</Symbol> argument specifies the DtEditor widget ID.
- </Para>
- <Para>The
- <Emphasis>fileName</Emphasis> argument is the pathname of the file
- relative to the local system.
- <![ %CDE.C.CDE; [</Para>
- <Para>For a complete definition of the DtEditor widget
- and its associated resources, see
- &cdeman.DtEditor;. ]]></Para>
- </RefSect1>
- <RefSect1>
- <Title>RETURN VALUE</Title>
- <Para>Upon successful completion, the
- <Function>DtEditorInsertFromFile</Function> function returns one of the following values:
- </Para>
- <VariableList>
- <VarListEntry>
- <Term>DtEDITOR_NO_ERRORS</Term>
- <ListItem>
- <Para>The file is readable and writable.
- </Para>
- </ListItem>
- </VarListEntry>
- <VarListEntry>
- <Term>DtEDITOR_READ_ONLY_FILE</Term>
- <ListItem>
- <Para>The file is read only.
- <![ %CDE.C.CDE; [</Para>
- </ListItem>
- </VarListEntry>
- <VarListEntry>
- <Term>DtEDITOR_NULLS_REMOVED</Term>
- <ListItem>
- <Para>The file contained embedded
- <SystemItem Class="Constant">NULL</SystemItem> characters, which were removed.
- ]]></Para>
- </ListItem>
- </VarListEntry>
- </VariableList>
- <Para>Otherwise, if it cannot insert the data into the DtEditor widget,
- <Function>DtEditorInsertFromFile</Function> returns one of the following values:
- </Para>
- <VariableList>
- <VarListEntry>
- <Term>DtEDITOR_NONEXISTENT_FILE</Term>
- <ListItem>
- <Para>The file does not exist.
- </Para>
- </ListItem>
- </VarListEntry>
- <VarListEntry>
- <Term>DtEDITOR_DIRECTORY</Term>
- <ListItem>
- <Para>The file is a directory.
- </Para>
- </ListItem>
- </VarListEntry>
- <VarListEntry>
- <Term>DtEDITOR_CHAR_SPECIAL_FILE</Term>
- <ListItem>
- <Para>The file is a character-special device.
- </Para>
- </ListItem>
- </VarListEntry>
- <VarListEntry>
- <Term>DtEDITOR_BLOCK_MODE_FILE</Term>
- <ListItem>
- <Para>The file is a block-mode device.
- </Para>
- </ListItem>
- </VarListEntry>
- <VarListEntry>
- <Term>DtEDITOR_NO_FILE_ACCESS</Term>
- <ListItem>
- <Para>The file cannot be accessed.
- <![ %CDE.C.CDE; [</Para>
- </ListItem>
- </VarListEntry>
- <VarListEntry>
- <Term>DtEDITOR_INSUFFICIENT_MEMORY</Term>
- <ListItem>
- <Para>Not enough system memory is available to insert the file.
- ]]></Para>
- </ListItem>
- </VarListEntry>
- <VarListEntry>
- <Term>DtEDITOR_UNREADABLE_FILE</Term>
- <ListItem>
- <Para>The file is unreadable for an unspecified reason.
- </Para>
- </ListItem>
- </VarListEntry>
- </VariableList>
- </RefSect1>
- <RefSect1>
- <Title>APPLICATION USAGE</Title>
- <Para>If the data is in memory, rather than a disk file, the application should
- use
- &cdeman.DtEditorInsert;.</Para>
- </RefSect1>
- <RefSect1>
- <Title>SEE ALSO</Title>
- <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>
- </RefSect1>
- </RefEntry>
- <!--fickle 1.12 mancsf-to-docbook 1.2 08/07/95 23:40:24-->
|