home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / mint / utilit~1 / gdb35src.zoo / dist-gdb / inflow.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  1993-03-05  |  20.5 KB  |  3,129 lines

  1. # 1 "inflow.c"
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21. # 1 "u:\\c\\gnu\\include\\stdio.h" 1
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32. # 1 "u:\\c\\gnu\\include\\compiler.h" 1
  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. # 54 "u:\\c\\gnu\\include\\compiler.h"
  79.  
  80.  
  81.  
  82.  
  83.  
  84.  
  85.  
  86. # 69 "u:\\c\\gnu\\include\\compiler.h"
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96. # 98 "u:\\c\\gnu\\include\\compiler.h"
  97.  
  98.  
  99. # 115 "u:\\c\\gnu\\include\\compiler.h"
  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. # 167 "u:\\c\\gnu\\include\\compiler.h"
  140.  
  141.  
  142.  
  143.  
  144.  
  145.  
  146.  
  147.  
  148.  
  149.  
  150.  
  151.  
  152.  
  153.  
  154.  
  155. # 11 "u:\\c\\gnu\\include\\stdio.h" 2
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165. typedef unsigned long   size_t;
  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. typedef    struct             
  212.     {
  213.     long        _cnt;         
  214.     unsigned char    *_ptr;         
  215.     unsigned char    *_base;         
  216.     unsigned int    _flag;         
  217.     int        _file;         
  218.     long        _bsiz;         
  219.     unsigned char    _ch;         
  220.     }
  221.     FILE;
  222.  
  223.  
  224. typedef unsigned long fpos_t;
  225.  
  226.  
  227.  
  228.  
  229. extern    FILE    _iob[];
  230.  
  231.  
  232.  
  233.  
  234.  
  235.  
  236.  
  237.  
  238.  
  239.  
  240.  
  241.  
  242.  
  243.  
  244.  
  245.   int    remove    (const char *) ;
  246.   int    rename    (const char *, const char *) ;
  247.   char *    tmpnam    (char *) ;
  248.   FILE *    tmpfile    (void) ;
  249.  
  250.   int    fclose    (FILE *) ;
  251.   int    fflush    (FILE *) ;
  252.  
  253.   FILE *    fopen    (const char *, const char *) ;
  254.   FILE *    freopen    (const char *, const char *, FILE *) ;
  255.  
  256.   void    setbuf    (FILE *, char *) ;
  257.   int    setvbuf    (FILE *, char *, int, size_t) ;
  258.  
  259.  
  260.  
  261.  
  262.  
  263.  
  264.   int  fscanf  (FILE *, const char *, ...) ;
  265.   int  scanf   (const char *, ...) ;
  266.   int  sscanf  (const char *, const char *, ...) ;
  267.  
  268.  
  269.   int    fprintf    (FILE *, const char *, ...) ;
  270.   int    printf    (const char *, ...) ;
  271.   int    sprintf    (char *, const char *, ...) ;
  272.  
  273.   int     vfprintf (FILE *, const char *, char * ) ;
  274.   int     vprintf     (const char *, char * ) ;
  275.   int     vsprintf (char *, const char *, char * ) ;
  276.  
  277.   int    fgetc    (FILE *) ;
  278.   char    *fgets    (char *, int, FILE *) ;
  279.   char    *gets    (char *) ;
  280.   int    fputc    (int c, FILE *) ;
  281.   int    fputs    (const char *, FILE *) ;
  282.   int    puts    (const char *) ;
  283.   int     fungetc    (int, FILE *) ;
  284.  
  285.   size_t    fread    (void *, size_t, size_t, FILE *) ;
  286.   size_t    fwrite    (const void *, size_t, size_t, FILE *) ;
  287.  
  288.   int    fgetpos    (FILE *, fpos_t *) ;
  289.   int    fsetpos    (FILE *, fpos_t *) ;
  290.  
  291.   int    fseek    (FILE *, long, int) ;
  292.   long    ftell    (FILE *) ;
  293.   void    rewind    (FILE *) ;
  294.  
  295.   void    perror    (const char *) ;
  296.  
  297.  
  298.   FILE    *fdopen    (int, const char *) ;
  299.   FILE    *popen    (const char *, const char *) ;
  300.   int    pclose    (FILE *) ;
  301.  
  302.  
  303.   void    _binmode    (int) ;         
  304.   long     getl    (FILE *) ;
  305.   long     putl    (long, FILE *) ;
  306.   short     getw    (FILE *) ;
  307.   short     putw    (short, FILE *) ;
  308.  
  309.  
  310.  
  311.  
  312.  
  313.  
  314.  
  315.   int    _filbuf    (FILE *) ;     
  316.  
  317.  
  318.  
  319. # 182 "u:\\c\\gnu\\include\\stdio.h"
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.  
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.  
  335. # 20 "inflow.c" 2
  336.  
  337. # 1 "defs.h" 1
  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. extern char *savestring ();
  363. extern char *concat ();
  364. extern char *xmalloc (), *xrealloc ();
  365. extern int parse_escape ();
  366. extern char *reg_names[];
  367.  
  368.  
  369.  
  370.  
  371.  
  372.  
  373.  
  374.  
  375.  
  376.  
  377.  
  378.  
  379. extern int quit_flag;
  380.  
  381. extern int immediate_quit;
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388. enum command_class
  389. {
  390.   no_class = -1, class_run = 0, class_vars, class_stack,
  391.   class_files, class_support, class_info, class_breakpoint,
  392.   class_alias, class_obscure, class_user,
  393. };
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.  
  401.  
  402.  
  403.  
  404.  
  405. struct cleanup
  406. {
  407.   struct cleanup *next;
  408.   void (*function) ();
  409.   int arg;
  410. };
  411.  
  412. extern void do_cleanups ();
  413. extern void discard_cleanups ();
  414. extern struct cleanup *make_cleanup ();
  415. extern struct cleanup *save_cleanups ();
  416. extern void restore_cleanups ();
  417. extern void free_current_contents ();
  418. extern void reinitialize_more_filter ();
  419. extern void fputs_filtered ();
  420. extern void fprintf_filtered ();
  421. extern void printf_filtered ();
  422. extern void print_spaces_filtered ();
  423. extern char *tilde_expand ();
  424.  
  425.  
  426.  
  427.  
  428. struct command_line
  429. {
  430.   struct command_line *next;
  431.   char *line;
  432. };
  433.  
  434. struct command_line *read_command_lines ();
  435.  
  436.  
  437.  
  438. char *current_directory;
  439.  
  440. # 21 "inflow.c" 2
  441.  
  442. # 1 "param.h" 1
  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. # 281 "param.h"
  711.  
  712.  
  713.  
  714.  
  715.  
  716.  
  717.  
  718.  
  719.  
  720.  
  721.  
  722.  
  723.  
  724. # 340 "param.h"
  725.  
  726.  
  727.  
  728.  
  729.  
  730.  
  731. # 355 "param.h"
  732.  
  733.  
  734.  
  735.  
  736. # 378 "param.h"
  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. # 22 "inflow.c" 2
  824.  
  825. # 1 "frame.h" 1
  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. typedef struct frame_info *FRAME;
  870. typedef unsigned int     FRAME_ADDR;
  871.  
  872.  
  873.  
  874.  
  875.  
  876.  
  877.  
  878.  
  879.  
  880.  
  881.  
  882.  
  883. struct frame_info
  884.   {
  885.      
  886.     FRAME_ADDR frame;
  887.      
  888.  
  889.  
  890.     unsigned int  pc;
  891.      
  892.  
  893.  
  894.  
  895.     FRAME_ADDR next_frame;
  896.      
  897.  
  898.  
  899.  
  900.  
  901.      
  902.     FRAME next, prev;
  903.   };
  904.  
  905.  
  906.  
  907. struct frame_saved_regs
  908.   {
  909.      
  910.  
  911.     unsigned int  regs[18 ];
  912.   };
  913.  
  914.  
  915.  
  916.  
  917. extern FRAME selected_frame;
  918.  
  919. extern struct frame_info *get_frame_info ();
  920. extern struct frame_info *get_prev_frame_info ();
  921.  
  922. extern FRAME create_new_frame ();
  923.  
  924. extern void get_frame_saved_regs ();
  925.  
  926. extern FRAME get_prev_frame ();
  927. extern FRAME get_current_frame ();
  928. extern FRAME get_next_frame ();
  929.  
  930. extern struct block *get_frame_block ();
  931. extern struct block *get_current_block ();
  932. extern struct block *get_selected_block ();
  933. extern struct symbol *get_frame_function ();
  934. extern struct symbol *get_pc_function ();
  935.  
  936.  
  937. extern FRAME find_relative_frame ();
  938.  
  939.  
  940.  
  941. # 23 "inflow.c" 2
  942.  
  943. # 1 "inferior.h" 1
  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. struct inferior_status {
  973.   int pc_changed;
  974.   int stop_signal;
  975.   int stop_pc;
  976.   int stop_frame_address;
  977.   int stop_breakpoint;
  978.   int stop_step;
  979.   int stop_stack_dummy;
  980.   int stopped_by_random_signal;
  981.   int trap_expected;
  982.   unsigned int  step_range_start;
  983.   unsigned int  step_range_end;
  984.   FRAME_ADDR step_frame_address;
  985.   int step_over_calls;
  986.   unsigned int  step_resume_break_address;
  987.   int stop_after_trap;
  988.   int stop_after_attach;
  989.   FRAME_ADDR selected_frame_address;
  990.   int selected_level;
  991.   struct command_line *breakpoint_commands;
  992.   char stop_registers[(16*4+8) ];
  993.   int restore_stack_info;
  994. };
  995.  
  996. void save_inferior_status (), restore_inferior_status ();
  997.  
  998.  
  999.  
  1000. extern char *inferior_io_terminal;
  1001.  
  1002.  
  1003.  
  1004. extern int inferior_pid;
  1005.  
  1006.  
  1007. extern int remote_debugging;
  1008.  
  1009.  
  1010. int remote_read_inferior_memory ();
  1011. int remote_write_inferior_memory ();
  1012.  
  1013.  
  1014.  
  1015. extern int stop_signal;
  1016.  
  1017.  
  1018.  
  1019. extern unsigned int  stop_pc;
  1020.  
  1021.  
  1022.  
  1023. extern FRAME_ADDR stop_frame_address;
  1024.  
  1025.  
  1026.  
  1027. extern int stop_breakpoint;
  1028.  
  1029.  
  1030.  
  1031. extern int stop_step;
  1032.  
  1033.  
  1034.  
  1035. extern int stop_stack_dummy;
  1036.  
  1037.  
  1038.  
  1039.  
  1040. extern int stopped_by_random_signal;
  1041.  
  1042.  
  1043.  
  1044.  
  1045.  
  1046. extern unsigned int  step_range_start;  
  1047. extern unsigned int  step_range_end;  
  1048.  
  1049.  
  1050.  
  1051.  
  1052.  
  1053. extern FRAME_ADDR step_frame_address;
  1054.  
  1055.  
  1056.  
  1057.  
  1058. extern int step_over_calls;
  1059.  
  1060.  
  1061.  
  1062.  
  1063.  
  1064. extern int step_multi;
  1065.  
  1066.  
  1067.  
  1068. extern char stop_registers[(16*4+8) ];
  1069.  
  1070.  
  1071.  
  1072.  
  1073. extern int pc_changed;
  1074.  
  1075. long read_memory_integer ();
  1076. # 24 "inflow.c" 2
  1077.  
  1078.  
  1079.  
  1080. # 1 "u:\\c\\gnu\\include\\mintbind.h" 1
  1081.  
  1082.  
  1083.  
  1084.  
  1085. # 1 "u:\\c\\gnu\\include\\osbind.h" 1
  1086.  
  1087.  
  1088.  
  1089.  
  1090.  
  1091.  
  1092.  
  1093.  
  1094.  
  1095.  
  1096.  
  1097.  
  1098.  
  1099.  
  1100.  
  1101.  
  1102.  
  1103.  
  1104.  
  1105.  
  1106.  
  1107.  
  1108.  
  1109.  
  1110.  
  1111.  
  1112.  
  1113.  
  1114.  
  1115.  
  1116.  
  1117.  
  1118.  
  1119.  
  1120.  
  1121.  
  1122.  
  1123.  
  1124.  
  1125.  
  1126.  
  1127.  
  1128.  
  1129.  
  1130.  
  1131.  
  1132.  
  1133.  
  1134.  
  1135.  
  1136.  
  1137.  
  1138.  
  1139.  
  1140.  
  1141.  
  1142.  
  1143.  
  1144.  
  1145.  
  1146.  
  1147.  
  1148.  
  1149.  
  1150.  
  1151.  
  1152.  
  1153.  
  1154.  
  1155.  
  1156.  
  1157.  
  1158.  
  1159.  
  1160.  
  1161.  
  1162.  
  1163.  
  1164.  
  1165.  
  1166.  
  1167.  
  1168.  
  1169.  
  1170.  
  1171.  
  1172.  
  1173.  
  1174.  
  1175.  
  1176.  
  1177.  
  1178.  
  1179.  
  1180.  
  1181.  
  1182.  
  1183.  
  1184.  
  1185.  
  1186.  
  1187.  
  1188.  
  1189.  
  1190.  
  1191.  
  1192.  
  1193.  
  1194.  
  1195.  
  1196. # 1 "u:\\c\\gnu\\include\\ostruct.h" 1
  1197.  
  1198.  
  1199.  
  1200.  
  1201.  
  1202.  
  1203.  
  1204.  
  1205.  
  1206.  
  1207.  
  1208.  
  1209.  
  1210.  
  1211.  
  1212.  
  1213.  
  1214.  
  1215.  
  1216.  
  1217.  
  1218. typedef struct {
  1219.     long b_free;     
  1220.     long b_total;     
  1221.     long b_secsiz;     
  1222.     long b_clsiz;     
  1223. } _DISKINFO;
  1224.  
  1225.  
  1226. typedef struct {
  1227.   short time;
  1228.   short date;
  1229. } _DOSTIME;
  1230.  
  1231.  
  1232. typedef struct
  1233. {
  1234.         unsigned char maxlen;
  1235.         unsigned char actuallen;
  1236.         char    buffer[255];
  1237. } _CCONLINE;
  1238.  
  1239.  
  1240.  
  1241.  
  1242.  
  1243.  
  1244. typedef struct _dta {
  1245.     char         dta_buf[21];     
  1246.     char            dta_attribute;     
  1247.     unsigned short  dta_time;         
  1248.     unsigned short  dta_date;         
  1249.     long            dta_size;         
  1250.     char            dta_name[14];     
  1251. } _DTA;
  1252.  
  1253.  
  1254.  
  1255.  
  1256.  
  1257.  
  1258.  
  1259.  
  1260.  
  1261.  
  1262.  
  1263.  
  1264.  
  1265.  
  1266.  
  1267.  
  1268.  
  1269.  
  1270.  
  1271.  
  1272.  
  1273.  
  1274.  
  1275.  
  1276.  
  1277.  
  1278.  
  1279.  
  1280.  
  1281.  
  1282.  
  1283.  
  1284.  
  1285.  
  1286.  
  1287.  
  1288.  
  1289.  
  1290.  
  1291.  
  1292.  
  1293.  
  1294. typedef struct {
  1295.   short recsiz;          
  1296.   short clsiz;           
  1297.   short clsizb;          
  1298.   short rdlen;           
  1299.   short fsiz;            
  1300.   short fatrec;          
  1301.   short datrec;          
  1302.   short numcl;           
  1303.   short bflags;          
  1304. } _BPB;
  1305.  
  1306.  
  1307.  
  1308.  
  1309. typedef struct _md {
  1310.     struct _md    *md_next;     
  1311.     long     md_start;     
  1312.     long     md_length;     
  1313.     long     md_owner;     
  1314. } _MD;
  1315.  
  1316.  
  1317. typedef struct {
  1318.     _MD *mp_free;         
  1319.     _MD *mp_used;         
  1320.     _MD *mp_rover;         
  1321. } _MPB;
  1322.  
  1323.  
  1324.  
  1325.  
  1326.  
  1327.  
  1328.  
  1329.  
  1330.  
  1331.  
  1332.  
  1333.  
  1334.  
  1335.  
  1336.  
  1337. typedef struct {
  1338.     char    *ibuf;
  1339.     short   ibufsiz;
  1340.     short   ibufhd;
  1341.     short   ibuftl;
  1342.     short   ibuflow;
  1343.     short   ibufhi;
  1344. } _IOREC;
  1345.  
  1346.  
  1347. typedef struct {
  1348.     char    topmode;
  1349.     char    buttons;
  1350.     char    xparam;
  1351.     char    yparam;
  1352. } _PARAM;
  1353.  
  1354.  
  1355. typedef struct {
  1356.     void    (*midivec)    (void) ;
  1357.     void    (*vkbderr)    (void) ;
  1358.     void    (*vmiderr)    (void) ;
  1359.     void    (*statvec)    (void *) ;
  1360.     void    (*mousevec)    (void *) ;
  1361.     void    (*clockvec)    (void *) ;
  1362.     void    (*joyvec)    (void *) ;
  1363.     long    (*midisys)    (void) ;
  1364.     long    (*ikbdsys)    (void) ;
  1365.     char    kbstate;
  1366. } _KBDVECS;
  1367.  
  1368.  
  1369. typedef struct {
  1370.     void *unshift;     
  1371.     void *shift;     
  1372.     void *caps;         
  1373. } _KEYTAB;
  1374.  
  1375.  
  1376. typedef struct
  1377. {
  1378.         void    *pb_scrptr;
  1379.         int     pb_offset;
  1380.         int     pb_width;
  1381.         int     pb_height;
  1382.         int     pb_left;
  1383.         int     pb_right;
  1384.         int     pb_screz;
  1385.         int     pb_prrez;
  1386.         void    *pb_colptr;
  1387.         int     pb_prtype;
  1388.         int     pb_prport;
  1389.         void    *pb_mask;
  1390. } _PBDEF;
  1391.  
  1392.  
  1393.  
  1394.  
  1395.  
  1396.  
  1397. # 111 "u:\\c\\gnu\\include\\osbind.h" 2
  1398.  
  1399.  
  1400.  
  1401. # 276 "u:\\c\\gnu\\include\\osbind.h"
  1402.  
  1403.  
  1404.  
  1405.  
  1406.  
  1407.  
  1408.  
  1409.  
  1410.  
  1411.  
  1412.  
  1413.  
  1414. # 302 "u:\\c\\gnu\\include\\osbind.h"
  1415.  
  1416.  
  1417. # 320 "u:\\c\\gnu\\include\\osbind.h"
  1418.  
  1419.  
  1420. # 338 "u:\\c\\gnu\\include\\osbind.h"
  1421.  
  1422.  
  1423. # 358 "u:\\c\\gnu\\include\\osbind.h"
  1424.  
  1425.  
  1426. # 380 "u:\\c\\gnu\\include\\osbind.h"
  1427.  
  1428.  
  1429. # 402 "u:\\c\\gnu\\include\\osbind.h"
  1430.  
  1431.  
  1432. # 422 "u:\\c\\gnu\\include\\osbind.h"
  1433.  
  1434.  
  1435. # 442 "u:\\c\\gnu\\include\\osbind.h"
  1436.  
  1437.  
  1438. # 473 "u:\\c\\gnu\\include\\osbind.h"
  1439.  
  1440.  
  1441. # 497 "u:\\c\\gnu\\include\\osbind.h"
  1442.  
  1443.  
  1444. # 515 "u:\\c\\gnu\\include\\osbind.h"
  1445.  
  1446.  
  1447. # 531 "u:\\c\\gnu\\include\\osbind.h"
  1448.  
  1449.  
  1450. # 549 "u:\\c\\gnu\\include\\osbind.h"
  1451.  
  1452.  
  1453. # 569 "u:\\c\\gnu\\include\\osbind.h"
  1454.  
  1455.  
  1456. # 601 "u:\\c\\gnu\\include\\osbind.h"
  1457.  
  1458.  
  1459. # 621 "u:\\c\\gnu\\include\\osbind.h"
  1460.  
  1461.  
  1462. # 641 "u:\\c\\gnu\\include\\osbind.h"
  1463.  
  1464.  
  1465. # 663 "u:\\c\\gnu\\include\\osbind.h"
  1466.  
  1467.  
  1468. # 681 "u:\\c\\gnu\\include\\osbind.h"
  1469.  
  1470.  
  1471. # 697 "u:\\c\\gnu\\include\\osbind.h"
  1472.  
  1473.  
  1474. # 719 "u:\\c\\gnu\\include\\osbind.h"
  1475.  
  1476.  
  1477. # 737 "u:\\c\\gnu\\include\\osbind.h"
  1478.  
  1479.  
  1480. # 757 "u:\\c\\gnu\\include\\osbind.h"
  1481.  
  1482.  
  1483. # 793 "u:\\c\\gnu\\include\\osbind.h"
  1484.  
  1485.  
  1486. # 831 "u:\\c\\gnu\\include\\osbind.h"
  1487.  
  1488.  
  1489. # 877 "u:\\c\\gnu\\include\\osbind.h"
  1490.  
  1491.  
  1492.  
  1493. # 912 "u:\\c\\gnu\\include\\osbind.h"
  1494.  
  1495.  
  1496. # 934 "u:\\c\\gnu\\include\\osbind.h"
  1497.  
  1498.  
  1499. # 964 "u:\\c\\gnu\\include\\osbind.h"
  1500.  
  1501.  
  1502. # 994 "u:\\c\\gnu\\include\\osbind.h"
  1503.  
  1504.  
  1505. # 1016 "u:\\c\\gnu\\include\\osbind.h"
  1506.  
  1507.  
  1508. # 1046 "u:\\c\\gnu\\include\\osbind.h"
  1509.  
  1510. # 1137 "u:\\c\\gnu\\include\\osbind.h"
  1511.  
  1512.  
  1513.  
  1514.  
  1515.  
  1516.  
  1517.  
  1518.  
  1519.  
  1520.  
  1521.  
  1522.  
  1523.  
  1524.  
  1525.  
  1526.  
  1527.  
  1528.  
  1529.  
  1530.  
  1531.  
  1532.  
  1533.  
  1534.  
  1535.  
  1536.  
  1537.  
  1538.  
  1539.  
  1540.  
  1541.  
  1542.  
  1543.  
  1544.  
  1545.  
  1546.  
  1547.  
  1548.  
  1549.  
  1550.  
  1551.  
  1552.  
  1553.  
  1554.  
  1555.  
  1556.  
  1557.  
  1558.  
  1559.  
  1560.  
  1561.  
  1562.  
  1563.  
  1564.  
  1565.  
  1566.  
  1567.  
  1568.  
  1569.  
  1570.  
  1571.  
  1572.  
  1573.  
  1574.  
  1575.  
  1576.  
  1577.  
  1578.  
  1579.      
  1580.  
  1581.  
  1582.  
  1583.  
  1584.  
  1585.  
  1586.  
  1587.  
  1588.  
  1589.  
  1590.  
  1591.  
  1592.  
  1593.  
  1594.  
  1595.  
  1596.  
  1597.  
  1598.  
  1599.  
  1600.  
  1601.  
  1602.  
  1603.  
  1604.  
  1605.  
  1606.  
  1607.  
  1608.  
  1609.  
  1610.  
  1611.  
  1612.  
  1613.  
  1614.  
  1615.  
  1616.  
  1617.  
  1618.  
  1619.  
  1620.  
  1621.  
  1622.  
  1623.  
  1624.  
  1625.  
  1626.  
  1627.  
  1628.  
  1629.  
  1630.  
  1631.  
  1632.  
  1633.  
  1634.  
  1635.  
  1636.  
  1637.  
  1638.  
  1639.  
  1640.  
  1641.  
  1642.  
  1643.  
  1644.  
  1645.  
  1646.  
  1647.  
  1648.  
  1649.  
  1650.  
  1651.  
  1652.  
  1653.  
  1654.  
  1655.  
  1656.  
  1657.  
  1658.  
  1659.  
  1660.  
  1661.  
  1662.  
  1663.  
  1664.  
  1665.  
  1666.  
  1667.  
  1668.  
  1669.  
  1670.  
  1671.  
  1672.  
  1673.  
  1674.  
  1675.  
  1676.  
  1677.  
  1678.  
  1679.  
  1680.  
  1681.  
  1682.  
  1683.  
  1684.  
  1685.  
  1686.  
  1687.  
  1688.  
  1689.  
  1690.  
  1691.  
  1692.  
  1693.  
  1694.  
  1695.  
  1696.  
  1697.  
  1698.  
  1699.  
  1700.  
  1701.  
  1702.  
  1703.  
  1704.  
  1705.  
  1706.  
  1707.  
  1708.  
  1709.  
  1710.  
  1711.  
  1712.  
  1713.  
  1714.  
  1715.  
  1716.  
  1717.  
  1718.  
  1719.  
  1720.  
  1721.  
  1722.  
  1723.  
  1724.  
  1725.  
  1726.  
  1727.      
  1728.  
  1729.  
  1730.  
  1731.  
  1732.  
  1733.  
  1734.  
  1735.  
  1736.  
  1737.  
  1738.  
  1739.  
  1740.  
  1741.  
  1742.  
  1743.  
  1744.  
  1745.  
  1746.  
  1747.  
  1748.  
  1749.  
  1750.  
  1751.  
  1752.  
  1753.  
  1754.  
  1755.  
  1756.  
  1757.  
  1758.  
  1759.  
  1760.  
  1761.  
  1762.  
  1763.  
  1764.  
  1765.  
  1766.  
  1767.  
  1768.  
  1769.  
  1770.  
  1771.  
  1772.  
  1773.  
  1774.  
  1775.  
  1776.  
  1777.  
  1778.  
  1779.  
  1780.  
  1781.  
  1782.  
  1783.  
  1784.  
  1785.  
  1786.  
  1787.  
  1788.  
  1789.  
  1790.  
  1791.  
  1792.  
  1793.  
  1794.  
  1795.  
  1796.  
  1797.  
  1798.  
  1799.  
  1800.  
  1801.  
  1802.  
  1803.  
  1804.  
  1805.  
  1806.  
  1807.  
  1808.  
  1809.  
  1810.  
  1811.  
  1812.  
  1813.  
  1814.  
  1815.  
  1816.  
  1817.  
  1818.  
  1819.  
  1820.  
  1821.  
  1822.  
  1823.  
  1824.  
  1825.  
  1826.  
  1827.  
  1828.  
  1829.  
  1830.  
  1831.  
  1832.  
  1833.  
  1834.  
  1835.  
  1836.  
  1837.  
  1838.  
  1839.  
  1840.  
  1841.  
  1842.  
  1843.  
  1844.  
  1845. # 5 "u:\\c\\gnu\\include\\mintbind.h" 2
  1846.  
  1847.  
  1848.  
  1849.  
  1850.  
  1851.  
  1852.  
  1853. # 82 "u:\\c\\gnu\\include\\mintbind.h"
  1854.  
  1855.  
  1856.  
  1857.  
  1858. # 106 "u:\\c\\gnu\\include\\mintbind.h"
  1859.  
  1860.  
  1861. # 128 "u:\\c\\gnu\\include\\mintbind.h"
  1862.  
  1863.  
  1864. # 150 "u:\\c\\gnu\\include\\mintbind.h"
  1865.  
  1866.  
  1867. # 170 "u:\\c\\gnu\\include\\mintbind.h"
  1868.  
  1869. # 199 "u:\\c\\gnu\\include\\mintbind.h"
  1870.  
  1871.  
  1872.  
  1873.  
  1874.  
  1875.  
  1876.  
  1877.  
  1878.  
  1879.  
  1880.  
  1881.  
  1882.  
  1883.  
  1884.  
  1885.  
  1886.  
  1887.  
  1888.  
  1889.  
  1890.  
  1891.  
  1892.  
  1893.  
  1894.  
  1895.  
  1896.  
  1897.  
  1898.  
  1899.  
  1900.  
  1901.  
  1902.  
  1903.  
  1904.  
  1905.  
  1906.  
  1907.  
  1908.  
  1909.  
  1910.  
  1911.  
  1912.  
  1913.  
  1914.  
  1915.  
  1916.  
  1917.  
  1918.  
  1919.  
  1920.  
  1921.  
  1922.  
  1923.  
  1924.  
  1925.  
  1926.  
  1927.  
  1928.  
  1929.  
  1930.  
  1931.  
  1932.  
  1933.  
  1934.  
  1935.  
  1936.  
  1937.  
  1938.  
  1939.  
  1940.  
  1941.  
  1942.  
  1943.  
  1944.  
  1945.  
  1946.  
  1947.  
  1948.  
  1949.  
  1950.  
  1951.  
  1952.  
  1953.  
  1954.  
  1955.  
  1956.  
  1957.  
  1958.  
  1959.  
  1960.  
  1961.  
  1962.  
  1963.  
  1964.  
  1965.  
  1966.  
  1967.  
  1968.  
  1969.  
  1970.  
  1971.  
  1972.  
  1973.  
  1974.  
  1975.  
  1976.  
  1977.  
  1978.  
  1979.  
  1980.  
  1981.  
  1982.  
  1983.  
  1984.  
  1985.  
  1986.  
  1987.  
  1988.  
  1989.  
  1990.  
  1991.  
  1992.  
  1993.  
  1994.  
  1995.  
  1996.  
  1997.  
  1998.  
  1999.  
  2000.  
  2001.  
  2002. # 27 "inflow.c" 2
  2003.  
  2004.  
  2005.  
  2006.  
  2007.  
  2008.  
  2009.  
  2010.  
  2011.  
  2012. # 1 "u:\\c\\gnu\\include\\fcntl.h" 1
  2013.  
  2014.  
  2015.  
  2016.  
  2017.  
  2018.  
  2019.  
  2020.  
  2021.  
  2022.  
  2023.  
  2024.  
  2025.  
  2026.  
  2027.  
  2028.  
  2029.  
  2030.  
  2031.  
  2032.  
  2033.  
  2034.  
  2035.  
  2036.  
  2037.  
  2038.  
  2039.  
  2040.  
  2041.  
  2042.  
  2043.  
  2044.  
  2045.  
  2046.  
  2047.  
  2048.  
  2049.  
  2050.  
  2051.  
  2052.  
  2053.  
  2054.  
  2055.  
  2056.  
  2057.  
  2058.  
  2059.  
  2060.  
  2061.  
  2062.  
  2063.  
  2064.  
  2065.  
  2066.  
  2067.  
  2068.  
  2069.  
  2070.  
  2071.  
  2072.  
  2073.  
  2074.  
  2075.  
  2076.  
  2077. struct flock {
  2078.     short l_type;
  2079.  
  2080.  
  2081.  
  2082.     short l_whence;
  2083.     long l_start;
  2084.     long l_len;
  2085.     short l_pid;
  2086. };
  2087.  
  2088.  
  2089.  
  2090.  
  2091.  
  2092.  
  2093.  
  2094. struct __open_file {
  2095.     short    status;         
  2096.     short    flags;         
  2097. };
  2098.  
  2099. # 99 "u:\\c\\gnu\\include\\fcntl.h"
  2100.  
  2101.  
  2102. extern struct __open_file __open_stat[40 ];
  2103.    
  2104.  
  2105.  
  2106.  
  2107.  
  2108.  
  2109.  
  2110.  
  2111.  
  2112.  
  2113.  
  2114.  
  2115.  
  2116.  
  2117.  
  2118.  
  2119.  
  2120.  
  2121.  
  2122.  
  2123.   int fcntl (int f, int cmd, ...) ;
  2124.  
  2125.  
  2126.  
  2127.  
  2128.  
  2129.  
  2130. # 36 "inflow.c" 2
  2131.  
  2132.  
  2133. # 1 "u:\\c\\gnu\\include\\sys/param.h" 1
  2134.  
  2135.  
  2136.  
  2137.  
  2138.  
  2139.  
  2140.  
  2141.  
  2142.  
  2143.  
  2144.  
  2145.  
  2146.  
  2147.  
  2148.  
  2149.  
  2150.  
  2151. # 38 "inflow.c" 2
  2152.  
  2153. # 1 "u:\\c\\gnu\\include\\sys/dir.h" 1
  2154.  
  2155.  
  2156.  
  2157.  
  2158.  
  2159.  
  2160.  
  2161.  
  2162.  
  2163.  
  2164.  
  2165.  
  2166.  
  2167.  
  2168.  
  2169.  
  2170. # 1 "u:\\c\\gnu\\include\\dirent.h" 1
  2171.  
  2172.  
  2173.  
  2174.  
  2175.  
  2176.  
  2177.  
  2178.  
  2179.  
  2180.  
  2181. # 1 "u:\\c\\gnu\\include\\types.h" 1
  2182.  
  2183.  
  2184.  
  2185.  
  2186.  
  2187.  
  2188.  
  2189.  
  2190.  
  2191.  
  2192.  
  2193.  
  2194.  
  2195.  
  2196.  
  2197.  
  2198.  
  2199.  
  2200. typedef long  time_t;
  2201.  
  2202.  
  2203. typedef long off_t;
  2204.  
  2205. typedef unsigned char    u_char;
  2206. typedef unsigned short    u_short;
  2207. typedef unsigned long    u_long;
  2208.  
  2209. typedef unsigned short    dev_t;         
  2210.  
  2211.  
  2212.  
  2213. typedef u_long        ino_t;         
  2214. typedef unsigned short         uid_t;         
  2215. typedef unsigned short         gid_t;         
  2216. typedef int         pid_t;         
  2217. typedef void *        caddr_t;
  2218.  
  2219. # 1 "u:\\c\\gnu\\include\\utime.h" 1
  2220.  
  2221.  
  2222.  
  2223. struct utimbuf {             
  2224.     time_t    actime;
  2225.     time_t    modtime;
  2226. };
  2227.  
  2228.  
  2229. # 38 "u:\\c\\gnu\\include\\types.h" 2
  2230.  
  2231.  
  2232.  
  2233.  
  2234.  
  2235.  
  2236.  
  2237. # 11 "u:\\c\\gnu\\include\\dirent.h" 2
  2238.  
  2239.  
  2240.  
  2241.  
  2242. # 1 "u:\\c\\gnu\\include\\limits.h" 1
  2243.  
  2244.  
  2245.  
  2246.  
  2247.  
  2248.  
  2249.  
  2250.  
  2251.  
  2252.  
  2253.  
  2254.  
  2255.  
  2256.  
  2257.  
  2258.  
  2259.  
  2260.  
  2261.  
  2262.  
  2263.  
  2264.  
  2265.  
  2266.  
  2267.  
  2268.  
  2269.  
  2270.  
  2271.  
  2272.  
  2273.  
  2274.  
  2275.  
  2276.  
  2277.  
  2278.  
  2279.  
  2280.  
  2281.  
  2282.  
  2283.  
  2284.  
  2285.  
  2286.  
  2287.  
  2288.  
  2289.  
  2290.  
  2291.  
  2292.  
  2293.  
  2294.  
  2295.  
  2296.  
  2297.  
  2298.  
  2299.  
  2300.  
  2301.  
  2302.  
  2303.  
  2304.   
  2305.  
  2306.  
  2307.  
  2308.  
  2309.  
  2310.  
  2311.  
  2312.  
  2313.  
  2314.  
  2315.  
  2316.  
  2317.  
  2318.  
  2319.  
  2320.  
  2321.  
  2322.  
  2323.  
  2324.  
  2325.  
  2326.  
  2327.  
  2328.  
  2329.  
  2330.  
  2331.  
  2332.  
  2333.  
  2334.  
  2335.  
  2336.  
  2337.  
  2338.  
  2339.  
  2340.  
  2341.  
  2342.  
  2343.  
  2344.          
  2345.  
  2346.  
  2347.  
  2348.  
  2349.  
  2350.  
  2351.  
  2352.  
  2353.  
  2354.  
  2355.  
  2356.  
  2357.  
  2358.  
  2359.  
  2360.  
  2361.  
  2362.  
  2363.  
  2364.  
  2365.  
  2366. # 15 "u:\\c\\gnu\\include\\dirent.h" 2
  2367.  
  2368.  
  2369.  
  2370.  
  2371.  
  2372.  
  2373.  
  2374.  
  2375.  
  2376.  
  2377.  
  2378.  
  2379.  
  2380.  
  2381.  
  2382.  
  2383.  
  2384.  
  2385. struct dirent {
  2386.        long            d_ino;           
  2387.        off_t           d_off;           
  2388.        short           d_reclen;        
  2389.  
  2390.  
  2391.  
  2392.  
  2393.  
  2394.  
  2395.  
  2396.  
  2397.        char            d_name[    31 +1];
  2398.  
  2399. };
  2400.  
  2401. # 57 "u:\\c\\gnu\\include\\dirent.h"
  2402.  
  2403.  
  2404. typedef struct _DIR {
  2405.     short    status;         
  2406.  
  2407.  
  2408.  
  2409.     _DTA    dta;         
  2410.     char    *dirname;     
  2411.  
  2412.     struct dirent buf;     
  2413.     long    handle;         
  2414. } DIR;
  2415.  
  2416.  
  2417.  
  2418.  
  2419.  
  2420.  
  2421.  
  2422.  
  2423.  
  2424.  
  2425.  
  2426.  
  2427.  
  2428.  
  2429.  
  2430.  
  2431.  
  2432.  
  2433.   DIR *        opendir    (const char *dirname) ;
  2434.   struct dirent *readdir    (DIR *dirp) ;
  2435.   off_t        telldir (DIR *dirp) ;
  2436.   void        seekdir    (DIR *dirp, off_t loc) ;
  2437.   void        rewinddir (DIR *dirp) ;
  2438.   int        closedir  (DIR *dirp) ;
  2439.  
  2440.  
  2441.  
  2442.  
  2443.  
  2444.  
  2445. # 17 "u:\\c\\gnu\\include\\sys/dir.h" 2
  2446.  
  2447.  
  2448. # 39 "inflow.c" 2
  2449.  
  2450. # 1 "u:\\c\\gnu\\include\\signal.h" 1
  2451.  
  2452.  
  2453.  
  2454.  
  2455.  
  2456.  
  2457.  
  2458.  
  2459.  
  2460.  
  2461.  
  2462.  
  2463.  
  2464.  
  2465.  
  2466.  
  2467.  
  2468.  
  2469.  
  2470.  
  2471.  
  2472.  
  2473.  
  2474.  
  2475.  
  2476.  
  2477.  
  2478.  
  2479.  
  2480.  
  2481.  
  2482.  
  2483.  
  2484.  
  2485.  
  2486.  
  2487.  
  2488.  
  2489.  
  2490.  
  2491.  
  2492.  
  2493.  
  2494.  
  2495.  
  2496.  
  2497.  
  2498.  
  2499.  
  2500. typedef void   (*__Sigfunc) (int signum) ;
  2501. typedef short sig_atomic_t;
  2502.  
  2503.  
  2504.  
  2505.  
  2506.  
  2507.   __Sigfunc    signal    (int sig, __Sigfunc func) ;
  2508.   int        raise    (int sig) ;
  2509.  
  2510.  
  2511.  
  2512. struct sigaction {
  2513.     __Sigfunc    sa_handler;     
  2514.     long        sa_mask;     
  2515.  
  2516.     int         sa_flags;     
  2517.  
  2518.  
  2519. };
  2520.  
  2521.   long    sigsetmask (long mask) ;
  2522.   long    sigblock   (long mask) ;
  2523.   int    sigaction  (int, const struct sigaction *,
  2524.                 struct sigaction *) ;
  2525.  
  2526.  
  2527.  
  2528.  
  2529.  
  2530.  
  2531.  
  2532.  
  2533.  
  2534.  
  2535. # 40 "inflow.c" 2
  2536.  
  2537.  
  2538. # 51 "inflow.c"
  2539.  
  2540. # 1 "u:\\c\\gnu\\include\\sys/ioctl.h" 1
  2541.  
  2542. # 1 "u:\\c\\gnu\\include\\ioctl.h" 1
  2543.  
  2544.  
  2545.  
  2546.  
  2547.  
  2548.  
  2549.  
  2550.  
  2551.  
  2552.  
  2553.  
  2554.  
  2555.  
  2556.  
  2557.  
  2558.  
  2559.  
  2560.  
  2561.  
  2562.  
  2563.  
  2564.  
  2565.  
  2566.  
  2567.  
  2568.  
  2569.  
  2570.  
  2571.  
  2572.  
  2573.  
  2574.  
  2575.  
  2576.  
  2577.  
  2578.  
  2579.  
  2580.  
  2581.  
  2582.  
  2583.  
  2584.  
  2585.  
  2586.  
  2587.  
  2588.  
  2589.  
  2590.  
  2591.  
  2592.  
  2593.  
  2594.  
  2595.  
  2596.  
  2597.  
  2598.  
  2599.  
  2600.  
  2601.  
  2602.  
  2603.  
  2604. struct tchars {
  2605.     char    t_intrc;
  2606.     char    t_quitc;
  2607.     char    t_startc;
  2608.     char    t_stopc;
  2609.     char    t_eofc;
  2610.     char    t_brkc;
  2611. };
  2612.  
  2613. struct ltchars {
  2614.     char    t_suspc;
  2615.     char    t_dsuspc;
  2616.     char    t_rprntc;
  2617.     char    t_flushc;
  2618.     char    t_werasc;
  2619.     char    t_lnextc;
  2620. };
  2621.  
  2622.  
  2623.  
  2624.  
  2625.  
  2626.  
  2627.  
  2628.  
  2629.  
  2630.  
  2631.  
  2632.  
  2633.  
  2634.  
  2635.  
  2636.  
  2637.  
  2638.  
  2639.  
  2640.  
  2641.  
  2642.  
  2643.  
  2644.  
  2645.  
  2646.  
  2647.  
  2648.  
  2649.  
  2650.  
  2651.  
  2652.  
  2653.  
  2654.  
  2655.  
  2656.  
  2657.  
  2658.  
  2659.  
  2660.  
  2661. struct xkey {
  2662.     short    xk_num;
  2663.     char    xk_def[8];
  2664. };
  2665.  
  2666.  
  2667.  
  2668.  
  2669.  
  2670.  
  2671.  
  2672.  
  2673.  
  2674.  
  2675.  
  2676.  
  2677.  
  2678.  
  2679.  
  2680.  
  2681.  
  2682. struct sgttyb {
  2683.     char    sg_ispeed;
  2684.     char    sg_ospeed;
  2685.     char    sg_erase;
  2686.     char    sg_kill;
  2687.     short    sg_flags;
  2688. };
  2689.  
  2690. struct winsize {
  2691.     short    ws_row;
  2692.     short    ws_col;
  2693.     short    ws_xpixel;
  2694.     short    ws_ypixel;
  2695. };
  2696.  
  2697.   int ioctl    (int, int, void *) ;
  2698.   int stty    (int, struct sgttyb *) ;
  2699.   int gtty    (int, struct sgttyb *) ;
  2700.  
  2701.  
  2702.  
  2703.  
  2704.  
  2705.  
  2706. # 2 "u:\\c\\gnu\\include\\sys/ioctl.h" 2
  2707.  
  2708.  
  2709. # 52 "inflow.c" 2
  2710.  
  2711.  
  2712. # 1 "u:\\c\\gnu\\include\\sgtty.h" 1
  2713.  
  2714.  
  2715.  
  2716. # 54 "inflow.c" 2
  2717.  
  2718.  
  2719.  
  2720.  
  2721.  
  2722.  
  2723.  
  2724.  
  2725.  
  2726.  
  2727. extern int errno;
  2728.  
  2729.  
  2730.  
  2731.  
  2732. int attach_flag;
  2733.  
  2734.  
  2735.  
  2736.  
  2737. static struct sgttyb  sg_inferior;
  2738. static struct sgttyb  sg_ours;
  2739.  
  2740. static int tflags_inferior;
  2741. static int tflags_ours;
  2742.  
  2743.  
  2744. static struct tchars tc_inferior;
  2745. static struct tchars tc_ours;
  2746.  
  2747.  
  2748.  
  2749. static struct ltchars ltc_inferior;
  2750. static struct ltchars ltc_ours;
  2751.  
  2752.  
  2753.  
  2754. static int lmode_inferior;
  2755. static int lmode_ours;
  2756.  
  2757.  
  2758.  
  2759. static int pgrp_inferior;
  2760. static int pgrp_ours;
  2761.  
  2762.  
  2763.  
  2764.  
  2765.  
  2766.  
  2767. static char *inferior_thisrun_terminal;
  2768.  
  2769. static void terminal_ours_1 ();
  2770.  
  2771.  
  2772.  
  2773. static int terminal_is_ours;
  2774.  
  2775.  
  2776.  
  2777.  
  2778. void
  2779. terminal_init_inferior ()
  2780. {
  2781.   if (remote_debugging)
  2782.     return;
  2783.  
  2784.   sg_inferior = sg_ours;
  2785.   tflags_inferior = tflags_ours;
  2786.  
  2787.  
  2788.   tc_inferior = tc_ours;
  2789.  
  2790.  
  2791.  
  2792.   ltc_inferior = ltc_ours;
  2793.  
  2794.  
  2795.  
  2796.   lmode_inferior = lmode_ours;
  2797.  
  2798.  
  2799.  
  2800.   pgrp_inferior = inferior_pid;
  2801.  
  2802.  
  2803.   terminal_is_ours = 1;
  2804. }
  2805.  
  2806.  
  2807.  
  2808.  
  2809. void
  2810. terminal_inferior ()
  2811. {
  2812.   if (remote_debugging)
  2813.     return;
  2814.  
  2815.   if (terminal_is_ours)    
  2816.     {
  2817.       fcntl (0,     4    , tflags_inferior);
  2818.       fcntl (0,     4    , tflags_inferior);
  2819.       ioctl (0, (('T'<< 8) | 1)  , &sg_inferior);
  2820.  
  2821.  
  2822.       ioctl (0, (('T'<< 8) | 3) , &tc_inferior);
  2823.  
  2824.  
  2825.       ioctl (0, (('T'<< 8) | 5) , <c_inferior);
  2826.  
  2827.  
  2828.       ioctl (0, (('T'<<8) | 255) , &lmode_inferior);
  2829.  
  2830.  
  2831.  
  2832.       ioctl (0, (('T'<< 8) | 7) , &pgrp_inferior);
  2833.  
  2834.  
  2835.  
  2836.  
  2837.     }
  2838.   terminal_is_ours = 0;
  2839. }
  2840.  
  2841.  
  2842.  
  2843.  
  2844.  
  2845.  
  2846.  
  2847.  
  2848.  
  2849. void
  2850. terminal_ours_for_output ()
  2851. {
  2852.   if (remote_debugging)
  2853.     return;
  2854.  
  2855.   terminal_ours_1 (1);
  2856. }
  2857.  
  2858.  
  2859.  
  2860.  
  2861.  
  2862. void
  2863. terminal_ours ()
  2864. {
  2865.   if (remote_debugging)
  2866.     return;
  2867.  
  2868.   terminal_ours_1 (0);
  2869. }
  2870.  
  2871. static void
  2872. terminal_ours_1 (output_only)
  2873.      int output_only;
  2874. {
  2875.  
  2876.    
  2877.   int (*osigttou) ();
  2878.  
  2879.  
  2880.   if (!terminal_is_ours)   
  2881.     {
  2882.       terminal_is_ours = 1;
  2883.  
  2884.  
  2885.       osigttou = (int (*) ()) signal (    22        , ((__Sigfunc)1L) );
  2886.  
  2887.       ioctl (0, (('T'<< 8) | 6) , &pgrp_inferior);
  2888.       ioctl (0, (('T'<< 8) | 7) , &pgrp_ours);
  2889.  
  2890.       signal (    22        , osigttou);
  2891.  
  2892.  
  2893.  
  2894.  
  2895.  
  2896.       tflags_inferior = fcntl (0,     3    , 0);
  2897.       ioctl (0, (('T'<< 8) | 0) , &sg_inferior);
  2898.  
  2899.  
  2900.       ioctl (0, (('T'<< 8) | 2) , &tc_inferior);
  2901.  
  2902.  
  2903.       ioctl (0, (('T'<< 8) | 4) , <c_inferior);
  2904.  
  2905.  
  2906.       ioctl (0, (('T'<<8) | 254) , &lmode_inferior);
  2907.  
  2908.     }
  2909.  
  2910.  
  2911.  
  2912.  
  2913.  
  2914.  
  2915.   sg_ours.sg_flags &= ~    0x0010  & ~    0x0002 ;
  2916.   if (output_only)
  2917.     sg_ours.sg_flags |= (    0x0010  |     0x0002 ) & sg_inferior.sg_flags;
  2918.  
  2919.  
  2920.   fcntl (0,     4    , tflags_ours);
  2921.   fcntl (0,     4    , tflags_ours);
  2922.   ioctl (0, (('T'<< 8) | 1)  , &sg_ours);
  2923.  
  2924.  
  2925.   ioctl (0, (('T'<< 8) | 3) , &tc_ours);
  2926.  
  2927.  
  2928.   ioctl (0, (('T'<< 8) | 5) , <c_ours);
  2929.  
  2930.  
  2931.   ioctl (0, (('T'<<8) | 255) , &lmode_ours);
  2932.  
  2933.  
  2934.  
  2935.  
  2936.  
  2937.   sg_ours.sg_flags &= ~    0x0010  & ~    0x0002 ;
  2938.  
  2939. }
  2940.  
  2941. static void
  2942. term_status_command ()
  2943. {
  2944.   register int i;
  2945.  
  2946.   if (remote_debugging)
  2947.     {
  2948.       printf_filtered ("No terminal status when remote debugging.\n");
  2949.       return;
  2950.     }
  2951.  
  2952.   printf_filtered ("Inferior's terminal status (currently saved by GDB):\n");
  2953.  
  2954. # 302 "inflow.c"
  2955.  
  2956.  
  2957.   printf_filtered ("fcntl flags = 0x%x, sgttyb.sg_flags = 0x%x, owner pid = %d.\n",
  2958.       tflags_inferior, sg_inferior.sg_flags, pgrp_inferior);
  2959.  
  2960.  
  2961.  
  2962.  
  2963.   printf_filtered ("tchars: ");
  2964.   for (i = 0; i < sizeof (struct tchars); i++)
  2965.     printf_filtered ("0x%x ", ((char *)&tc_inferior)[i]);
  2966.   printf_filtered ("\n");
  2967.  
  2968.  
  2969.  
  2970.   printf_filtered ("ltchars: ");
  2971.   for (i = 0; i < sizeof (struct ltchars); i++)
  2972.     printf_filtered ("0x%x ", ((char *)<c_inferior)[i]);
  2973.   printf_filtered ("\n");
  2974.   ioctl (0, (('T'<< 8) | 5) , <c_ours);
  2975.  
  2976.   
  2977.  
  2978.   printf_filtered ("lmode:  %x\n", lmode_inferior);
  2979.  
  2980. }
  2981.  
  2982. static void
  2983. new_tty (ttyname)
  2984.      char *ttyname;
  2985. {
  2986.   register int tty;
  2987.   register int fd;
  2988.  
  2989. # 344 "inflow.c"
  2990.  
  2991.  
  2992.    
  2993.  
  2994.   tty = open(ttyname,     0x02        );
  2995.   if (tty == -1)
  2996.     _exit(1);
  2997.  
  2998.    
  2999.   if (tty != 0)
  3000.     { close (0); dup (tty); }
  3001.   if (tty != 1)
  3002.     { close (1); dup (tty); }
  3003.   if (tty != 2)
  3004.     { close (2); dup (tty); }
  3005.   if (tty > 2)
  3006.     close(tty);
  3007. }
  3008.  
  3009.  
  3010.  
  3011.  
  3012.  
  3013.  
  3014.  
  3015.  
  3016.  
  3017. int
  3018. create_inferior (allargs, env)
  3019.      char *allargs;
  3020.      char **env;
  3021. {
  3022.   int pid;
  3023. # 449 "inflow.c"
  3024.  
  3025.      
  3026.  
  3027.  
  3028.     char startprog[128        ];
  3029.     char *args;
  3030.     int i;
  3031.     extern int inferior_handle;
  3032.     extern char inferior_name[64];    
  3033.  
  3034.     args=allargs+strlen("exec ");  
  3035.     for(i=0; *args && *args!=' ';args++,i++)startprog[i]=*args;
  3036.     startprog[i]=0;
  3037.  
  3038.     for(i=0; i<strlen(startprog);i++)if(startprog[i]=='/')startprog[i]='\\';
  3039.     
  3040.     while(*(args+1)==' ')args++;
  3041.     args[0]=strlen(args)>124 ? 124 : strlen(args);
  3042.  
  3043.     
  3044.     pid=(long)({    register long retvalue __asm__("d0");    short _a = (short)((short)(0x8000|100));    long  _b = (long) ((long)(startprog));    long  _c = (long) ( (long)(args));    long  _d = (long) ((long)(env));    __asm__ volatile    ("        movl    %4,sp@-;         movl    %3,sp@-;         movl    %2,sp@-;         movw    %1,sp@-;         movw    %0,sp@- "    :    : "g"((short)(0x4B)), "r"(_a), "r"(_b), "r"(_c), "r"(_d) );    __asm__ volatile    ("        trap    #1;            addw    #16,sp "    : "=r"(retvalue)    :    : "d0", "d1", "d2", "a0", "a1", "a2" );    retvalue;    })  ;
  3045.     if(pid<0)
  3046.     {
  3047.         fprintf((&_iob[2]) ,"couldn't start program %s, error #%d\n",startprog,pid);
  3048.         fflush((&_iob[2]) );
  3049.     }
  3050.     else
  3051.     {
  3052.         sprintf(inferior_name,"U:\\PROC\\.%03d",pid);
  3053.         inferior_handle=(long)({    register long retvalue __asm__("d0");    long  _a = (long) ((long)(inferior_name));    short _b = (short)((short)(2));    __asm__ volatile    ("        movw    %3,sp@-;         movl    %2,sp@-;         movw    %1,sp@-;         trap    #1;            addqw   #8,sp "    : "=r"(retvalue)    : "g"((short)(0x3D)), "r"(_a), "r"(_b)    : "d0", "d1", "d2", "a0", "a1", "a2" );    retvalue;    })  ;
  3054.     }
  3055.  
  3056.  
  3057.   return pid;
  3058. }
  3059.  
  3060.  
  3061.  
  3062. static void
  3063. kill_command ()
  3064. {
  3065.   if (remote_debugging)
  3066.     return;
  3067.   if (inferior_pid == 0)
  3068.     error ("The program is not being run.");
  3069.   if (!query ("Kill the inferior process? "))
  3070.     error ("Not confirmed.");
  3071.   kill_inferior ();
  3072. }
  3073.  
  3074. void
  3075. inferior_died ()
  3076. {
  3077.   inferior_pid = 0;
  3078.   attach_flag = 0;
  3079.   mark_breakpoints_out ();
  3080.   select_frame ((FRAME) 0, -1);
  3081.   reopen_exec_file ();
  3082.   if (have_core_file_p ())
  3083.     set_current_frame ( create_new_frame (read_register (14        ),
  3084.                       read_pc ()));
  3085.   else
  3086.     set_current_frame (0);
  3087. }
  3088.  
  3089. # 551 "inflow.c"
  3090.  
  3091.  
  3092. void
  3093. _initialize_inflow ()
  3094. {
  3095.   add_com ("term-status", class_obscure, term_status_command,
  3096.        "Print info on inferior's saved terminal status.");
  3097.  
  3098.  
  3099.  
  3100.  
  3101.  
  3102.  
  3103.  
  3104.   add_com ("kill", class_run, kill_command,
  3105.        "Kill execution of program being debugged.");
  3106.  
  3107.   inferior_pid = 0;
  3108.  
  3109.   ioctl (0, (('T'<< 8) | 0) , &sg_ours);
  3110.   fcntl (0,     3    , tflags_ours);
  3111.  
  3112.  
  3113.   ioctl (0, (('T'<< 8) | 2) , &tc_ours);
  3114.  
  3115.  
  3116.   ioctl (0, (('T'<< 8) | 4) , <c_ours);
  3117.  
  3118.  
  3119.   ioctl (0, (('T'<<8) | 254) , &lmode_ours);
  3120.  
  3121.  
  3122.  
  3123.   ioctl (0, (('T'<< 8) | 6) , &pgrp_ours);
  3124.  
  3125.  
  3126.   terminal_is_ours = 1;
  3127. }
  3128.  
  3129.