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

📄 input.c

📁 ngspice又一个电子CAD仿真软件代码.功能更全
💻 C
字号:
/**********Copyright 1990 Regents of the University of California.  All rights reserved.Author: 1988 Jeffrey M. Hsu$Id: input.c,v 1.3 2005/05/30 20:28:44 sjborley Exp $**********//* * Stand-alone input routine. */#include <config.h>#include <ngspice.h>#include <errno.h>#include "fteinput.h"#include "input.h"#include "cpextern.h"#include "../display.h"/* A special 'getc' so that we can deal with ^D properly. There is no way for * stdio to know if we have typed a ^D after some other characters, so * don't use buffering at all */intinchar(FILE *fp){    char c;#ifndef HAS_WINDOWS        int i;    if (cp_interactive && !cp_nocc) {      do {	i = read((int) fileno(fp), &c, 1);	} while (i == -1 && errno == EINTR);      if (i == 0 || c == '\004')        return (EOF);      else if (i == -1) {        perror("read");        return (EOF);      } else        return ((int) c);    } else#endif        c = getc(fp);    return ((int) c);}int input(FILE *fp){    REQUEST request;    RESPONSE response;    request.option = char_option;    request.fp = fp;    Input(&request, &response);    return(response.reply.ch);}

⌨️ 快捷键说明

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