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

📄 pfwstdio.h

📁 电力系统分析计算 学习调试程序 UNIX / LINUX / CYGWIN 系统使用
💻 H
字号:
//---------------------------------------------------------------------------// Pflow for Windows:  Redefinition in C of several stdio.h routines//                     and variables//// Claudio Canizares, Shu Zhang (c) 1996, 2006// University of Waterloo//---------------------------------------------------------------------------#ifdef WINDOWS#include <iostream>#include <fstream>#include <setjmp.h>#include "StdAfx.h"#else#include "stdio.h"#endif// Define Screen data type to work with Windows Paint and some// other variables#define TABSPACES 4#define BUFFER 512#define argc Argc#define argv Argv#ifdef WINDOWSextern jmp_buf exit_main;#endif//stops current execution. jumps out of mainvoid stopExecute(int status);//replacement for fprintf/printf//does fprintf in unix, does fprintf or print to screen in windowsint fCustomPrint(FILE *stream, const char *format,...);//does printf in unix, does printf or print to screen in windowsint CustomPrint( const char *format,... );/*// Redefinition of FILE for input and output// NOTES: - stdio.h cannot be used in Windows//        - ofstream operations don't work properly; file names must//          be used instead//        - pointers to windows don't work eithertypedef struct {  char Name[100];  fstream ios;} FILE;#define _FILE_DEFINEDFILE *stdout, *stdin, *stderr;// Redefine:// * Output to file FileOut using Formatint fprintf(FILE *FileOut,const char *Format,...);// * Open a fileFILE *fopen(const char *FileName,const char *mode);// * Associate an existing stream to a fileFILE *freopen(const char *FileName,const char *mode,FILE *File);// * Close a fileint fclose(FILE *File);/*typedef struct ScreenType {   char *Line;   ScreenType *Next;} ScreenType;#ifndef _PFLOW_WINDOWS// Redefinition of some std* variables and command line arguments// and exit labelextern int Argc;extern char **Argv;extern jmp_buf exit_main;#endif/*// * Output to stdout using Formatint printf(const char *Format,...);// * Output to string Buffer using Formatint sprintf(char *Buffer,const char *Format,...);// * Read line up to N number of characters from input file FileIn//   and put it into string Bufferchar *fgets(char *Buffer, int n, FILE *FileIn);// * Read from string Buffer using Formatint sscanf(const char *Buffer, const char *Format, ...);// * Read from stdin using Formatint scanf(const char *Format, ...);*/

⌨️ 快捷键说明

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