Rename "dtapp" to "dtopen"
[oweals/cde.git] / cde / programs / localized / C / types / develop.dt
1 # ##########################################################################
2
3 #      develop.dt
4
5 #      Action and DataType definitions for the Common Desktop Environment
6 #      (CDE) components.  This file contains common datatypes for developers.
7
8 #     (c) Copyright 1993, 1994, 1995 Hewlett-Packard Company
9 #     (c) Copyright 1993, 1994, 1995 International Business Machines Corp.
10 #     (c) Copyright 1993, 1994, 1995 Sun Microsystems, Inc.
11 #     (c) Copyright 1993, 1994, 1995 Novell, Inc.
12
13 #     $XConsortium: develop.dt.src /main/5 1996/04/23 17:35:01 drk $
14
15 # ##########################################################################
16
17 set DtDbVersion=1.0
18
19 # ##########################################################################
20
21 # WARNING:  This file may be overwritten in subsequent installations of
22 #     the Common Desktop Environment (CDE).  Consequently, any system wide
23 #     changes should be made to an equivalent database file in
24 #     /etc/dt/types and not in this file.
25
26 # ##########################################################################
27
28 # ##################################################################
29
30 # Data Attributes
31
32 # ##################################################################
33 DATA_ATTRIBUTES CORE
34 {
35         ACTIONS         (None)
36         ICON            Dtcore
37         MIME_TYPE       application/octet-stream
38         SUNV3_TYPE      corefile
39         DESCRIPTION     This file contains a core image of a process \
40                         that terminated abnormally.  Its data type is \
41                         named CORE.
42         TYPE_LABEL      CORE
43 }
44 DATA_CRITERIA CORE1
45 {
46         DATA_ATTRIBUTES_NAME CORE
47         MODE            f
48         NAME_PATTERN    core
49 }
50 DATA_CRITERIA CORE2
51 {
52         DATA_ATTRIBUTES_NAME CORE
53         MODE            f
54         NAME_PATTERN    core*
55 }
56 ACTION Print
57 {
58         LABEL           Print
59         ARG_TYPE        CORE
60         TYPE            MAP
61         MAP_ACTION      NoPrint
62 }
63
64 # ###########################################################
65
66 DATA_ATTRIBUTES OBJECT
67 {
68         ACTIONS         Open,Print
69         ICON            Dtbin
70         NAME_TEMPLATE   %s.o
71         MIME_TYPE       application/octet-stream
72         SUNV3_TYPE      o-file
73         DESCRIPTION     This file contains binary data that a compiler \
74                         has produced from a source file.  Its data type \
75                         is named OBJECT.  OBJECT files have names ending \
76                         with '.o'.
77         TYPE_LABEL      OBJECT
78 }
79 DATA_CRITERIA OBJECT1
80 {
81         DATA_ATTRIBUTES_NAME OBJECT
82         MODE            f
83         NAME_PATTERN    *.o
84 }
85 ACTION Open
86 {
87         LABEL           Open
88         ARG_TYPE        OBJECT
89         TYPE            MAP
90         MAP_ACTION      Nm
91 }
92 ACTION Print
93 {
94         LABEL           Print
95         ARG_TYPE        OBJECT
96         TYPE            MAP
97         MAP_ACTION      PrintNm
98 }
99
100 # ###########################################################
101
102 DATA_ATTRIBUTES ASSEMBLER
103 {
104         ACTIONS         Open,Print
105         ICON            Dtbin
106         IS_TEXT         true
107         NAME_TEMPLATE   %s.s
108         MIME_TYPE       text/plain
109         SUNV3_TYPE      text
110         DESCRIPTION     This file contains assembler code for a given \
111                         architecture.  Its data type is named ASSEMBLER. \
112                         ASSEMBLER files have names ending with '.s'. 
113         TYPE_LABEL      ASSEMBLER
114 }
115 DATA_CRITERIA ASSEMBLER1
116 {
117         DATA_ATTRIBUTES_NAME ASSEMBLER
118         MODE            f
119         NAME_PATTERN    *.s
120 }
121
122 # ###########################################################
123
124 DATA_ATTRIBUTES ARCH_LIB
125 {
126         ACTIONS         Open,Print
127         ICON            Dtbinml
128         MIME_TYPE       application/octet-stream
129         DESCRIPTION     This file contains an archived libarary of \
130                         object files.  Its data type is named ARCH_LIB. \
131                         ARCH_LIB files have names ending with '.a'.
132         TYPE_LABEL      ARCH_LIB
133 }
134 DATA_CRITERIA ARCH_LIB1
135 {
136         DATA_ATTRIBUTES_NAME ARCH_LIB
137         MODE            f
138         NAME_PATTERN    *.a
139 }
140 ACTION Open
141 {
142         LABEL           Open
143         ARG_TYPE        ARCH_LIB
144         TYPE            MAP
145         MAP_ACTION      Nm
146 }
147 ACTION Print
148 {
149         LABEL           Print
150         ARG_TYPE        ARCH_LIB
151         TYPE            MAP
152         MAP_ACTION      PrintNm
153 }
154
155 # ###########################################################
156
157 DATA_ATTRIBUTES SHARED_LIB
158 {
159         ACTIONS         Open,Print
160         ICON            Dtbinml
161         MIME_TYPE       application/octet-stream
162         DESCRIPTION     This files contains a shared library of an \
163                         object file.  Its data type is named SHARED_LIB. \
164                         SHARD_LIB files have names ending with '.sl' or '.so'.
165         TYPE_LABEL      SHARED_LIB
166 }
167 DATA_CRITERIA SHARED_LIB1
168 {
169         DATA_ATTRIBUTES_NAME SHARED_LIB
170         MODE            f
171         NAME_PATTERN    *.sl
172 }
173 DATA_CRITERIA SHARED_LIB2
174 {
175         DATA_ATTRIBUTES_NAME SHARED_LIB
176         MODE            f
177         NAME_PATTERN    *.so
178 }
179 DATA_CRITERIA SHARED_LIB3
180 {
181         DATA_ATTRIBUTES_NAME SHARED_LIB
182         MODE            f
183         NAME_PATTERN    *.so*
184 }
185 ACTION Open
186 {
187         LABEL           Open
188         ARG_TYPE        SHARED_LIB
189         TYPE            MAP
190         MAP_ACTION      Nm
191 }
192 ACTION Print
193 {
194         LABEL           Print
195         ARG_TYPE        SHARED_LIB
196         TYPE            MAP
197         MAP_ACTION      PrintNm
198 }
199
200 # ###########################################################
201
202 DATA_ATTRIBUTES C_SRC
203 {
204         ACTIONS         Open,Make,Print
205         ICON            DtdotC
206         IS_TEXT         true
207         NAME_TEMPLATE   %s.c
208         MIME_TYPE       text/plain
209         SUNV3_TYPE      c-file
210         DESCRIPTION     This file is a source file in the C \
211                         programming language.  Its data type is named \
212                         C_SRC.  C_SRC files have names ending with '.c'.
213         TYPE_LABEL      C_SRC
214 }
215 DATA_CRITERIA C_SRC1
216 {
217         DATA_ATTRIBUTES_NAME C_SRC
218         MODE            f
219         NAME_PATTERN    *.c
220 }
221 ACTION Make
222 {
223         LABEL           Make
224         TYPE            COMMAND
225         ARG_TYPE        C_SRC
226         WINDOW_TYPE     PERM_TERMINAL
227         EXEC_STRING     sh -c '             make `basename "%(File)Arg_1%" .c`.o 2>&1 | \${PAGER:-more};             echo "\\n*** Select Close or Exit from the window menu to close this window ***"'
228
229
230         DESCRIPTION     The Make command for C_SRC files uses the Unix \
231                         'make' command to make the associated object file.
232 }
233
234 # ###########################################################
235
236 DATA_ATTRIBUTES CPLUSPLUS_SRC
237 {
238         ACTIONS         Open,Make,Print
239         ICON            DtC++
240         IS_TEXT         true
241         NAME_TEMPLATE   %s.C
242         MIME_TYPE       text/plain
243         DESCRIPTION     This is a a source file in the C++ programming \
244                         language.  Its data type is named CPLUSPLUS_SRC. \
245                         CPLUSPLUS_SRC files have names ending with '.C' \
246                         or '.cc'.
247         TYPE_LABEL      CPLUSPLUS_SRC
248 }
249 DATA_CRITERIA C_PLUSPLUS1
250 {
251         DATA_ATTRIBUTES_NAME CPLUSPLUS_SRC
252         MODE            f
253         NAME_PATTERN    *.C
254 }
255 DATA_CRITERIA C_PLUSPLUS2
256 {
257         DATA_ATTRIBUTES_NAME CPLUSPLUS_SRC
258         MODE            f
259         NAME_PATTERN    *.cc
260 }
261 ACTION Make
262 {
263         LABEL           Make
264         TYPE            COMMAND
265         ARG_TYPE        CPLUSPLUS_SRC
266         WINDOW_TYPE     PERM_TERMINAL
267         EXEC_STRING     sh -c '             if [ -r "%(File)Arg_1%.C" ]; then                make `basename "%(File)Arg_1%" .C`.o 2>&1 | \${PAGER:-more};             else                make `basename "%(File)Arg_1%" .cc`.o 2>&1 | \${PAGER:-more};             echo "\\n*** Select Close or Exit from the window menu to close this window ***"'
268
269
270
271
272
273         DESCRIPTION     The Make command for CPLUSPLUS_SRC files uses \
274                         the Unix 'make' command to make the associated \
275                         object file.
276 }
277
278 # ###########################################################
279
280 DATA_ATTRIBUTES H_SRC
281 {
282         ACTIONS         Open,Print
283         ICON            DtdotH
284         IS_TEXT         true
285         NAME_TEMPLATE   %s.h
286         MIME_TYPE       text/plain
287         SUNV3_TYPE      h-file
288         DESCRIPTION     This is a C-language program header file. Its \
289                         data type is named H_SRC.  H_SRC files have names \
290                         ending with *.h.
291         TYPE_LABEL      H_SRC
292 }
293 DATA_CRITERIA H_SRC1
294 {
295         DATA_ATTRIBUTES_NAME H_SRC
296         MODE            f
297         NAME_PATTERN    *.h
298 }
299
300 # ###########################################################
301
302 DATA_ATTRIBUTES MAKEFILE
303 {
304         ACTIONS         Open,Make,Print
305         ICON            DtbigM
306         IS_TEXT         true
307         NAME_TEMPLATE   Makefile
308         MIME_TYPE       text/plain
309         SUNV3_TYPE      Makefile
310         DESCRIPTION     This is a Makefile. A Makefile describes \
311                         how to generate an executable file from a set of \
312                         source files.  It is used by the make command.  \
313                         Its data type is named MAKEFILE.  MAKEFILE files \
314                         must be named Makefile or makefile, or have names \
315                         starting with Makefile or makefile, or have names \
316                         ending with '.mk'.
317         TYPE_LABEL      MAKEFILE
318 }
319 DATA_CRITERIA MAKEFILE1
320 {
321         DATA_ATTRIBUTES_NAME MAKEFILE
322         MODE            f
323         NAME_PATTERN    [Mm]akefile*
324 }
325 DATA_CRITERIA MAKEFILE2
326 {
327         DATA_ATTRIBUTES_NAME MAKEFILE
328         MODE            f
329         NAME_PATTERN    *.mk
330 }
331 ACTION Make
332 {
333         LABEL           Make
334         TYPE            COMMAND
335         ARG_TYPE        MAKEFILE
336         WINDOW_TYPE     PERM_TERMINAL
337         EXEC_STRING     sh -c '             make -f "%(File)Arg_1%" %"Target to Make:"% 2>&1 | \${PAGER:-more};             echo "\\n*** Select Close or Exit from the window menu to close this window ***"'
338
339
340         DESCRIPTION     The Make action for Makefiles prompts for the \
341                         target to make, and then uses the Unix 'make' \
342                         command to make it.  If target is left empty \
343                         the command makes 'all' in the current folder.
344 }
345
346
347 # ###########################################################
348
349 DATA_ATTRIBUTES IMAKEFILE
350 {
351         ACTIONS         Open,Make,Print
352         ICON            Dtimake
353         IS_TEXT         true
354         NAME_TEMPLATE   Imakefile
355         MIME_TYPE       text/plain
356         DESCRIPTION     This is an Imakefile. An Imakefile describes \
357                         how to generate an executable file from a set of \
358                         source files.  It is used by the make command.  \
359                         Its data type is named IMAKEFILE.  IMAKEFILE files \
360                         are named imakefile or Imakefile, or have names \
361                         starting with imakefile or Imakefile.
362         TYPE_LABEL      IMAKEFILE
363 }
364 DATA_CRITERIA IMAKEFILE1
365 {
366         DATA_ATTRIBUTES_NAME IMAKEFILE
367         MODE            f
368         NAME_PATTERN    [Ii]makefile*
369 }
370 ACTION Make
371 {
372         LABEL           Make
373         TYPE            COMMAND
374         ARG_TYPE        IMAKEFILE
375         WINDOW_TYPE     PERM_TERMINAL
376         EXEC_STRING     sh -c '             make Makefile 2>&1 | \${PAGER:-more};             echo "\\n*** Select Close or Exit from the window menu to close this window ***"'
377
378
379         DESCRIPTION     The Make command for Imakefile files uses the Unix \
380                         'make' command to make the associated Makefile.
381 }
382
383 # ##########################################################################
384 # ##########################################################################
385
386 # Actions
387
388 # ##########################################################################
389
390 ACTION Nm
391 {
392         LABEL           Symbols List
393         TYPE            COMMAND
394         WINDOW_TYPE     PERM_TERMINAL
395         EXEC_STRING     sh -c '                  nm "%(File)Arg_1"Filename:"%" 2>&1 | \${PAGER:-more};                  echo "\\n*** Select Close or Exit from the window menu to close this window ***"'
396
397
398         DESCRIPTION     The Symbols List (Nm) action lists the symbol \
399                         table of an object file or library file.  It uses \
400                         the 'nm' command.
401 }
402 ACTION PrintNm
403 {
404         LABEL           Print Symbol List
405         TYPE            COMMAND
406         WINDOW_TYPE     NO_STDIO
407         EXEC_STRING     /bin/sh -c ' nm "%(File)Arg_1%" |                         /usr/dt/bin/dtlp -u "Symbols List"'
408
409         DESCRIPTION     The Print Symbol List (PrintNm) action prints \
410                         the output from the 'nm' command on the default printer.
411 }
412
413
414 ACTION Make
415 {
416         LABEL           Make
417         TYPE            COMMAND
418         ARG_COUNT       0
419         WINDOW_TYPE     PERM_TERMINAL
420         EXEC_STRING               sh -c '             make -f "%(File)Arg_1"Makefile:"%" %"Target to Make:"% 2>&1 |               \${PAGER:-more};             echo "\\n*** Select Close or Exit from the window menu to close this window ***"'
421
422
423
424
425         DESCRIPTION     The Make action for no arguments prompts for \
426                         a Makefile and target, and then uses the Unix \
427                         'make' command to make it.
428 }
429 # ######################## EOF ############################################