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

📄 util.c

📁 ngspice又一个电子CAD仿真软件代码.功能更全
💻 C
字号:
/*============================================================================FILE  util.cMEMBER OF process cmppCopyright 1991Georgia Tech Research CorporationAtlanta, Georgia 30332All Rights ReservedPROJECT A-8503AUTHORS    9/12/91  Bill Kuhn and Steve TynorMODIFICATIONS    <date> <person name> <nature of modifications>SUMMARY    This file contains miscellaneous utility functions used in cmpp.INTERFACES    init_error()    print_error()    str_to_lower()REFERENCED FILES    None.NON-STANDARD FEATURES    None.============================================================================*/#include  "cmpp.h"#include  <stdio.h>#include  <ctype.h>#include  <string.h>/* *********************************************************************** */char *prog_name;/* Initialize print_error() with the name of the program */void init_error (char *program_name){   prog_name = program_name;}/* Print an error message to stderr */void print_error(    char *msg)       /* The message to write */{    fprintf(stderr, "%s: %s\n", prog_name, msg);}/* Convert a string to all lower case */void str_to_lower(char *s){    int     i;    char    c;    for(i = 0; (c = s[i]) != '\0'; i++)        if(isalpha(c))            if(isupper(c))                s[i] = tolower(c);}

⌨️ 快捷键说明

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