lxfjr 发表于 2009-08-19 19:31

请教一下4gl调用c的程序问题。光标无法定位?谢

问题描述:
在4gl程序中调用一下c函数 。在4gl中如果不加display "" at 12,5 程序能正常执行,一旦加上 display "" at 12,5 光标就在 12行5 列闪动,输入密码无任何反映。
环境:
操作系统:AIX 5.3
online :9.4
c4gl :7.32

4gl程序如下:
database test11
main
define p_pwd char(13)
let p_pwd = ''
display "" at 12,5
let p_pwd = get_pwd("请输入新口令:")
display "sdfsdf:", p_pwd
end main

C程序如下:
#include <stdio.h>
#include <sys/types.h>
#include <fglsys.h>
get_pwd(n)   
int n;
{
      int i = 0;
      char c_print;
      popquote(c_print, 40);
      for (i=0 ; c_print!=' ' && i<39; i++);
      c_print='\0';
      strcpy(c_print,crypt(strcpy(c_print,getpass(c_print)),"cs"));
      retquote(c_print);
      return(1);
}

lxfjr 发表于 2009-08-19 19:33

补充一下:程序在sco unix下能正常执行。加上display at 12,5 也能正常执行。

lxfjr 发表于 2009-08-19 19:36

补充一下:程序在sco unix下能正常执行。加上display at 12,5 也能正常执行。
页: [1]
查看完整版本: 请教一下4gl调用c的程序问题。光标无法定位?谢