⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 op_list.c

📁 这是一个使用 informix esql/c 技术开发的银行程序的部分代码。
💻 C
字号:
/*   list_op   */
#include </u/ebcsav/include/sav.h>
void mess();
#include </u/ebcsav/include/begin>
FILE *pf;
struct operator opt;
short i=0,l=3,j;
char c;
char s[7];
move(0,31);
printw("操  作  员  目  录");
pf=fopen("/u/ebcsav/data/sav_op.dat","r+");
move(2,2);
printw("编号  名称  部门  币种  操作员  用户  凭证  利率  开业  日终  磁码  小键盘");
while(1)
  {
    fread(&opt,17,1,pf);
    if(feof(pf)) break;
    i++;
    if(opt.name[0]=='\0') continue;
    for(j=0;j<7;j++) if(opt.name[j]!='\0') s[j]=opt.name[j]^0xff;
    else s[j]='\0';
    move(l,2);
    printw("%3d  %-6s %3d%c    %c      %c      %c     %c     %c     %c     %c     %c      %c",
      i,s,opt.num&0x7f,((opt.num&0x80)==0)?' ':'*',((opt.type&3)==3)?'A':
      ((opt.type&3)==1)?'R':'F',((opt.priv&0x20)==0)?' ':'Y',
      ((opt.priv&0x10)==0)?' ':'Y',((opt.priv&0x08)==0)?' ':'Y',
      ((opt.priv&0x04)==0)?' ':'Y',((opt.priv&0x02)==0)?' ':'Y',
      ((opt.priv&0x01)==0)?' ':'Y',((opt.type&0x08)==0)?' ':'Y',
      ((opt.type&0x04)==0)?' ':'Y');
    l++;
    if(l==22)
      {
        move(23,30);
        printw("暂停显示, ");
        mess(4);
        getch();
        l=3;
        move(3,0);
        clrtobot();
        block(1,0,22,80);
      }
  }
move(23,30);
printw("全部显示, ");
mess(3);
getch();
fclose(pf);

#include </u/ebcsav/include/end>
#include </u/ebcsav/include/mess>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -