rt代码如下:
static struct key
{
   char *name;
   void (*f)(struct info *);
}keys[]={
   {"all",   f_all,   0}
   {"cbreak",f_cbreak,f_offok}
   };
   

解决方案 »

  1.   

    //参考如下代码
    procedure f_all(info: Pointer);
    begin
      { TODO }
    end;procedure f_cbreak(info: Pointer);
    begin
      { TODO }
    end;type
      TProcInfo = procedure(info: Pointer);  key = record
        name: PChar;
        f: TProcInfo;
        info: Pointer;
      end;
    const
      f_offok = nil;
      keys: array[0..1] of key =
    (
    (name: 'all'; f: f_all; info: nil),
    (name: 'cbreak'; f: f_cbreak; info: f_offok)
    );