File: global.h

package info (click to toggle)
xtel 3.3.0-32
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,172 kB
  • sloc: ansic: 15,773; sh: 224; makefile: 29
file content (292 lines) | stat: -rw-r--r-- 8,571 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
/*	
 *   xtel - Emulateur MINITEL sous X11
 *
 *   Copyright (C) 1991-1996  Lectra Systemes & Pierre Ficheux
 *
 *   This program is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation; either version 2 of the License, or
 *   (at your option) any later version.
 *
 *   This program is distributed in the hope that it will be useful,
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *   GNU General Public License for more details.
 *
 *   You should have received a copy of the GNU General Public License
 *   along with this program; if not, write to the Free Software
 *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */
#ident "$Id: global.h,v 1.14 2001/02/10 23:58:59 pierre Exp $"

#ifndef _global_h
#define _global_h

#include <X11/IntrinsicP.h>

/*
 * pour rcuprer la config globale du programme
 */
#include "Config.tmpl"

#ifndef EXTERN
#define EXTERN extern
#endif 

/* 
 * Fonctions 
 */

#ifdef __STDC__

/* xtel.c */
void init_xtel(void);
void sauve_l_ecran(Widget w, XEvent *pevent, String  *params, Cardinal nb_params);
int main(int argc, char **argv);
void Usage (void);
void create_teleph_cursor (Widget);
void affiche_telephone (void);
void efface_telephone (void);

/* ligne.c */
void ce_n_est_qu_un_au_revoir(void);
void fonction_lecture_ligne(XtPointer client_data, int *fid, XtInputId *id);
void connexion_service(char *service);
void enregistre_caractere (Widget w, XtPointer client_data, char *s);

/* bouton.c */
void evenement_entre_widget(Widget w, char *client_data, XEvent *pevent);
void commandes(Widget w, char *code, XtPointer call_data);
int Charge(void);
void Sauve(void);
void composition_valide(int flag);
void clavier_minitel_valide(int flag);
void mise_a_jour_mode_emulation(int flag_invalide);
void raccrocher (Widget w, char *code, XtPointer call_data);
void demarre_enregistrement (Widget w, XtPointer client_data, XtPointer call_data);
void arrete_enregistrement (Widget w, XtPointer client_data, XtPointer call_data);
void nouvel_enregistrement (Widget w, XtPointer client_data, XtPointer call_data);
void change_enregistrement (Widget w, XtPointer client_data, XtPointer call_data);

/* inet.c */
int c_clientbyname(char *host, char *name);
int c_clientbyport(char *host, int port);
/* imprime.c */
void imprime_page_courante_ascii(Widget w, XtPointer client_data, XtPointer call_data);
void imprime_page_courante_videotex(Widget w, XtPointer client_data, XtPointer call_data);
/* lecteur.c */
void stop_rapide(void);
void fonction_lecture_fichier_courant(XtPointer client_data, int *fid, XtInputId *id);
void fin_lecteur(Widget w, XtPointer client_data, XtPointer call_data);
void Play_lecteur(Widget w, XtPointer client_data, XtPointer call_data);
void Stop_lecteur(Widget w, XtPointer client_data, XtPointer call_data);
void Zero_lecteur(Widget w, XtPointer client_data, XtPointer call_data);
void Rewind_lecteur(Widget w, XtPointer client_data, XtPointer call_data);
void Wind_lecteur(Widget w, XtPointer client_data, XtPointer call_data);
void raz_lecteur(void);
void debut_lecteur(void);

/* procedure.c */
int init_procedures(char *);
void start_procedure (int);
void start_procedure (int);
void run_procedure (char, int);
void display_procedures (void);
int get_proc_index (char *);

/* teleinfo.c */
void teleinfo(char *nom);
char conversion_teleinfo_fr(int car,int m);
void fonction_lecture_teleinfo(XtPointer client_data, int *fid, XtInputId *id);
void zigouille_xterm_teleinfo(void);
void selection_mode_emulation(Widget w, char *mode, XtPointer call_data);
void clear_reception ( void ) ;
int test_retour_videotex ( char car , int m ) ;

/* copyright.c */
void affiche_copyright(Widget w, WidgetClass classe_forme, Pixmap pixmap);

/* xm.c/xaw.c */
Widget init_toolkit(int *pargc, char **argv);
Widget init_widgets(Widget topLevel);
void affiche_erreur(char *s, int code_erreur);
void lecteur_valide(int flag);
void efface_lecteur(void);
void affiche_lecteur(void);
void affiche_compteur_lecteur_caractere(void);
void affiche_compteur_lecteur_page(void);
void activation_bouton_stop(void);

/* protocoles.c */
int init_protocoles (char *nom, struct protocole *proto);
void Selection_telechargement(Widget w, int protocole, XtPointer call_data);
void Stop_telechargement(Widget w, XtPointer client_data, XtPointer call_data);

/* misc.c */
char *xtel_basename(char *s);
char *next_token(char *, char *);
char *build_name(char *);
int check_existing_process (char *name);

#else

void init_xtel();
void sauve_l_ecran();
int main();
void Usage();
void create_teleph_cursor();
void affiche_telephone();
void efface_telephone();

void ce_n_est_qu_un_au_revoir();
void fonction_lecture_ligne();
void connexion_service();
void enregistre_caractere ();

void evenement_entre_widget();
void commandes();
char *xtel_basename();
int Charge();
void Sauve();
void composition_valide();
void clavier_minitel_valide();
void mise_a_jour_mode_emulation();
void raccrocher();
void demarre_enregistrement ();
void arrete_enregistrement ();
void nouvel_enregistrement ();
void change_enregistrement ();

int c_clientbyname();
int c_clientbyport();
void imprime_page_courante_ascii();
void imprime_page_courante_videotex();

void stop_rapide();
void fonction_lecture_fichier_courant();
void fin_lecteur();
void Play_lecteur();
void Stop_lecteur();
void Zero_lecteur();
void Rewind_lecteur();
void Wind_lecteur();
void raz_lecteur();
void debut_lecteur();

int init_procedures();
void start_procedure();
void start_procedure();
void run_procedure();
void display_procedures();
int get_proc_index();

void teleinfo();
char conversion_teleinfo_fr();
void fonction_lecture_teleinfo();
void zigouille_xterm_teleinfo();
void selection_mode_emulation();

void affiche_copyright();

Widget init_toolkit();
Widget init_widgets();
void affiche_erreur();
void lecteur_valide();
void efface_lecteur();
void affiche_lecteur();
void affiche_compteur_lecteur_caractere();
void affiche_compteur_lecteur_page();
void activation_bouton_stop();

int init_protocoles ();
void Selection_telechargement();
void Stop_telechargement();

char *next_token();
char *build_name();

#endif /* __STDC__ */

/* 
 * Variables 
 */
#ifndef HAS_STRERROR
extern char *sys_errlist[];
#define strerror(e) (sys_errlist[e])
#endif

/* xtel.c */
#ifdef NO_NETWORK
EXTERN struct sockaddr_un unaddr;
#endif /* NO_NETWORK */
EXTERN Widget ecran_minitel;		/* Widget Videotex */
EXTERN unsigned int  cpt_buffer;	/* nb de caracteres courant */
EXTERN Boolean flag_enregistrement;
EXTERN Boolean flag_arret_a_chaque_page;
EXTERN char type_de_fin_page;
EXTERN char sortie_violente;		/* Quit en cours de connexion */
EXTERN int nb_procedures;
EXTERN struct procedure procedures[MAXPROC];
EXTERN struct chat *chat_courant;
EXTERN char *serveur_xtel;
EXTERN char *zone_enregistrement;
EXTERN unsigned int taille_zone_enregistrement;
EXTERN char *toolkit_utilise;
EXTERN struct definition_service definition_services[MAX_SERVICES];
EXTERN int socket_xteld;
EXTERN String entree_compose[MAX_SERVICES];
EXTERN int nb_services;
EXTERN char mode_emulation;
EXTERN struct definition_touche touches[];
EXTERN XtAppContext app_context;
EXTERN char nom_fichier_sauve[256];
EXTERN char nom_fichier_charge[256];
EXTERN char numero_courant[256];
EXTERN ressources_xtel rsc_xtel;
EXTERN int nb_protocoles;
EXTERN struct protocole protocoles[MAXPROTO];
EXTERN unsigned long black_pixel, white_pixel;

/* bouton.c */
EXTERN long position_courante_fichier;
EXTERN unsigned int numero_page_courante;
EXTERN unsigned int numero_caractere_courant;

/* lecteur.c */
EXTERN char lecteur_play;

/* ligne.c */
EXTERN XtInputId input_id;

/* teleinfo.c */
EXTERN XtInputId input_id_teleinfo;
EXTERN int fd_teleinfo;
EXTERN int pid_teleinfo;

/* xm.c/xaw.c */
EXTERN char *toolkit_utilise;
EXTERN Widget bouton_compose;
EXTERN Widget bouton_procedure;
EXTERN Widget menu_clavier;
EXTERN Widget menu_terminal;
EXTERN Widget menu_fichier;
EXTERN Widget boite_bas;
EXTERN Widget btn_direct;
EXTERN Widget timer_minitel;
EXTERN WidgetClass classe_forme_copyright;
EXTERN Widget stop_tele;
EXTERN Widget bouton_proto;
EXTERN Widget teleph;
EXTERN Widget bouton_demarre, bouton_arrete;
EXTERN Widget la_cassete;

/* copyright.c */
EXTERN Boolean flag_copyright_affiche;
EXTERN Boolean low_memory;

/* version.c */
extern char version_xtel;
extern char revision_xtel;
extern char prototype_xtel;

#endif