-
Notifications
You must be signed in to change notification settings - Fork 0
/
ee.rs
7088 lines (7088 loc) · 249 KB
/
ee.rs
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
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#![allow(dead_code, mutable_transmutes, non_camel_case_types, non_snake_case, non_upper_case_globals, unused_assignments, unused_mut)]
#![feature(extern_types)]
use ::ee_lib::*;
extern "C" {
pub type _IO_wide_data;
pub type _IO_codecvt;
pub type _IO_marker;
pub type _win_st;
fn clearok(_: *mut WINDOW, _: bool) -> libc::c_int;
fn delwin(_: *mut WINDOW) -> libc::c_int;
fn echo() -> libc::c_int;
fn endwin() -> libc::c_int;
fn idlok(_: *mut WINDOW, _: bool) -> libc::c_int;
fn initscr() -> *mut WINDOW;
fn keypad(_: *mut WINDOW, _: bool) -> libc::c_int;
fn newwin(
_: libc::c_int,
_: libc::c_int,
_: libc::c_int,
_: libc::c_int,
) -> *mut WINDOW;
fn nl() -> libc::c_int;
fn noecho() -> libc::c_int;
fn nonl() -> libc::c_int;
fn noraw() -> libc::c_int;
fn raw() -> libc::c_int;
fn resetty() -> libc::c_int;
fn reset_prog_mode() -> libc::c_int;
fn savetty() -> libc::c_int;
fn waddch(_: *mut WINDOW, _: chtype) -> libc::c_int;
fn waddnstr(_: *mut WINDOW, _: *const libc::c_char, _: libc::c_int) -> libc::c_int;
fn wattrset(_: *mut WINDOW, _: libc::c_int) -> libc::c_int;
fn wclrtobot(_: *mut WINDOW) -> libc::c_int;
fn wclrtoeol(_: *mut WINDOW) -> libc::c_int;
fn werase(_: *mut WINDOW) -> libc::c_int;
fn wgetch(_: *mut WINDOW) -> libc::c_int;
fn winsdelln(_: *mut WINDOW, _: libc::c_int) -> libc::c_int;
fn wmove(_: *mut WINDOW, _: libc::c_int, _: libc::c_int) -> libc::c_int;
fn wnoutrefresh(_: *mut WINDOW) -> libc::c_int;
fn wprintw(_: *mut WINDOW, _: *const libc::c_char, _: ...) -> libc::c_int;
fn wrefresh(_: *mut WINDOW) -> libc::c_int;
fn wtouchln(
_: *mut WINDOW,
_: libc::c_int,
_: libc::c_int,
_: libc::c_int,
) -> libc::c_int;
fn getmaxy(_: *const WINDOW) -> libc::c_int;
fn fputs(__s: *const libc::c_char, __stream: *mut FILE) -> libc::c_int;
fn fgets(
__s: *mut libc::c_char,
__n: libc::c_int,
__stream: *mut FILE,
) -> *mut libc::c_char;
fn putchar(__c: libc::c_int) -> libc::c_int;
fn putc(__c: libc::c_int, __stream: *mut FILE) -> libc::c_int;
fn getchar() -> libc::c_int;
static mut stdout: *mut FILE;
static mut stderr: *mut FILE;
fn fclose(__stream: *mut FILE) -> libc::c_int;
fn fflush(__stream: *mut FILE) -> libc::c_int;
fn fopen(_: *const libc::c_char, _: *const libc::c_char) -> *mut FILE;
fn fprintf(_: *mut FILE, _: *const libc::c_char, _: ...) -> libc::c_int;
fn sprintf(_: *mut libc::c_char, _: *const libc::c_char, _: ...) -> libc::c_int;
static mut stdscr: *mut WINDOW;
static mut COLS: libc::c_int;
static mut LINES: libc::c_int;
fn __ctype_b_loc() -> *mut *const libc::c_ushort;
fn tolower(_: libc::c_int) -> libc::c_int;
fn toupper(_: libc::c_int) -> libc::c_int;
fn signal(__sig: libc::c_int, __handler: __sighandler_t) -> __sighandler_t;
fn open(__file: *const libc::c_char, __oflag: libc::c_int, _: ...) -> libc::c_int;
fn stat(__file: *const libc::c_char, __buf: *mut stat) -> libc::c_int;
fn __errno_location() -> *mut libc::c_int;
fn strcpy(_: *mut libc::c_char, _: *const libc::c_char) -> *mut libc::c_char;
fn strcat(_: *mut libc::c_char, _: *const libc::c_char) -> *mut libc::c_char;
fn strcmp(_: *const libc::c_char, _: *const libc::c_char) -> libc::c_int;
fn strlen(_: *const libc::c_char) -> libc::c_ulong;
fn strrchr(_: *const libc::c_char, _: libc::c_int) -> *mut libc::c_char;
fn strchr(_: *const libc::c_char, _: libc::c_int) -> *mut libc::c_char;
fn getpwuid(__uid: __uid_t) -> *mut passwd;
fn getpwnam(__name: *const libc::c_char) -> *mut passwd;
fn setlocale(
__category: libc::c_int,
__locale: *const libc::c_char,
) -> *mut libc::c_char;
fn wait(__stat_loc: *mut libc::c_int) -> __pid_t;
fn atoi(__nptr: *const libc::c_char) -> libc::c_int;
fn malloc(_: libc::c_ulong) -> *mut libc::c_void;
fn realloc(_: *mut libc::c_void, _: libc::c_ulong) -> *mut libc::c_void;
fn free(_: *mut libc::c_void);
fn exit(_: libc::c_int) -> !;
fn getenv(__name: *const libc::c_char) -> *mut libc::c_char;
fn mkstemp(__template: *mut libc::c_char) -> libc::c_int;
fn access(__name: *const libc::c_char, __type: libc::c_int) -> libc::c_int;
fn close(__fd: libc::c_int) -> libc::c_int;
fn read(__fd: libc::c_int, __buf: *mut libc::c_void, __nbytes: size_t) -> ssize_t;
fn write(__fd: libc::c_int, __buf: *const libc::c_void, __n: size_t) -> ssize_t;
fn pipe(__pipedes: *mut libc::c_int) -> libc::c_int;
fn dup(__fd: libc::c_int) -> libc::c_int;
fn execl(
__path: *const libc::c_char,
__arg: *const libc::c_char,
_: ...
) -> libc::c_int;
fn getuid() -> __uid_t;
fn fork() -> __pid_t;
fn isatty(__fd: libc::c_int) -> libc::c_int;
fn link(__from: *const libc::c_char, __to: *const libc::c_char) -> libc::c_int;
fn unlink(__name: *const libc::c_char) -> libc::c_int;
fn catopen(__cat_name: *const libc::c_char, __flag: libc::c_int) -> nl_catd;
fn catgets(
__catalog: nl_catd,
__set: libc::c_int,
__number: libc::c_int,
__string: *const libc::c_char,
) -> *mut libc::c_char;
fn catclose(__catalog: nl_catd) -> libc::c_int;
}
pub type __dev_t = libc::c_ulong;
pub type __uid_t = libc::c_uint;
pub type __gid_t = libc::c_uint;
pub type __ino_t = libc::c_ulong;
pub type __mode_t = libc::c_uint;
pub type __nlink_t = libc::c_ulong;
pub type __off_t = libc::c_long;
pub type __off64_t = libc::c_long;
pub type __pid_t = libc::c_int;
pub type __time_t = libc::c_long;
pub type __blksize_t = libc::c_long;
pub type __blkcnt_t = libc::c_long;
pub type __ssize_t = libc::c_long;
pub type __syscall_slong_t = libc::c_long;
pub type chtype = libc::c_uint;
pub type size_t = libc::c_ulong;
#[derive(Copy, Clone)]
#[repr(C)]
pub struct _IO_FILE {
pub _flags: libc::c_int,
pub _IO_read_ptr: *mut libc::c_char,
pub _IO_read_end: *mut libc::c_char,
pub _IO_read_base: *mut libc::c_char,
pub _IO_write_base: *mut libc::c_char,
pub _IO_write_ptr: *mut libc::c_char,
pub _IO_write_end: *mut libc::c_char,
pub _IO_buf_base: *mut libc::c_char,
pub _IO_buf_end: *mut libc::c_char,
pub _IO_save_base: *mut libc::c_char,
pub _IO_backup_base: *mut libc::c_char,
pub _IO_save_end: *mut libc::c_char,
pub _markers: *mut _IO_marker,
pub _chain: *mut _IO_FILE,
pub _fileno: libc::c_int,
pub _flags2: libc::c_int,
pub _old_offset: __off_t,
pub _cur_column: libc::c_ushort,
pub _vtable_offset: libc::c_schar,
pub _shortbuf: [libc::c_char; 1],
pub _lock: *mut libc::c_void,
pub _offset: __off64_t,
pub _codecvt: *mut _IO_codecvt,
pub _wide_data: *mut _IO_wide_data,
pub _freeres_list: *mut _IO_FILE,
pub _freeres_buf: *mut libc::c_void,
pub __pad5: size_t,
pub _mode: libc::c_int,
pub _unused2: [libc::c_char; 20],
}
pub type _IO_lock_t = ();
pub type FILE = _IO_FILE;
pub type ssize_t = __ssize_t;
pub type WINDOW = _win_st;
pub type C2RustUnnamed = libc::c_uint;
pub const _ISalnum: C2RustUnnamed = 8;
pub const _ISpunct: C2RustUnnamed = 4;
pub const _IScntrl: C2RustUnnamed = 2;
pub const _ISblank: C2RustUnnamed = 1;
pub const _ISgraph: C2RustUnnamed = 32768;
pub const _ISprint: C2RustUnnamed = 16384;
pub const _ISspace: C2RustUnnamed = 8192;
pub const _ISxdigit: C2RustUnnamed = 4096;
pub const _ISdigit: C2RustUnnamed = 2048;
pub const _ISalpha: C2RustUnnamed = 1024;
pub const _ISlower: C2RustUnnamed = 512;
pub const _ISupper: C2RustUnnamed = 256;
#[derive(Copy, Clone)]
#[repr(C)]
pub struct timespec {
pub tv_sec: __time_t,
pub tv_nsec: __syscall_slong_t,
}
pub type __sighandler_t = Option::<unsafe extern "C" fn(libc::c_int) -> ()>;
#[derive(Copy, Clone)]
#[repr(C)]
pub struct stat {
pub st_dev: __dev_t,
pub st_ino: __ino_t,
pub st_nlink: __nlink_t,
pub st_mode: __mode_t,
pub st_uid: __uid_t,
pub st_gid: __gid_t,
pub __pad0: libc::c_int,
pub st_rdev: __dev_t,
pub st_size: __off_t,
pub st_blksize: __blksize_t,
pub st_blocks: __blkcnt_t,
pub st_atim: timespec,
pub st_mtim: timespec,
pub st_ctim: timespec,
pub __glibc_reserved: [__syscall_slong_t; 3],
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct passwd {
pub pw_name: *mut libc::c_char,
pub pw_passwd: *mut libc::c_char,
pub pw_uid: __uid_t,
pub pw_gid: __gid_t,
pub pw_gecos: *mut libc::c_char,
pub pw_dir: *mut libc::c_char,
pub pw_shell: *mut libc::c_char,
}
pub type nl_catd = *mut libc::c_void;
#[derive(Copy, Clone)]
#[repr(C)]
pub struct text {
pub line: *mut libc::c_uchar,
pub line_number: libc::c_int,
pub line_length: libc::c_int,
pub max_length: libc::c_int,
pub next_line: *mut text,
pub prev_line: *mut text,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct files {
pub name: *mut libc::c_uchar,
pub next_name: *mut files,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct menu_entries {
pub item_string: *mut libc::c_char,
pub procedure: Option::<unsafe extern "C" fn(*mut menu_entries) -> libc::c_int>,
pub ptr_argument: *mut menu_entries,
pub iprocedure: Option::<unsafe extern "C" fn(libc::c_int) -> libc::c_int>,
pub nprocedure: Option::<unsafe extern "C" fn() -> ()>,
pub argument: libc::c_int,
}
#[no_mangle]
pub static mut ee_copyright_message: *mut libc::c_char = b"Copyright (c) 1986, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 2009 Hugh Mahon \0"
as *const u8 as *const libc::c_char as *mut libc::c_char;
#[no_mangle]
pub static mut version: *mut libc::c_char = b"@(#) ee, version 1.5.2 $Revision: 1.104 $\0"
as *const u8 as *const libc::c_char as *mut libc::c_char;
#[no_mangle]
pub static mut catalog: nl_catd = 0 as *const libc::c_void as *mut libc::c_void;
#[no_mangle]
pub static mut first_line: *mut text = 0 as *const text as *mut text;
#[no_mangle]
pub static mut dlt_line: *mut text = 0 as *const text as *mut text;
#[no_mangle]
pub static mut curr_line: *mut text = 0 as *const text as *mut text;
#[no_mangle]
pub static mut tmp_line: *mut text = 0 as *const text as *mut text;
#[no_mangle]
pub static mut srch_line: *mut text = 0 as *const text as *mut text;
#[no_mangle]
pub static mut top_of_stack: *mut files = 0 as *const files as *mut files;
#[no_mangle]
pub static mut d_wrd_len: libc::c_int = 0;
#[no_mangle]
pub static mut position: libc::c_int = 0;
#[no_mangle]
pub static mut scr_pos: libc::c_int = 0;
#[no_mangle]
pub static mut scr_vert: libc::c_int = 0;
#[no_mangle]
pub static mut scr_horz: libc::c_int = 0;
#[no_mangle]
pub static mut absolute_lin: libc::c_int = 0;
#[no_mangle]
pub static mut tmp_vert: libc::c_int = 0;
#[no_mangle]
pub static mut tmp_horz: libc::c_int = 0;
#[no_mangle]
pub static mut input_file: libc::c_int = 0;
#[no_mangle]
pub static mut recv_file: libc::c_int = 0;
#[no_mangle]
pub static mut edit: libc::c_int = 0;
#[no_mangle]
pub static mut gold: libc::c_int = 0;
#[no_mangle]
pub static mut fildes: libc::c_int = 0;
#[no_mangle]
pub static mut case_sen: libc::c_int = 0;
#[no_mangle]
pub static mut last_line: libc::c_int = 0;
#[no_mangle]
pub static mut last_col: libc::c_int = 0;
#[no_mangle]
pub static mut horiz_offset: libc::c_int = 0 as libc::c_int;
#[no_mangle]
pub static mut clear_com_win: libc::c_int = 0;
#[no_mangle]
pub static mut text_changes: libc::c_int = 0 as libc::c_int;
#[no_mangle]
pub static mut get_fd: libc::c_int = 0;
#[no_mangle]
pub static mut info_window: libc::c_int = 1 as libc::c_int;
#[no_mangle]
pub static mut info_type: libc::c_int = 1 as libc::c_int;
#[no_mangle]
pub static mut expand_tabs: libc::c_int = 1 as libc::c_int;
#[no_mangle]
pub static mut right_margin: libc::c_int = 0 as libc::c_int;
#[no_mangle]
pub static mut observ_margins: libc::c_int = 1 as libc::c_int;
#[no_mangle]
pub static mut shell_fork: libc::c_int = 0;
#[no_mangle]
pub static mut temp_stdin: libc::c_int = 0;
#[no_mangle]
pub static mut temp_stdout: libc::c_int = 0;
#[no_mangle]
pub static mut temp_stderr: libc::c_int = 0;
#[no_mangle]
pub static mut pipe_out: [libc::c_int; 2] = [0; 2];
#[no_mangle]
pub static mut pipe_in: [libc::c_int; 2] = [0; 2];
#[no_mangle]
pub static mut out_pipe: libc::c_int = 0;
#[no_mangle]
pub static mut in_pipe: libc::c_int = 0;
#[no_mangle]
pub static mut formatted: libc::c_int = 0 as libc::c_int;
#[no_mangle]
pub static mut auto_format: libc::c_int = 0 as libc::c_int;
#[no_mangle]
pub static mut restricted: libc::c_int = 0 as libc::c_int;
#[no_mangle]
pub static mut nohighlight: libc::c_int = 0 as libc::c_int;
#[no_mangle]
pub static mut eightbit: libc::c_int = 1 as libc::c_int;
#[no_mangle]
pub static mut local_LINES: libc::c_int = 0 as libc::c_int;
#[no_mangle]
pub static mut local_COLS: libc::c_int = 0 as libc::c_int;
#[no_mangle]
pub static mut curses_initialized: libc::c_int = 0 as libc::c_int;
#[no_mangle]
pub static mut emacs_keys_mode: libc::c_int = 0 as libc::c_int;
#[no_mangle]
pub static mut ee_chinese: libc::c_int = 0 as libc::c_int;
#[no_mangle]
pub static mut point: *mut libc::c_uchar = 0 as *const libc::c_uchar
as *mut libc::c_uchar;
#[no_mangle]
pub static mut srch_str: *mut libc::c_uchar = 0 as *const libc::c_uchar
as *mut libc::c_uchar;
#[no_mangle]
pub static mut u_srch_str: *mut libc::c_uchar = 0 as *const libc::c_uchar
as *mut libc::c_uchar;
#[no_mangle]
pub static mut srch_1: *mut libc::c_uchar = 0 as *const libc::c_uchar
as *mut libc::c_uchar;
#[no_mangle]
pub static mut srch_2: *mut libc::c_uchar = 0 as *const libc::c_uchar
as *mut libc::c_uchar;
#[no_mangle]
pub static mut srch_3: *mut libc::c_uchar = 0 as *const libc::c_uchar
as *mut libc::c_uchar;
#[no_mangle]
pub static mut in_file_name: *mut libc::c_uchar = 0 as *const libc::c_uchar
as *mut libc::c_uchar;
#[no_mangle]
pub static mut tmp_file: *mut libc::c_char = 0 as *const libc::c_char
as *mut libc::c_char;
#[no_mangle]
pub static mut d_char: *mut libc::c_uchar = 0 as *const libc::c_uchar
as *mut libc::c_uchar;
#[no_mangle]
pub static mut d_word: *mut libc::c_uchar = 0 as *const libc::c_uchar
as *mut libc::c_uchar;
#[no_mangle]
pub static mut d_line: *mut libc::c_uchar = 0 as *const libc::c_uchar
as *mut libc::c_uchar;
#[no_mangle]
pub static mut in_string: [libc::c_char; 513] = [0; 513];
#[no_mangle]
pub static mut print_command: *mut libc::c_uchar = b"lpr\0" as *const u8
as *const libc::c_char as *mut libc::c_uchar;
#[no_mangle]
pub static mut start_at_line: *mut libc::c_uchar = 0 as *const libc::c_uchar
as *mut libc::c_uchar;
#[export_name = "in"]
pub static mut in_0: libc::c_int = 0;
#[no_mangle]
pub static mut temp_fp: *mut FILE = 0 as *const FILE as *mut FILE;
#[no_mangle]
pub static mut bit_bucket: *mut FILE = 0 as *const FILE as *mut FILE;
#[no_mangle]
pub static mut table: [*mut libc::c_char; 32] = [
b"^@\0" as *const u8 as *const libc::c_char as *mut libc::c_char,
b"^A\0" as *const u8 as *const libc::c_char as *mut libc::c_char,
b"^B\0" as *const u8 as *const libc::c_char as *mut libc::c_char,
b"^C\0" as *const u8 as *const libc::c_char as *mut libc::c_char,
b"^D\0" as *const u8 as *const libc::c_char as *mut libc::c_char,
b"^E\0" as *const u8 as *const libc::c_char as *mut libc::c_char,
b"^F\0" as *const u8 as *const libc::c_char as *mut libc::c_char,
b"^G\0" as *const u8 as *const libc::c_char as *mut libc::c_char,
b"^H\0" as *const u8 as *const libc::c_char as *mut libc::c_char,
b"\t\0" as *const u8 as *const libc::c_char as *mut libc::c_char,
b"^J\0" as *const u8 as *const libc::c_char as *mut libc::c_char,
b"^K\0" as *const u8 as *const libc::c_char as *mut libc::c_char,
b"^L\0" as *const u8 as *const libc::c_char as *mut libc::c_char,
b"^M\0" as *const u8 as *const libc::c_char as *mut libc::c_char,
b"^N\0" as *const u8 as *const libc::c_char as *mut libc::c_char,
b"^O\0" as *const u8 as *const libc::c_char as *mut libc::c_char,
b"^P\0" as *const u8 as *const libc::c_char as *mut libc::c_char,
b"^Q\0" as *const u8 as *const libc::c_char as *mut libc::c_char,
b"^R\0" as *const u8 as *const libc::c_char as *mut libc::c_char,
b"^S\0" as *const u8 as *const libc::c_char as *mut libc::c_char,
b"^T\0" as *const u8 as *const libc::c_char as *mut libc::c_char,
b"^U\0" as *const u8 as *const libc::c_char as *mut libc::c_char,
b"^V\0" as *const u8 as *const libc::c_char as *mut libc::c_char,
b"^W\0" as *const u8 as *const libc::c_char as *mut libc::c_char,
b"^X\0" as *const u8 as *const libc::c_char as *mut libc::c_char,
b"^Y\0" as *const u8 as *const libc::c_char as *mut libc::c_char,
b"^Z\0" as *const u8 as *const libc::c_char as *mut libc::c_char,
b"^[\0" as *const u8 as *const libc::c_char as *mut libc::c_char,
b"^\\\0" as *const u8 as *const libc::c_char as *mut libc::c_char,
b"^]\0" as *const u8 as *const libc::c_char as *mut libc::c_char,
b"^^\0" as *const u8 as *const libc::c_char as *mut libc::c_char,
b"^_\0" as *const u8 as *const libc::c_char as *mut libc::c_char,
];
#[no_mangle]
pub static mut com_win: *mut WINDOW = 0 as *const WINDOW as *mut WINDOW;
#[no_mangle]
pub static mut text_win: *mut WINDOW = 0 as *const WINDOW as *mut WINDOW;
#[no_mangle]
pub static mut help_win: *mut WINDOW = 0 as *const WINDOW as *mut WINDOW;
#[no_mangle]
pub static mut info_win: *mut WINDOW = 0 as *const WINDOW as *mut WINDOW;
#[no_mangle]
pub static mut modes_menu: [menu_entries; 12] = unsafe {
[
{
let mut init = menu_entries {
item_string: b"\0" as *const u8 as *const libc::c_char
as *mut libc::c_char,
procedure: None,
ptr_argument: 0 as *const menu_entries as *mut menu_entries,
iprocedure: None,
nprocedure: None,
argument: 0 as libc::c_int,
};
init
},
{
let mut init = menu_entries {
item_string: b"\0" as *const u8 as *const libc::c_char
as *mut libc::c_char,
procedure: None,
ptr_argument: 0 as *const menu_entries as *mut menu_entries,
iprocedure: None,
nprocedure: None,
argument: -(1 as libc::c_int),
};
init
},
{
let mut init = menu_entries {
item_string: b"\0" as *const u8 as *const libc::c_char
as *mut libc::c_char,
procedure: None,
ptr_argument: 0 as *const menu_entries as *mut menu_entries,
iprocedure: None,
nprocedure: None,
argument: -(1 as libc::c_int),
};
init
},
{
let mut init = menu_entries {
item_string: b"\0" as *const u8 as *const libc::c_char
as *mut libc::c_char,
procedure: None,
ptr_argument: 0 as *const menu_entries as *mut menu_entries,
iprocedure: None,
nprocedure: None,
argument: -(1 as libc::c_int),
};
init
},
{
let mut init = menu_entries {
item_string: b"\0" as *const u8 as *const libc::c_char
as *mut libc::c_char,
procedure: None,
ptr_argument: 0 as *const menu_entries as *mut menu_entries,
iprocedure: None,
nprocedure: None,
argument: -(1 as libc::c_int),
};
init
},
{
let mut init = menu_entries {
item_string: b"\0" as *const u8 as *const libc::c_char
as *mut libc::c_char,
procedure: None,
ptr_argument: 0 as *const menu_entries as *mut menu_entries,
iprocedure: None,
nprocedure: None,
argument: -(1 as libc::c_int),
};
init
},
{
let mut init = menu_entries {
item_string: b"\0" as *const u8 as *const libc::c_char
as *mut libc::c_char,
procedure: None,
ptr_argument: 0 as *const menu_entries as *mut menu_entries,
iprocedure: None,
nprocedure: None,
argument: -(1 as libc::c_int),
};
init
},
{
let mut init = menu_entries {
item_string: b"\0" as *const u8 as *const libc::c_char
as *mut libc::c_char,
procedure: None,
ptr_argument: 0 as *const menu_entries as *mut menu_entries,
iprocedure: None,
nprocedure: None,
argument: -(1 as libc::c_int),
};
init
},
{
let mut init = menu_entries {
item_string: b"\0" as *const u8 as *const libc::c_char
as *mut libc::c_char,
procedure: None,
ptr_argument: 0 as *const menu_entries as *mut menu_entries,
iprocedure: None,
nprocedure: None,
argument: -(1 as libc::c_int),
};
init
},
{
let mut init = menu_entries {
item_string: b"\0" as *const u8 as *const libc::c_char
as *mut libc::c_char,
procedure: None,
ptr_argument: 0 as *const menu_entries as *mut menu_entries,
iprocedure: None,
nprocedure: None,
argument: -(1 as libc::c_int),
};
init
},
{
let mut init = menu_entries {
item_string: b"\0" as *const u8 as *const libc::c_char
as *mut libc::c_char,
procedure: None,
ptr_argument: 0 as *const menu_entries as *mut menu_entries,
iprocedure: None,
nprocedure: Some(dump_ee_conf as unsafe extern "C" fn() -> ()),
argument: -(1 as libc::c_int),
};
init
},
{
let mut init = menu_entries {
item_string: 0 as *const libc::c_char as *mut libc::c_char,
procedure: None,
ptr_argument: 0 as *const menu_entries as *mut menu_entries,
iprocedure: None,
nprocedure: None,
argument: -(1 as libc::c_int),
};
init
},
]
};
#[no_mangle]
pub static mut mode_strings: [*mut libc::c_char; 11] = [0 as *const libc::c_char
as *mut libc::c_char; 11];
#[no_mangle]
pub static mut config_dump_menu: [menu_entries; 4] = [
{
let mut init = menu_entries {
item_string: b"\0" as *const u8 as *const libc::c_char as *mut libc::c_char,
procedure: None,
ptr_argument: 0 as *const menu_entries as *mut menu_entries,
iprocedure: None,
nprocedure: None,
argument: 0 as libc::c_int,
};
init
},
{
let mut init = menu_entries {
item_string: b"\0" as *const u8 as *const libc::c_char as *mut libc::c_char,
procedure: None,
ptr_argument: 0 as *const menu_entries as *mut menu_entries,
iprocedure: None,
nprocedure: None,
argument: -(1 as libc::c_int),
};
init
},
{
let mut init = menu_entries {
item_string: b"\0" as *const u8 as *const libc::c_char as *mut libc::c_char,
procedure: None,
ptr_argument: 0 as *const menu_entries as *mut menu_entries,
iprocedure: None,
nprocedure: None,
argument: -(1 as libc::c_int),
};
init
},
{
let mut init = menu_entries {
item_string: 0 as *const libc::c_char as *mut libc::c_char,
procedure: None,
ptr_argument: 0 as *const menu_entries as *mut menu_entries,
iprocedure: None,
nprocedure: None,
argument: -(1 as libc::c_int),
};
init
},
];
#[no_mangle]
pub static mut leave_menu: [menu_entries; 4] = unsafe {
[
{
let mut init = menu_entries {
item_string: b"\0" as *const u8 as *const libc::c_char
as *mut libc::c_char,
procedure: None,
ptr_argument: 0 as *const menu_entries as *mut menu_entries,
iprocedure: None,
nprocedure: None,
argument: -(1 as libc::c_int),
};
init
},
{
let mut init = menu_entries {
item_string: b"\0" as *const u8 as *const libc::c_char
as *mut libc::c_char,
procedure: None,
ptr_argument: 0 as *const menu_entries as *mut menu_entries,
iprocedure: None,
nprocedure: Some(finish as unsafe extern "C" fn() -> ()),
argument: -(1 as libc::c_int),
};
init
},
{
let mut init = menu_entries {
item_string: b"\0" as *const u8 as *const libc::c_char
as *mut libc::c_char,
procedure: None,
ptr_argument: 0 as *const menu_entries as *mut menu_entries,
iprocedure: Some(
quit as unsafe extern "C" fn(libc::c_int) -> libc::c_int,
),
nprocedure: None,
argument: 1 as libc::c_int,
};
init
},
{
let mut init = menu_entries {
item_string: 0 as *const libc::c_char as *mut libc::c_char,
procedure: None,
ptr_argument: 0 as *const menu_entries as *mut menu_entries,
iprocedure: None,
nprocedure: None,
argument: -(1 as libc::c_int),
};
init
},
]
};
#[no_mangle]
pub static mut file_menu: [menu_entries; 6] = unsafe {
[
{
let mut init = menu_entries {
item_string: b"\0" as *const u8 as *const libc::c_char
as *mut libc::c_char,
procedure: None,
ptr_argument: 0 as *const menu_entries as *mut menu_entries,
iprocedure: None,
nprocedure: None,
argument: -(1 as libc::c_int),
};
init
},
{
let mut init = menu_entries {
item_string: b"\0" as *const u8 as *const libc::c_char
as *mut libc::c_char,
procedure: None,
ptr_argument: 0 as *const menu_entries as *mut menu_entries,
iprocedure: Some(
file_op as unsafe extern "C" fn(libc::c_int) -> libc::c_int,
),
nprocedure: None,
argument: 1 as libc::c_int,
};
init
},
{
let mut init = menu_entries {
item_string: b"\0" as *const u8 as *const libc::c_char
as *mut libc::c_char,
procedure: None,
ptr_argument: 0 as *const menu_entries as *mut menu_entries,
iprocedure: Some(
file_op as unsafe extern "C" fn(libc::c_int) -> libc::c_int,
),
nprocedure: None,
argument: 2 as libc::c_int,
};
init
},
{
let mut init = menu_entries {
item_string: b"\0" as *const u8 as *const libc::c_char
as *mut libc::c_char,
procedure: None,
ptr_argument: 0 as *const menu_entries as *mut menu_entries,
iprocedure: Some(
file_op as unsafe extern "C" fn(libc::c_int) -> libc::c_int,
),
nprocedure: None,
argument: 3 as libc::c_int,
};
init
},
{
let mut init = menu_entries {
item_string: b"\0" as *const u8 as *const libc::c_char
as *mut libc::c_char,
procedure: None,
ptr_argument: 0 as *const menu_entries as *mut menu_entries,
iprocedure: None,
nprocedure: Some(print_buffer as unsafe extern "C" fn() -> ()),
argument: -(1 as libc::c_int),
};
init
},
{
let mut init = menu_entries {
item_string: 0 as *const libc::c_char as *mut libc::c_char,
procedure: None,
ptr_argument: 0 as *const menu_entries as *mut menu_entries,
iprocedure: None,
nprocedure: None,
argument: -(1 as libc::c_int),
};
init
},
]
};
#[no_mangle]
pub static mut search_menu: [menu_entries; 4] = unsafe {
[
{
let mut init = menu_entries {
item_string: b"\0" as *const u8 as *const libc::c_char
as *mut libc::c_char,
procedure: None,
ptr_argument: 0 as *const menu_entries as *mut menu_entries,
iprocedure: None,
nprocedure: None,
argument: 0 as libc::c_int,
};
init
},
{
let mut init = menu_entries {
item_string: b"\0" as *const u8 as *const libc::c_char
as *mut libc::c_char,
procedure: None,
ptr_argument: 0 as *const menu_entries as *mut menu_entries,
iprocedure: None,
nprocedure: Some(search_prompt as unsafe extern "C" fn() -> ()),
argument: -(1 as libc::c_int),
};
init
},
{
let mut init = menu_entries {
item_string: b"\0" as *const u8 as *const libc::c_char
as *mut libc::c_char,
procedure: None,
ptr_argument: 0 as *const menu_entries as *mut menu_entries,
iprocedure: Some(
search as unsafe extern "C" fn(libc::c_int) -> libc::c_int,
),
nprocedure: None,
argument: 1 as libc::c_int,
};
init
},
{
let mut init = menu_entries {
item_string: 0 as *const libc::c_char as *mut libc::c_char,
procedure: None,
ptr_argument: 0 as *const menu_entries as *mut menu_entries,
iprocedure: None,
nprocedure: None,
argument: -(1 as libc::c_int),
};
init
},
]
};
#[no_mangle]
pub static mut spell_menu: [menu_entries; 4] = unsafe {
[
{
let mut init = menu_entries {
item_string: b"\0" as *const u8 as *const libc::c_char
as *mut libc::c_char,
procedure: None,
ptr_argument: 0 as *const menu_entries as *mut menu_entries,
iprocedure: None,
nprocedure: None,
argument: -(1 as libc::c_int),
};
init
},
{
let mut init = menu_entries {
item_string: b"\0" as *const u8 as *const libc::c_char
as *mut libc::c_char,
procedure: None,
ptr_argument: 0 as *const menu_entries as *mut menu_entries,
iprocedure: None,
nprocedure: Some(spell_op as unsafe extern "C" fn() -> ()),
argument: -(1 as libc::c_int),
};
init
},
{
let mut init = menu_entries {
item_string: b"\0" as *const u8 as *const libc::c_char
as *mut libc::c_char,
procedure: None,
ptr_argument: 0 as *const menu_entries as *mut menu_entries,
iprocedure: None,
nprocedure: Some(ispell_op as unsafe extern "C" fn() -> ()),
argument: -(1 as libc::c_int),
};
init
},
{
let mut init = menu_entries {
item_string: 0 as *const libc::c_char as *mut libc::c_char,
procedure: None,
ptr_argument: 0 as *const menu_entries as *mut menu_entries,
iprocedure: None,
nprocedure: None,
argument: -(1 as libc::c_int),
};
init
},
]
};
#[no_mangle]
pub static mut misc_menu: [menu_entries; 5] = unsafe {
[
{
let mut init = menu_entries {
item_string: b"\0" as *const u8 as *const libc::c_char
as *mut libc::c_char,
procedure: None,
ptr_argument: 0 as *const menu_entries as *mut menu_entries,
iprocedure: None,
nprocedure: None,
argument: -(1 as libc::c_int),
};
init
},
{
let mut init = menu_entries {
item_string: b"\0" as *const u8 as *const libc::c_char
as *mut libc::c_char,
procedure: None,
ptr_argument: 0 as *const menu_entries as *mut menu_entries,
iprocedure: None,
nprocedure: Some(Format as unsafe extern "C" fn() -> ()),
argument: -(1 as libc::c_int),
};
init
},
{
let mut init = menu_entries {
item_string: b"\0" as *const u8 as *const libc::c_char
as *mut libc::c_char,
procedure: None,
ptr_argument: 0 as *const menu_entries as *mut menu_entries,
iprocedure: None,
nprocedure: Some(shell_op as unsafe extern "C" fn() -> ()),
argument: -(1 as libc::c_int),
};
init
},
{
let mut init = menu_entries {
item_string: b"\0" as *const u8 as *const libc::c_char
as *mut libc::c_char,
procedure: Some(
menu_op as unsafe extern "C" fn(*mut menu_entries) -> libc::c_int,
),
ptr_argument: spell_menu.as_ptr() as *mut _,
iprocedure: None,
nprocedure: None,
argument: -(1 as libc::c_int),
};
init
},
{
let mut init = menu_entries {
item_string: 0 as *const libc::c_char as *mut libc::c_char,
procedure: None,
ptr_argument: 0 as *const menu_entries as *mut menu_entries,
iprocedure: None,
nprocedure: None,
argument: -(1 as libc::c_int),
};
init
},
]
};
#[no_mangle]
pub static mut main_menu: [menu_entries; 9] = unsafe {
[
{
let mut init = menu_entries {
item_string: b"\0" as *const u8 as *const libc::c_char
as *mut libc::c_char,
procedure: None,
ptr_argument: 0 as *const menu_entries as *mut menu_entries,
iprocedure: None,
nprocedure: None,
argument: -(1 as libc::c_int),
};
init
},
{
let mut init = menu_entries {
item_string: b"\0" as *const u8 as *const libc::c_char
as *mut libc::c_char,
procedure: None,
ptr_argument: 0 as *const menu_entries as *mut menu_entries,
iprocedure: None,
nprocedure: Some(leave_op as unsafe extern "C" fn() -> ()),
argument: -(1 as libc::c_int),
};
init
},
{
let mut init = menu_entries {
item_string: b"\0" as *const u8 as *const libc::c_char
as *mut libc::c_char,
procedure: None,
ptr_argument: 0 as *const menu_entries as *mut menu_entries,
iprocedure: None,
nprocedure: Some(help as unsafe extern "C" fn() -> ()),
argument: -(1 as libc::c_int),
};
init
},
{
let mut init = menu_entries {
item_string: b"\0" as *const u8 as *const libc::c_char
as *mut libc::c_char,
procedure: Some(
menu_op as unsafe extern "C" fn(*mut menu_entries) -> libc::c_int,
),
ptr_argument: file_menu.as_ptr() as *mut _,
iprocedure: None,
nprocedure: None,