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

📄 com_ahelp.c

📁 ngspice又一个电子CAD仿真软件代码.功能更全
💻 C
字号:
#include <config.h>#include <ngspice.h>#include <bool.h>#include <wordlist.h>#include <fteext.h>#include "variable.h"#include "com_help.h"#include "hcomp.h"#include "ftehelp.h"#include "plotting/plotting.h"voidcom_ahelp(wordlist *wl){    int i, n;    /* assert: number of commands must be less than 512 */    struct comm *cc[512];    int env = 0;    struct comm *com;    int level;    char slevel[256];    if (wl) {	com_help(wl);	return;    }    out_init();    /* determine environment */    if (plot_list->pl_next) {   /* plots load */	env |= E_HASPLOTS;    } else {	env |= E_NOPLOTS;    }    /* determine level */    if (cp_getvar("level", VT_STRING, slevel)) {	switch (*slevel) {        case 'b':   level = 1;            break;        case 'i':   level = 2;            break;        case 'a':   level = 4;            break;        default:    level = 1;            break;	}    } else {	level = 1;    }    out_printf(	"For a complete description read the Spice3 User's Manual manual.\n");    out_printf(	"For a list of all commands type \"help all\", for a short\n");    out_printf(	"description of \"command\", type \"help command\".\n");    /* sort the commands */    for (n = 0; cp_coms[n].co_func != (void (*)()) NULL; n++) {	cc[n] = &cp_coms[n];    }    qsort((char *) cc, n, sizeof(struct comm *), hcomp);    /* filter the commands */    for (i=0; i< n; i++) {	com = cc[i];	if ((com->co_env < (level << 13)) && (!(com->co_env & 4095) ||					      (env & com->co_env))) {	    if ((com->co_spiceonly && ft_nutmeg) ||		(com->co_help == (char *) NULL)) {		continue;	    }	    out_printf("%s ", com->co_comname);	    out_printf(com->co_help, cp_program);	    out_send("\n");	}    }    out_send("\n");    return;}

⌨️ 快捷键说明

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