util/dttypes: remove register keyword
[oweals/cde.git] / cde / programs / dtudcexch / excutil.h
1 /*
2  * CDE - Common Desktop Environment
3  *
4  * Copyright (c) 1993-2012, The Open Group. All rights reserved.
5  *
6  * These libraries and programs are free software; you can
7  * redistribute them and/or modify them under the terms of the GNU
8  * Lesser General Public License as published by the Free Software
9  * Foundation; either version 2 of the License, or (at your option)
10  * any later version.
11  *
12  * These libraries and programs are distributed in the hope that
13  * they will be useful, but WITHOUT ANY WARRANTY; without even the
14  * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15  * PURPOSE. See the GNU Lesser General Public License for more
16  * details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with these libraries and programs; if not, write
20  * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
21  * Floor, Boston, MA 02110-1301 USA
22  */
23 /* $XConsortium: excutil.h /main/6 1996/12/23 08:48:26 barstow $ */
24 /*
25  *  (c) Copyright 1995 FUJITSU LIMITED
26  *  This is source code modified by FUJITSU LIMITED under the Joint
27  *  Development Agreement for the CDEnext PST.
28  *  This is unpublished proprietary source code of FUJITSU LIMITED
29  */
30
31 #include <stdio.h>
32 #include <stdlib.h>
33 #include <Xm/Xm.h>
34 #include <Xm/MessageB.h>
35 #include <Xm/PushB.h>
36 #define EXPORT  1
37 #define IMPORT  2
38 #define EXCERRMALLOC    101
39 #define EXCERRNOUDC     102
40
41 void    Ecs();
42 void    Ecd();
43 /*void  getpcffn();*/
44 void    getbdffn();
45 void    selcharcd();
46 void    getcharcd();
47 void    createbdf();
48 int     bigger();
49 int     smaller();
50 int     c2h();
51 char    *renge2num();
52 void    freeExcdata();
53 void    checkdata();
54 void    excexit();
55 void    excterminate();
56 void    freeld();
57 void    getexistcode();
58 void    AskUser();
59 void    excerror();
60 Widget  excCreatePushButton();
61
62 typedef struct {
63     char * charset;
64     char * udcrenge;
65 } UDCcsREC;
66
67 typedef struct {
68     int         function;
69     XtAppContext        app;
70     Widget      toplevel;
71     char        *locale;
72     int         csnum;
73     UDCcsREC    *cslist;
74     char        *xlfdname;
75     char        *style;
76     char        *size;
77     char        *fontfile;
78     char        *bdffile;
79     char        bdfmode[2];
80     char        *udcrenge;
81     int         code_num;
82     int         *gpf_code_list;
83     int         *bdf_code_list;
84     int         comment_num;
85     char        **comment_list;
86 } Exc_data;
87
88 typedef struct {
89     Widget      list;
90     int         allcode_num;
91     int         *allcode;
92     int         existcode_num;
93     int         *existcode;
94     char        **existcode_c;
95     Exc_data    *ed;
96 } ListData;
97
98 #ifndef NO_MESSAGE_CATALOG
99 # ifdef __ultrix
100 #  define _CLIENT_CAT_NAME "dtudcexch.cat"
101 # else  /* __ultrix */
102 #  define _CLIENT_CAT_NAME "dtudcexch"
103 # endif /* __ultrix */
104 # ifdef _NO_PROTO
105 extern char *_DtGetMessage();
106 # else  /* _NO_PROTO */
107 extern char *_DtGetMessage(
108                         char *filename,
109                         int set,
110                         int n,
111                         char *s );
112 # endif /* _NO_PROTO */
113 #define GETMESSAGE(set, number, string) GetMessage(set, number, string)
114 static char *
115 GetMessage(set, number, string)
116 int set, number;
117 char *string;
118 {
119     char *tmp;
120     static char * point[100];
121     static int first = True;
122
123     if (first) {
124         memset(point, 0, sizeof(char *) * 100);
125         first = False;
126     }
127     if (point[number])
128         return(point[number]);
129     tmp = _DtGetMessage(_CLIENT_CAT_NAME, set, number, string);
130     point[number] = (char *) malloc(strlen(tmp) + 1);
131     strcpy(point[number], tmp);
132     return (point[number]);
133
134 #else /* NO_MESSAGE_CATALOG */
135 # define GETMESSAGE(set, number, string)\
136     string
137 #endif /* NO_MESSAGE_CATALOG */