?? cfgmacro.c
字號:
#include <io.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "tdecfg.h"
#include "cfgmacro.h"
extern struct vcfg cfg;
extern FILE *tde_exe;
extern long macro_offset;
static WINDOW *w_ptr;
MACRO macros;
void tdemacro( void )
{
int c;
char fname[82];
FILE *macro_file;
cls( );
show_box( 0, 0, macro_screen, NORMAL );
xygoto( 42, 14 );
c = getkey( );
while (c != '1' && c != '2')
c = getkey( );
if (c == '1') {
puts( "" );
puts( "" );
puts( "" );
puts( "Enter file name that contains the macro definitions :" );
gets( fname );
if ((c = access( fname, EXIST )) != 0) {
puts( "\nFile not found. Press any key to continue." );
c = getkey( );
cls( );
return;
} else if ((macro_file = fopen( fname, "rb" )) == NULL ) {
puts( "\nCannot open macro file. Press any key to contine." );
c = getkey( );
cls( );
return;
}
fread( (void *)¯os.first_stroke[0], sizeof(int), MAX_KEYS, macro_file );
fread( (void *)¯os.strokes[0], sizeof(STROKES), STROKE_LIMIT, macro_file );
fseek( tde_exe, macro_offset + 8, SEEK_SET );
fwrite( (void *)¯os.first_stroke[0], sizeof(int), MAX_KEYS, tde_exe );
fwrite( (void *)¯os.strokes[0], sizeof(STROKES), STROKE_LIMIT, tde_exe );
fclose( macro_file );
puts( "" );
puts( "" );
puts( "" );
puts( "New macros successfully installed. Press any key to continue." );
c = getkey( );
}
cls( );
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -