- 注册时间
- 2005-6-20
- 最后登录
- 1970-1-1
|
发表于 2006-1-25 20:08:00
|
显示全部楼层
我在WQX上写的:
void stri(char y,char x,int o){
char ch[3];
int word,n;
memset(str,0,41);memset(ch,0,3);strcpy(str,o);
while(ch[0]!=13&&ch[0]!=27){
n=strlen(str);
Locate(y,x);printf("%s_ ",str);
word=GetWord(3);
ch[0]=word;
if(isprint(ch[0])&&n<40)str[n]=ch[0];
if(ch[0]>=160&&n<39){ch[1]=word>>8;memcpy(str+n,ch,2);}
if(ch[0]==27){strcpy(str,"");}
if((ch[0]==23||ch[0]==29)&&n>0){if(str[n-1]>=160)str[n-2]=0;str[n-1]=0;}
}}
|
|