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

📄 wprints.c

📁 详细介绍了一篇关于pci开发的接口芯片
💻 C
字号:
/*  CXL - Copyright (c) 1987-1989 by Mike Smedley - All Rights Reserved  */
/*  WPRINTS.C   - displays a string inside active window  */

#include <conio.h>
#include <dos.h>
#include <string.h>
#include "cxldef.h"
#include "cxlvid.h"
#include "cxlwin.h"

int wprints(int wrow,int wcol,int attr,char *str)
{
    register int col,max;
    int row,border;

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

    /* check for valid coordinates */
    if(wchkcoord(wrow,wcol)) return(_winfo.errno=W_INVCOORD);

    /* see if window has border */
    border=_winfo.active->border;

    /* calculate effective coordinates */
    row=_winfo.active->srow+wrow+border;
    col=_winfo.active->scol+wcol+border;
    max=((_winfo.active->ecol-border)-col+1);

    /* see if wraparound is needed - if not, use faster prints() function */
    if(strlen(str)<=max) {
        prints(row,col,attr,str);
        return(_winfo.errno=W_NOERROR);
    }

    /* display as much of string as possible */
    while(*str&&max--) printc(row,col++,attr,*str++);
    return(_winfo.errno=W_STRLONG);
}

⌨️ 快捷键说明

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