inplist.c
来自「支持数字元件仿真的SPICE插件」· C语言 代码 · 共 57 行
C
57 行
/* * Copyright (c) 1985 Thomas L. Quarles */ /* INPlist(file,deck,type) * provide an input listing on the specified file of the given * card deck. The listing should be of either PHYSICAL or LOGICAL * lines as specified by the type parameter. */#include "prefix.h"#include <stdio.h>#include "INPdefs.h"#include "util.h"#include "suffix.h"RCSID("INPlist.c $Revision: 1.1 $ on $Date: 91/04/02 11:56:55 $")voidINPlist(file,deck,type) FILE *file; card *deck; int type;{ card *here; card *there; if(type == LOGICAL) { for(here = deck;here != NULL;here = here->nextcard) { fprintf(file,"%6d : %s\n",here->linenum, here->line); if(here->error != (char *)NULL) { fprintf(file,"%s",here->error); } } } else if (type == PHYSICAL) { for(here = deck;here != NULL;here = here->nextcard) { if(here->actualLine == (card *)NULL) { fprintf(file,"%6d : %s\n",here->linenum,here->line); if(here->error != (char *)NULL) { fprintf(file,"%s",here->error); } } else { for(there = here->actualLine;there != NULL; there=there->nextcard) { fprintf(file,"%6d : %s\n",there->linenum, there->line); if(there->error != (char *)NULL) { fprintf(file,"%s",there->error); } } } } }}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?