![]() |
|
|||
File indexing completed on 2025-03-13 09:29:43
0001 /*********************************************************** 0002 0003 Copyright 1987, 1988, 1994, 1998 The Open Group 0004 0005 Permission to use, copy, modify, distribute, and sell this software and its 0006 documentation for any purpose is hereby granted without fee, provided that 0007 the above copyright notice appear in all copies and that both that 0008 copyright notice and this permission notice appear in supporting 0009 documentation. 0010 0011 The above copyright notice and this permission notice shall be included in 0012 all copies or substantial portions of the Software. 0013 0014 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 0015 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 0016 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 0017 OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 0018 AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 0019 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 0020 0021 Except as contained in this notice, the name of The Open Group shall not be 0022 used in advertising or otherwise to promote the sale, use or other dealings 0023 in this Software without prior written authorization from The Open Group. 0024 0025 0026 Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts. 0027 0028 All Rights Reserved 0029 0030 Permission to use, copy, modify, and distribute this software and its 0031 documentation for any purpose and without fee is hereby granted, 0032 provided that the above copyright notice appear in all copies and that 0033 both that copyright notice and this permission notice appear in 0034 supporting documentation, and that the name of Digital not be 0035 used in advertising or publicity pertaining to distribution of the 0036 software without specific, written prior permission. 0037 0038 DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING 0039 ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL 0040 DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR 0041 ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, 0042 WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, 0043 ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS 0044 SOFTWARE. 0045 0046 ******************************************************************/ 0047 0048 /* 0049 * AsciiSrcP.h - Private Header for Ascii Text Source. 0050 * 0051 * This is the private header file for the Ascii Text Source. 0052 * It is intended to be used with the Text widget, the simplest way to use 0053 * this text source is to use the AsciiText Object. 0054 * 0055 * Date: June 29, 1989 0056 * 0057 * By: Chris D. Peterson 0058 * MIT X Consortium 0059 * kit@expo.lcs.mit.edu 0060 */ 0061 0062 #ifndef _XawAsciiSrcP_h 0063 #define _XawAsciiSrcP_h 0064 0065 #include <X11/Xaw/TextSrcP.h> 0066 #include <X11/Xaw/AsciiSrc.h> 0067 0068 #ifdef L_tmpnam 0069 #define TMPSIZ L_tmpnam 0070 #else 0071 #ifdef PATH_MAX 0072 #define TMPSIZ PATH_MAX 0073 #else 0074 #define TMPSIZ 1024 /* bytes to allocate for tmpnam */ 0075 #endif 0076 #endif 0077 0078 typedef struct _Piece { /* Piece of the text file of BUFSIZ allocated 0079 characters */ 0080 char *text; /* The text in this buffer */ 0081 XawTextPosition used; /* The number of characters of this buffer 0082 that have been used */ 0083 struct _Piece *prev, *next; /* linked list pointers */ 0084 } Piece; 0085 0086 typedef struct _AsciiSrcClassPart { 0087 XtPointer extension; 0088 } AsciiSrcClassPart; 0089 0090 /* Full class record */ 0091 typedef struct _AsciiSrcClassRec { 0092 ObjectClassPart object_class; 0093 TextSrcClassPart text_src_class; 0094 AsciiSrcClassPart ascii_src_class; 0095 } AsciiSrcClassRec; 0096 0097 extern AsciiSrcClassRec asciiSrcClassRec; 0098 0099 /* New fields for the AsciiSrc object */ 0100 typedef struct _AsciiSrcPart { 0101 /* resources */ 0102 char *string; /* either the string, or the 0103 file name, depending upon the type */ 0104 XawAsciiType type; /* either string or disk */ 0105 XawTextPosition piece_size; /* Size of text buffer for each piece */ 0106 Boolean data_compression; /* compress to minimum memory automatically 0107 on save? */ 0108 #ifdef OLDXAW 0109 XtCallbackList callback; 0110 #endif 0111 Boolean use_string_in_place;/* Use the string passed in place */ 0112 int ascii_length; /* length field for ascii string emulation */ 0113 0114 #ifdef ASCII_DISK 0115 String filename; /* name of file for Compatibility */ 0116 #endif /* ASCII_DISK */ 0117 0118 /* private */ 0119 Boolean is_tempfile; /* Is this a temporary file? */ 0120 #ifdef OLDXAW 0121 Boolean changes; 0122 #endif 0123 Boolean allocated_string; /* Have I allocated the 0124 string in ascii_src->string? */ 0125 XawTextPosition length; /* length of file */ 0126 Piece *first_piece; /* first piece of the text */ 0127 #ifndef OLDXAW 0128 XtPointer pad[4]; /* for future use and keep binary compatibility */ 0129 #endif 0130 } AsciiSrcPart; 0131 0132 /* instance record */ 0133 typedef struct _AsciiSrcRec { 0134 ObjectPart object; 0135 TextSrcPart text_src; 0136 AsciiSrcPart ascii_src; 0137 } AsciiSrcRec; 0138 0139 #endif /* _XawAsciiSrcP_h */
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
![]() ![]() |