Syscont (779991), страница 9
Текст из файла (страница 9)
[1947] strcat(Str_int_ordered,"H ");
[1948] strcat(Str_int_ordered,str_mint_ord);
[1949] strcat(Str_int_ordered,"M ");
[1950] strcat(Str_int_ordered,str_sint_ord);
[1951] strcat(Str_int_ordered,"S ");
[1952] /*----*/
[1953] return 0;
[1954] }
[1955] /*IIIIIIIIIIIIIIIIIIIIIIIIIIIIII*/
[1956] String_int_counted()
[1957] {
[1958] /*---- Variables */
[1959] char str_sint_cnt[4];
[1960] char str_mint_cnt[4];
[1961] char str_hint_cnt[4];
[1962] /*---- REVERS (!!!) */
[1963] Hint_cnt=(Interval_ordered-Interval_counted)/3600;
[1964] Mint_cnt=(Interval_ordered-Interval_counted)%3600/60;
[1965] Sint_cnt=(Interval_ordered-Interval_counted)%3600%60;
[1966] /*----*/
[1967] itoa(Hint_cnt,str_hint_cnt,10);
[1968] itoa(Mint_cnt,str_mint_cnt,10);
[1969] itoa(Sint_cnt,str_sint_cnt,10);
[1970] /*----*/
[1971] strcpy(Str_int_counted,str_hint_cnt);
[1972] strcat(Str_int_counted,"H ");
[1973] strcat(Str_int_counted,str_mint_cnt);
[1974] strcat(Str_int_counted,"M ");
[1975] strcat(Str_int_counted,str_sint_cnt);
[1976] strcat(Str_int_counted,"S ");
[1977] /*----*/
[1978] return 0;
[1979] }
[1980] /*IIIIIIIIIIIIIIIIIIIIIIIIIIIIII*/
[1981] int String_time_pc_ordered()
[1982] {
[1983] /*---- Variables */
[1984] char str_Ho[4];
[1985] char str_Mo[4];
[1986] char str_So[4];
[1987] /*---- Display Time ordered */
[1988] itoa(Ho,str_Ho,10);
[1989] itoa(Mo,str_Mo,10);
[1990] itoa(So,str_So,10);
[1991] /* */
[1992] strcpy(Str_time_pc_ordered,str_Ho);
[1993] strcat(Str_time_pc_ordered,"H ");
[1994] strcat(Str_time_pc_ordered,str_Mo);
[1995] strcat(Str_time_pc_ordered,"M ");
[1996] strcat(Str_time_pc_ordered,str_So);
[1997] strcat(Str_time_pc_ordered,"S ");
[1998] return 0;
[1999] }
[2000] /*IIIIIIIIIIIIIIIIIIIIIIIIIIIIII*/
[2001] int String_time_pc_counted()
[2002] {
[2003] /*---- Variables */
[2004] char str_hour[4];
[2005] char str_min[4];
[2006] char str_sec[4];
[2007] /*---- TIME_REAL (PC) */
[2008] itoa(Time_now.ti_hour,str_hour,10);
[2009] itoa(Time_now.ti_min, str_min, 10);
[2010] itoa(Time_now.ti_sec, str_sec, 10);
[2011] /* */
[2012] strcpy(Str_time_pc_counted,str_hour);
[2013] strcat(Str_time_pc_counted,"H-");
[2014] strcat(Str_time_pc_counted,str_min);
[2015] strcat(Str_time_pc_counted,"M-");
[2016] strcat(Str_time_pc_counted,str_sec);
[2017] strcat(Str_time_pc_counted,"S");
[2018] return 0;
[2019] }
[2020] /*IIIIIIIIIIIIIIIIIIIIIIIIIIIIII*/
[2021] int Wind_out
[2022] (int lx,int ly,int rx,int ry,int bk_val,int col_val,
[2023] char *str)
[2024] {
[2025] setviewport(lx,ly,rx,ry,CLIP_ON);
[2026] clearviewport();
[2027] setfillstyle(SOLID_FILL,bk_val);
[2028] bar(lx,ly,rx,ry);
[2029] setcolor(col_val);
[2030] settextjustify(CENTER_TEXT,CENTER_TEXT);
[2031] settextstyle(SMALL_FONT,HORIZ_DIR,FONT_DIM_WIND);
[2032] outtextxy((rx-lx)/2,(ry-ly)/2,str);
[2033] /*----*/
[2034] return 0;
[2035] }
[2036] /*IIIIIIIIIIIIIIIIIIIIIIIIIIIIII*/
[2037] int Wind_right_ini()
[2038] {
[2039] /*---- Right windows for output information */
[2040] Left_y_2=File_inp();
[2041] Left_y_2=File_out();
[2042] Left_y_2=Regime();
[2043] Left_y_2=Com_num();
[2044] Left_y_2=Com_cnt();
[2045] Left_y_2=Add_ord();
[2046] Left_y_2=Com_ord();
[2047] Left_y_2=Int_ord();
[2048] Left_y_2=Int_cnt();
[2049] Left_y_2=Time_ord();
[2050] Left_y_2=Time_pc();
[2051] Left_y_2=Error_sys();
[2052] Left_y_2=Reserve();
[2053] /*----*/
[2054] return 0;
[2055] }
[2056] /*IIIIIIIIIIIIIIIIIIIIIIIIIIIIII*/
[2057] int File_inp()
[2058] {
[2059] /*---- Variables */
[2060] char *title="FILE.INP";
[2061] int col_rect=WHITE;
[2062] int bk_txt=GREEN;
[2063] int col_txt=WHITE;
[2064] int bk_val=BLACK;
[2065] int col_val=WHITE;
[2066] /*---- Abs. co-ord. window for output memorialize */
[2067] static int lx;
[2068] static int ly;
[2069] static int rx;
[2070] static int ry;
[2071] /*---- Return left_y next window */
[2072] int next_left_y;
[2073] /*---- Display window (one time) */
[2074] if (Flag_ini==NOT_INI)
[2075] {
[2076] next_left_y=Wind_2(title,
[2077] col_rect,bk_txt,col_txt,
[2078] &lx,&ly,&rx,&ry
[2079] /* Abs. co-ord. window for output */);
[2080] return next_left_y;
[2081] }
[2082] /*---- Output to window */
[2083] Wind_out(lx,ly,rx,ry,bk_val,col_val,Fname_entry);
[2084] /*----*/
[2085] return 0;
[2086] }
[2087] /*IIIIIIIIIIIIIIIIIIIIIIIIIIIIII*/
[2088] int File_out()
[2089] {
[2090] /*---- Variables */
[2091] char *title="FILE.OUT";
[2092] int col_rect=WHITE;
[2093] int bk_txt=GREEN;
[2094] int col_txt=WHITE;
[2095] int bk_val=BLACK;
[2096] int col_val=WHITE;
[2097] /*---- Abs. co-ord. window for output memorialize */
[2098] static int lx;
[2099] static int ly;
[2100] static int rx;
[2101] static int ry;
[2102] /*---- Return left_y next window */
[2103] int next_left_y;
[2104] /*---- Display window (one time) */
[2105] if (Flag_ini==NOT_INI)
[2106] {
[2107] next_left_y=Wind_2(title,
[2108] col_rect,bk_txt,col_txt,
[2109] &lx,&ly,&rx,&ry /* Abs. co-ord. window for output */);
[2110] return next_left_y;
[2111] }
[2112] /*---- Output to window */
[2113] Wind_out(lx,ly,rx,ry,bk_val,col_val,Fname_exit);
[2114] /*----*/
[2115] return 0;
[2116] }
[2117] /*IIIIIIIIIIIIIIIIIIIIIIIIIIIIII*/
[2118] int Regime()
[2119] {
[2120] /*---- Variables */
[2121] char *title="REGIME ";
[2122] int col_rect=WHITE;
[2123] int bk_txt=GREEN;
[2124] int col_txt=WHITE;
[2125] int bk_val=BLACK;
[2126] int col_val=WHITE;
[2127] /*---- Abs. co-ord. window for output memorialize */
[2128] static int lx;
[2129] static int ly;
[2130] static int rx;
[2131] static int ry;
[2132] /*---- Return left_y next window */
[2133] int next_left_y;
[2134] /*---- Display window (one time) */
[2135] if (Flag_ini==NOT_INI)
[2136] {
[2137] next_left_y=Wind_1(title,
[2138] col_rect,bk_txt,col_txt,
[2139] &lx,&ly,&rx,&ry
[2140] /* Abs. co-ord. window for output */);
[2141] return next_left_y;
[2142] }
[2143] /*---- Output to window */
[2144] Wind_out(lx,ly,rx,ry,bk_val,col_val,Regime_work);
[2145] return 0;
[2146] }
[2147] /*IIIIIIIIIIIIIIIIIIIIIIIIIIIIII*/
[2148] int Com_num()
[2149] {
[2150] /*---- Variables */
[2151] char *title="COM.NUM";
[2152] int col_rect=WHITE;
[2153] int bk_txt=MAGENTA;
[2154] int col_txt=WHITE;
[2155] int bk_val=BLACK;
[2156] int col_val=WHITE;
[2157] /*---- Abs. co-ord. window for output memorialize */
[2158] static int lx;
[2159] static int ly;
[2160] static int rx;
[2161] static int ry;
[2162] /*---- Return left_y next window */
[2163] int next_left_y;
[2164] /*---- Display window (one time) */
[2165] if (Flag_ini==NOT_INI)
[2166] {
[2167] next_left_y=Wind_1(title,
[2168] col_rect,bk_txt,col_txt,
[2169] &lx,&ly,&rx,&ry
[2170] /* Abs. co-ord. window for output */);
[2171] return next_left_y;
[2172] }
[2173] /*---- Output to window */
[2174] itoa(Number_commands,Str_number_commands,10);
[2175] Wind_out(lx,ly,rx,ry,bk_val,col_val,Str_number_commands);
[2176] /*----*/
[2177] return 0;
[2178] }
[2179] /*IIIIIIIIIIIIIIIIIIIIIIIIIIIIII*/
[2180] int Com_cnt()
[2181] {
[2182] /*---- Variables */
[2183] char *title="COM.CNT";
[2184] int col_rect=WHITE;
[2185] int bk_txt=MAGENTA;
[2186] int col_txt=WHITE;
[2187] int bk_val=BLACK;
[2188] int col_val=LIGHTGREEN;
[2189] /*---- Abs. co-ord. window for output memorialize */
[2190] static int lx;
[2191] static int ly;
[2192] static int rx;
[2193] static int ry;
[2194] /*---- Return left_y next window */
[2195] int next_left_y;
[2196] /*---- Display window (one time) */
[2197] if (Flag_ini==NOT_INI)
[2198] {
[2199] next_left_y=Wind_1(title,
[2200] col_rect,bk_txt,col_txt,
[2201] &lx,&ly,&rx,&ry
[2202] /* Abs. co-ord. window for output */);
[2203] return next_left_y;
[2204] }
[2205] /*---- Output to window */
[2206] itoa(Counter_commands,Str_counter_commands,10);
[2207] Wind_out(lx,ly,rx,ry,bk_val,col_val,Str_counter_commands);
[2208] /*----*/
[2209] return 0;
[2210] }
[2211] /*IIIIIIIIIIIIIIIIIIIIIIIIIIIIII*/
[2212] int Add_ord()
[2213] {
[2214] /*---- Variables */
[2215] char *title="ADD.ORD";
[2216] int col_rect=WHITE;
[2217] int bk_txt=LIGHTGRAY;
[2218] int col_txt=WHITE;
[2219] int bk_val=BLACK;
[2220] int col_val=YELLOW;
[2221] /*---- Abs. co-ord. window for output memorialize */
[2222] static int lx;
[2223] static int ly;
[2224] static int rx;
[2225] static int ry;
[2226] /*---- Return left_y next window */
[2227] int next_left_y;
[2228] /*---- Display window (one time) */
[2229] if (Flag_ini==NOT_INI)
[2230] {
[2231] next_left_y=Wind_1(title,
[2232] col_rect,bk_txt,col_txt,
[2233] &lx,&ly,&rx,&ry
[2234] /* Abs. co-ord. window for output */);
[2235] return next_left_y;
[2236] }
[2237] /*---- Output to window */
[2238] itoa(A2*4+A1*2+A0*1,Str_add,10);
[2239] Wind_out(lx,ly,rx,ry,bk_val,col_val,Str_add);
[2240] /*----*/
[2241] return 0;
[2242] }
[2243] /*IIIIIIIIIIIIIIIIIIIIIIIIIIIIII*/
[2244] int Com_ord()
[2245] {
[2246] /*---- Variables */
[2247] char *title="COM.ORD";
[2248] int col_rect=WHITE;
[2249] int bk_txt=LIGHTGRAY;
[2250] int col_txt=WHITE;
[2251] int bk_val=BLACK;
[2252] int col_val=YELLOW;
[2253] /*---- Abs. co-ord. window for output memorialize */
[2254] static int lx;
[2255] static int ly;
[2256] static int rx;
[2257] static int ry;
[2258] /*---- Return left_y next window */
[2259] int next_left_y;
[2260] /*---- Display window (one time) */
[2261] if (Flag_ini==NOT_INI)
[2262] {
[2263] next_left_y=Wind_1(title,
[2264] col_rect,bk_txt,col_txt,
[2265] &lx,&ly,&rx,&ry
[2266] /* Abs. co-ord. window for output */);
[2267] return next_left_y;
[2268] }
[2269] /*---- Output to window */
[2270] itoa(C2*4+C1*2+C0*1,Str_com,10);
[2271] Wind_out(lx,ly,rx,ry,bk_val,col_val,Str_com);
[2272] /*----*/
[2273] return 0;
[2274] }
[2275] /*IIIIIIIIIIIIIIIIIIIIIIIIIIIIII*/
[2276] int Int_ord()
[2277] {
[2278] /*---- Variables */
[2279] char *title="INT.ORD";
[2280] int col_rect=WHITE;
[2281] int bk_txt=CYAN;
[2282] int col_txt=WHITE;
[2283] int bk_val=BLACK;
[2284] int col_val=YELLOW;
[2285] /*---- Abs. co-ord. window for output memorialize */
[2286] static int lx;
[2287] static int ly;
[2288] static int rx;
[2289] static int ry;
[2290] /*---- Return left_y next window */
[2291] int next_left_y;
[2292] /*---- Display window (one time) */
[2293] if (Flag_ini==NOT_INI)
[2294] {
[2295] next_left_y=Wind_2(title,
[2296] col_rect,bk_txt,col_txt,
[2297] &lx,&ly,&rx,&ry
[2298] /* Abs. co-ord. window for output */);
[2299] return next_left_y;
[2300] }
[2301] /*---- Output to window */
[2302] String_int_ordered();
[2303] Wind_out(lx,ly,rx,ry,bk_val,col_val,Str_int_ordered);
[2304] /*----*/
[2305] return 0;
[2306] }
[2307] /*IIIIIIIIIIIIIIIIIIIIIIIIIIIIII*/
[2308] int Int_cnt()
[2309] {