求:在C语言环境下对汉字文本的检索程序

来源:百度知道 编辑:UC知道 时间:2024/06/06 07:52:05
非常感谢!

对一个串要从头跟踪,设置一个逻辑的指针吧,遇到ASCII在128以上的字符时,指针向后移动两位(作为整个汉字处理),遇到128以下字符,指针只移动一位(作为常规字符处理,如标点)。
#include "stdio.h"
#include "graphics.h"
#include <stdlib.h>
#include <math.h>
#include "fcntl.h"
#include <dos.h>
#include <alloc.h>
#include <bios.h>
#include <conio.h>
#include <string.h>

int handle;

int puthz(int x,int y,unsigned char *p,int Hsize,int Vsize,int color)
{
unsigned int i,c1,c2,f=0;
int i1,i2,i3,i4,i5;
long l;
unsigned char by[32];
while ((i=*p++)!=0) {
if (i>0xa0)
if (f==0) {
c1=(i+2-0xa0)*94;
f++;}
else {