"Fossies" - the Fresh Open Source Software Archive 
As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style:
standard) with prefixed line numbers and
code folding option.
Alternatively you can here
view or
download the uninterpreted source code file.
1 /*
2 * Copyright 1989 Software Research Associates, Inc., Tokyo, Japan
3 *
4 * Permission to use, copy, modify, and distribute this software and its
5 * documentation for any purpose and without fee is hereby granted, provided
6 * that the above copyright notice appear in all copies and that both that
7 * copyright notice and this permission notice appear in supporting
8 * documentation, and that the name of Software Research Associates not be used
9 * in advertising or publicity pertaining to distribution of the software
10 * without specific, written prior permission. Software Research Associates
11 * makes no representations about the suitability of this software for any
12 * purpose. It is provided "as is" without express or implied warranty.
13 *
14 * SOFTWARE RESEARCH ASSOCIATES DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
15 * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS,
16 * IN NO EVENT SHALL SOFTWARE RESEARCH ASSOCIATES BE LIABLE FOR ANY SPECIAL,
17 * INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
18 * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
19 * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
20 * PERFORMANCE OF THIS SOFTWARE.
21 *
22 * Author: Erik M. van der Poel
23 * Software Research Associates, Inc., Tokyo, Japan
24 * erik@sra.co.jp
25 */
26
27 #include <X11/Intrinsic.h>
28 #include <X11/StringDefs.h>
29 #include <X11/Xos.h>
30 #include <X11/Xaw/Text.h>
31 #include <X11/Xaw/AsciiText.h>
32
33 #define SEL_FILE_CANCEL -1
34 #define SEL_FILE_OK 0
35 #define SEL_FILE_NULL 1
36 #define SEL_FILE_TEXT 2
37
38 #define SF_DO_SCROLL 1
39 #define SF_DO_NOT_SCROLL 0
40
41 typedef struct {
42 int statDone;
43 char *real;
44 char *shown;
45 } SFEntry;
46
47 typedef struct {
48 char *dir;
49 char *path;
50 SFEntry *entries;
51 int nEntries;
52 int vOrigin;
53 int nChars;
54 int hOrigin;
55 int changed;
56 int beginSelection;
57 int endSelection;
58 time_t mtime;
59 } SFDir;
60
61 extern int SFstatus;
62
63 extern char SFcurrentPath[], SFstartDir[], SFcurrentDir[];
64
65 extern Widget
66 selFile,
67 selFileCancel,
68 selFileField,
69 selFileForm,
70 selFileHScroll,
71 selFileHScrolls[],
72 selFileLists[],
73 selFileOK,
74 selFilePrompt,
75 selFileVScrolls[];
76
77 extern Display *SFdisplay;
78
79 extern int SFcharWidth, SFcharHeight, SFcharAscent;
80
81 extern SFDir *SFdirs;
82
83 extern int SFdirEnd, SFdirPtr;
84
85 extern Pixel SFfore, SFback;
86
87 extern Atom SFwmDeleteWindow;
88
89 extern XSegment SFsegs[], SFcompletionSegs[];
90
91 extern XawTextPosition SFtextPos;
92
93 extern void
94 SFenterList(),
95 SFleaveList(),
96 SFmotionList(),
97 SFbuttonPressList(),
98 SFbuttonReleaseList();
99
100 extern void
101 SFvSliderMovedCallback(),
102 SFvFloatSliderMovedCallback(),
103 SFhSliderMovedCallback(),
104 SFpathSliderMovedCallback(),
105 SFvAreaSelectedCallback(),
106 SFhAreaSelectedCallback(),
107 SFpathAreaSelectedCallback();
108
109 extern int SFupperX, SFlowerY, SFupperY;
110
111 extern int SFtextX, SFtextYoffset;
112
113 extern int SFentryWidth, SFentryHeight;
114
115 extern int SFlineToTextH, SFlineToTextV;
116
117 extern int SFbesideText, SFaboveAndBelowText;
118
119 extern int SFcharsPerEntry;
120
121 extern int SFlistSize;
122
123 extern int SFcurrentInvert[];
124
125 extern int SFworkProcAdded;
126
127 extern Boolean SFworkProc();
128
129 extern XtAppContext SFapp;
130
131 extern int SFpathScrollWidth, SFvScrollHeight, SFhScrollWidth;
132
133 extern char SFtextBuffer[];
134
135 extern int SFbuttonPressed;
136
137 extern int SFcompareEntries();
138
139 extern void SFdirModTimer();
140
141 extern char SFstatChar();
142
143 extern XtIntervalId SFdirModTimerId;
144
145 extern int (*SFfunc)();