winpffin.c

来自「详细介绍了一篇关于pci开发的接口芯片」· C语言 代码 · 共 31 行

C
31
字号
/*  CXL - Copyright (c) 1987-1989 by Mike Smedley - All Rights Reserved  */
/*  WINPFFIN.C  - finds a field's record using it's window coordinates  */

#include "cxlwin.h"

struct _field_t *winpffind(int wrow,int wcol)
{
    struct _field_t *test;

    /* check for active window */
    if(!_winfo.total) {
        _winfo.errno=W_NOACTIVE;
        return(NULL);
    }

    /* check for existance of a form */
    if(_winfo.active->form==NULL) {
        _winfo.errno=W_NOFRMDEF;
        return(NULL);
    }

    /* scan back through linked list of fields searching for the field */
    /* that begins at the same window coordinates as those given       */
    for(test=_winfo.active->form->field;test!=NULL;test=test->prev)
        if(test->wrow==wrow&&test->wcol==wcol) break;

    /* return to caller */
    _winfo.errno=((test==NULL)?W_NOTFOUND:W_NOERROR);
    return(test);
}

⌨️ 快捷键说明

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