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

📄 help.c

📁 spice中支持多层次元件模型仿真的可单独运行的插件源码
💻 C
字号:
/**********Copyright 1990 Regents of the University of California.  All rights reserved.Author: 1986 Wayne A. Christopher, U. C. Berkeley CAD Group **********//* * The main routine for the help system in stand-alone mode. */#include "spice.h"#ifdef HAS_BSDDIRS#  include <sys/types.h>#  include <sys/dir.h>#else#  ifdef HAS_SYSVDIRS#    include <sys/types.h>#    include <dirent.h>#    ifndef direct#      define direct dirent#    endif#  endif#endif#ifdef HAS_GETPW#  include <pwd.h>#endif#include "cpdefs.h"#include "hlpdefs.h"#include "suffix.h"#ifdef HAS_X10Display *X_display = (Display *) NULL;#endif#ifdef HAS_X11Widget toplevel;#endifFILE *cp_in, *cp_out, *cp_err;/* dummy declaration so CP.a doesn't pull in lexical.o and other objects */bool cp_interactive = false;char *hlp_filelist[] = { "spice", 0 };/* ARGSUSED */voidmain(ac, av)    int ac;    char **av;{    wordlist *wl = NULL;#ifdef HAS_X11    char *displayname;    /* grrr, Xtk forced contortions */    char *argv[2];    int argc = 2;    char buf[512];#endif    ivars( );    cp_in = stdin;    cp_out = stdout;    cp_err = stderr;#ifdef HAS_X11    if (cp_getvar("display", VT_STRING, buf)) {      displayname = buf;    } else if (!(displayname = getenv("DISPLAY"))) {      fprintf(stderr, "Can't open X display.");      goto out;    }    argv[0] = "nutmeg";    argv[1] = displayname;    /* initialize X toolkit */    toplevel = XtInitialize("nutmeg", "Nutmeg", NULL, 0, &argc, argv);#endifout:    if (ac > 1)        wl = wl_build(av + 1);    hlp_main(Help_Path, wl);#ifdef HAS_X11    if (hlp_usex) {	printf("Hit control-C when done.\n");		/* sigh */	XtMainLoop();    }#endif    exit(EXIT_NORMAL);}voidfatal(s)    char *s;{    fprintf(stderr, "fatal error: %s\n", s);    exit(1);}voidcp_printword(s)    char *s;{    printf("%s", s);    return;}/* ARGSUSED */boolcp_getvar(n, t, r)    char *n, *r;    int t;{    return (false);}char *cp_tildexpand(s)	char	*s;{	return tilde_expand(s);}

⌨️ 快捷键说明

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