www.pudn.com > cwin.rar > GETINFO.C
/*----------------------------------------------------------- Function getinfo. Author : Liu Lufang Date : July 24, 1994 -----------------------------------------------------------*/ #include#include #include #include #include #include unsigned _Cdecl getinfo(col,line,width,high,prompt,twolines,type,v,len,dec,set,l1,l2) int col,line,width,high; char *prompt; int twolines; int type; void *v; int *len; int dec; char *set; double l1,l2; { char **block; int pmtcol,pmtline; int infocol,infoline; int pmtwidth = strlen(prompt)*_CurrentHZK->fontwidth*_Xtimes/2; int pmthigh = (_CurrentHZK->fonthigh+2)*_Ytimes; int infowidth; int deltahigh; int il1,il2; long ll1,ll2; unsigned key; if(twolines) { deltahigh = (high-8-2*pmthigh)/3; pmtcol = col+(width-pmtwidth)/2; infowidth = (*len)>width-2?width-2:(*len); infowidth = infowidth*_CurrentHZK->fontwidth*_Xtimes/2; infocol = col+(width-infowidth)/2; pmtline = line+4+deltahigh; infoline = pmtline+pmthigh+deltahigh; } else { pmtcol = col+1; pmtline = line+(high-pmthigh)/2; infocol = col+pmtwidth+1; infoline = pmtline; infowidth = width-2-pmtwidth; infowidth = (*len)