winmain.c, etc, whitespace cleanup
This commit is contained in:
parent
3a9ace82bb
commit
90a205d36d
File diff suppressed because it is too large
Load Diff
|
|
@ -1,13 +1,14 @@
|
|||
/* I/O Redirection for Spice 3F4 under Win32s
|
||||
Autor: Wolfgang Muees
|
||||
Stand: 21.05.95
|
||||
*/
|
||||
*/
|
||||
|
||||
#ifndef ngspice_WSTDIO_H
|
||||
#define ngspice_WSTDIO_H
|
||||
#include <stdio.h> /* original definitions */
|
||||
|
||||
#undef getc /* old macros removed */
|
||||
#include <stdio.h> /* original definitions */
|
||||
|
||||
#undef getc /* old macros removed */
|
||||
#undef putc
|
||||
#undef ungetc
|
||||
#undef getchar
|
||||
|
|
@ -15,90 +16,90 @@
|
|||
#undef feof
|
||||
#undef ferror
|
||||
|
||||
/* -------------------------------<forwards>----------------------------------*/
|
||||
/* -------------------------------<forwards>---------------------------------- */
|
||||
|
||||
int win_x_fclose( FILE * stream);
|
||||
int win_x_fflush( FILE * stream);
|
||||
int win_x_fgetc( FILE * stream);
|
||||
int win_x_fgetpos( FILE * stream, fpos_t * pos);
|
||||
char * win_x_fgets(char * s, int n, FILE * stream);
|
||||
int win_x_fprintf(FILE * stream, const char * format, ...);
|
||||
int win_x_fputc(int c, FILE * stream);
|
||||
int win_x_fputs(const char * s, FILE * stream);
|
||||
size_t win_x_fread(void * ptr, size_t size, size_t n, FILE * stream);
|
||||
FILE * win_x_freopen(const char * path, const char * mode, FILE * stream);
|
||||
int win_x_fscanf(FILE * stream, const char * format, ...);
|
||||
int win_x_fseek(FILE * stream, long offset, int whence);
|
||||
int win_x_fsetpos(FILE * stream, const fpos_t*pos);
|
||||
long win_x_ftell(FILE * stream);
|
||||
size_t win_x_fwrite(const void * ptr, size_t size, size_t n, FILE * stream);
|
||||
char * win_x_gets(char * s);
|
||||
void win_x_perror(const char * s);
|
||||
int win_x_printf(const char * format, ...);
|
||||
int win_x_puts(const char * s);
|
||||
int win_x_scanf(const char * format, ...);
|
||||
int win_x_ungetc(int c, FILE * stream);
|
||||
int win_x_vfprintf(FILE * stream, const char * format, void * arglist);
|
||||
/*int win_x_vfscanf(FILE * stream, const char * format, void * arglist);*/
|
||||
int win_x_vprintf(const char * format, void * arglist);
|
||||
/*int win_x_vscanf(const char * format, void * arglist); */
|
||||
#ifdef _MSC_VER
|
||||
int win_x_fclose(FILE *stream);
|
||||
int win_x_fflush(FILE *stream);
|
||||
int win_x_fgetc(FILE *stream);
|
||||
int win_x_fgetpos(FILE *stream, fpos_t *pos);
|
||||
char *win_x_fgets(char *s, int n, FILE *stream);
|
||||
int win_x_fprintf(FILE *stream, const char *format, ...);
|
||||
int win_x_fputc(int c, FILE *stream);
|
||||
int win_x_fputs(const char *s, FILE *stream);
|
||||
size_t win_x_fread(void *ptr, size_t size, size_t n, FILE *stream);
|
||||
FILE *win_x_freopen(const char *path, const char *mode, FILE *stream);
|
||||
int win_x_fscanf(FILE *stream, const char *format, ...);
|
||||
int win_x_fseek(FILE *stream, long offset, int whence);
|
||||
int win_x_fsetpos(FILE *stream, const fpos_t*pos);
|
||||
long win_x_ftell(FILE *stream);
|
||||
size_t win_x_fwrite(const void *ptr, size_t size, size_t n, FILE *stream);
|
||||
char *win_x_gets(char *s);
|
||||
void win_x_perror(const char *s);
|
||||
int win_x_printf(const char *format, ...);
|
||||
int win_x_puts(const char *s);
|
||||
int win_x_scanf(const char *format, ...);
|
||||
int win_x_ungetc(int c, FILE *stream);
|
||||
int win_x_vfprintf(FILE *stream, const char *format, void *arglist);
|
||||
/* int win_x_vfscanf(FILE *stream, const char *format, void *arglist); */
|
||||
int win_x_vprintf(const char *format, void *arglist);
|
||||
/* int win_x_vscanf(const char *format, void *arglist); */
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#if _MSC_VER < 1500
|
||||
/* VC++ 6.0, VC++ 2005 */
|
||||
_CRTIMP int __cdecl read(int fd, void * buf, unsigned int n);
|
||||
_CRTIMP int __cdecl read(int fd, void *buf, unsigned int n);
|
||||
#else
|
||||
/* VC++ 2008 */
|
||||
_CRTIMP int __cdecl read(int fd, _Out_bytecap_(_MaxCharCount) void * buf, _In_ unsigned int n);
|
||||
_CRTIMP int __cdecl read(int fd, _Out_bytecap_(_MaxCharCount) void *buf, _In_ unsigned int n);
|
||||
#endif
|
||||
#else
|
||||
int win_x_read(int fd, char * buf, int n);
|
||||
int win_x_read(int fd, char *buf, int n);
|
||||
#endif
|
||||
int win_x_getc(FILE * fp);
|
||||
|
||||
int win_x_getc(FILE *fp);
|
||||
int win_x_getchar(void);
|
||||
int win_x_putchar(const int c);
|
||||
int win_x_putc(const int c, FILE * fp);
|
||||
int win_x_feof(FILE * fp);
|
||||
int win_x_ferror(FILE * fp);
|
||||
int win_x_putc(const int c, FILE *fp);
|
||||
int win_x_feof(FILE *fp);
|
||||
int win_x_ferror(FILE *fp);
|
||||
int win_x_fputchar(int c);
|
||||
|
||||
/* ------------------------------<New macros>---------------------------------*/
|
||||
|
||||
#define fclose win_x_fclose
|
||||
#define fflush win_x_fflush
|
||||
#define fgetc win_x_fgetc
|
||||
#define fgetpos win_x_fgetpos
|
||||
#define fgets win_x_fgets
|
||||
#define fprintf win_x_fprintf
|
||||
#define fputc win_x_fputc
|
||||
#define fputs win_x_fputs
|
||||
#define fread win_x_fread
|
||||
/* #define freopen win_x_freopen hvogt 10.05.2000 */
|
||||
#define fscanf win_x_fscanf
|
||||
#define fseek win_x_fseek
|
||||
#define fsetpos win_x_fsetpos
|
||||
#define ftell win_x_ftell
|
||||
#define fwrite win_x_fwrite
|
||||
#define gets win_x_gets
|
||||
#define perror win_x_perror
|
||||
#define printf win_x_printf
|
||||
#define puts win_x_puts
|
||||
#define scanf win_x_scanf
|
||||
#define ungetc win_x_ungetc
|
||||
#define vfprintf win_x_vfprintf
|
||||
/*#define vfscanf win_x_vfscanf*/
|
||||
#define vprintf win_x_vprintf
|
||||
/*#define vscanf win_x_vscanf*/
|
||||
#define read win_x_read
|
||||
#define getc win_x_getc
|
||||
#define getchar win_x_getchar
|
||||
#define putchar win_x_putchar
|
||||
#define putc win_x_putc
|
||||
#define feof win_x_feof
|
||||
#define ferror win_x_ferror
|
||||
#define fputchar win_x_fputchar
|
||||
/* ------------------------------<New macros>--------------------------------- */
|
||||
|
||||
#define fclose win_x_fclose
|
||||
#define fflush win_x_fflush
|
||||
#define fgetc win_x_fgetc
|
||||
#define fgetpos win_x_fgetpos
|
||||
#define fgets win_x_fgets
|
||||
#define fprintf win_x_fprintf
|
||||
#define fputc win_x_fputc
|
||||
#define fputs win_x_fputs
|
||||
#define fread win_x_fread
|
||||
/* #define freopen win_x_freopen hvogt 10.05.2000 */
|
||||
#define fscanf win_x_fscanf
|
||||
#define fseek win_x_fseek
|
||||
#define fsetpos win_x_fsetpos
|
||||
#define ftell win_x_ftell
|
||||
#define fwrite win_x_fwrite
|
||||
#define gets win_x_gets
|
||||
#define perror win_x_perror
|
||||
#define printf win_x_printf
|
||||
#define puts win_x_puts
|
||||
#define scanf win_x_scanf
|
||||
#define ungetc win_x_ungetc
|
||||
#define vfprintf win_x_vfprintf
|
||||
/* #define vfscanf win_x_vfscanf */
|
||||
#define vprintf win_x_vprintf
|
||||
/* #define vscanf win_x_vscanf */
|
||||
#define read win_x_read
|
||||
#define getc win_x_getc
|
||||
#define getchar win_x_getchar
|
||||
#define putchar win_x_putchar
|
||||
#define putc win_x_putc
|
||||
#define feof win_x_feof
|
||||
#define ferror win_x_ferror
|
||||
#define fputchar win_x_fputchar
|
||||
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
|||
956
src/winmain.c
956
src/winmain.c
File diff suppressed because it is too large
Load Diff
100
src/winmain.h
100
src/winmain.h
|
|
@ -3,71 +3,73 @@
|
|||
*/
|
||||
|
||||
/* Forward definition of main() */
|
||||
int xmain( int argc, char * argv[]);
|
||||
int xmain(int argc, char *argv[]);
|
||||
|
||||
/* forward of Update function */
|
||||
#ifdef __CYGWIN__
|
||||
static char* rlead(char*);
|
||||
#endif
|
||||
|
||||
void winmessage(char*);
|
||||
|
||||
static void HistoryInit(void);
|
||||
static void HistoryScroll(void);
|
||||
static void HistoryEnter( char * newLine);
|
||||
static char * HistoryGetPrev(void);
|
||||
static char * HistoryGetNext(void);
|
||||
static void HistoryEnter(char *newLine);
|
||||
static char *HistoryGetPrev(void);
|
||||
static char *HistoryGetNext(void);
|
||||
void WaitForIdle(void);
|
||||
static void WaitForMessage(void);
|
||||
static void ClearInput(void);
|
||||
void SetSource( char * Name);
|
||||
void SetAnalyse(char *, int );
|
||||
void SetSource(char *Name);
|
||||
void SetAnalyse(char *, int);
|
||||
static void AdjustScroller(void);
|
||||
static void _DeleteFirstLine(void);
|
||||
static void AppendChar( char c);
|
||||
static void AppendString( const char * Line);
|
||||
static void DisplayText( void);
|
||||
static void AppendChar(char c);
|
||||
static void AppendString(const char *Line);
|
||||
static void DisplayText(void);
|
||||
|
||||
static int w_getch(void);
|
||||
static int w_putch( int c);
|
||||
static int w_putch(int c);
|
||||
|
||||
static void Main_OnSize(HWND hwnd, UINT state, int cx, int cy);
|
||||
static void PostSpiceCommand( const char * const cmd);
|
||||
static LRESULT CALLBACK MainWindowProc( HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||
static LRESULT CALLBACK StringWindowProc( HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||
static LRESULT CALLBACK TextWindowProc( HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||
static void PostSpiceCommand(const char *const cmd);
|
||||
static LRESULT CALLBACK MainWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||
static LRESULT CALLBACK StringWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||
static LRESULT CALLBACK TextWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||
static void Element_OnPaint(HWND hwnd);
|
||||
static LRESULT CALLBACK ElementWindowProc( HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||
static int MakeArgcArgv(char *cmdline,int *argc,char ***argv);
|
||||
static LRESULT CALLBACK ElementWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||
static int MakeArgcArgv(char *cmdline, int *argc, char ***argv);
|
||||
|
||||
int win_x_fclose( FILE * stream);
|
||||
int win_x_fflush( FILE * stream);
|
||||
int win_x_fgetc( FILE * stream);
|
||||
int win_x_fgetpos( FILE * stream, fpos_t * pos);
|
||||
char * win_x_fgets(char * s, int n, FILE * stream);
|
||||
int win_x_fprintf(FILE * stream, const char * format, ...);
|
||||
int win_x_fputc(int c, FILE * stream);
|
||||
int win_x_fputs(const char * s, FILE * stream);
|
||||
size_t win_x_fread(void * ptr, size_t size, size_t n, FILE * stream);
|
||||
FILE * win_x_freopen(const char * path, const char * mode, FILE * stream);
|
||||
int win_x_fscanf(FILE * stream, const char * format, ...);
|
||||
int win_x_fseek(FILE * stream, long offset, int whence);
|
||||
int win_x_fsetpos(FILE * stream, const fpos_t*pos);
|
||||
long win_x_ftell(FILE * stream);
|
||||
size_t win_x_fwrite(const void * ptr, size_t size, size_t n, FILE * stream);
|
||||
char * win_x_gets(char * s);
|
||||
void win_x_perror(const char * s);
|
||||
int win_x_printf(const char * format, ...);
|
||||
int win_x_puts(const char * s);
|
||||
int win_x_scanf(const char * format, ...);
|
||||
int win_x_ungetc(int c, FILE * stream);
|
||||
int win_x_vfprintf(FILE * stream, const char * format, void * arglist);
|
||||
/*int win_x_vfscanf(FILE * stream, const char * format, void * arglist);*/
|
||||
int win_x_vprintf(const char * format, void * arglist);
|
||||
/*int win_x_vscanf(const char * format, void * arglist); */
|
||||
int win_x_read(int fd, char * buf, int n);
|
||||
int win_x_getc(FILE * fp);
|
||||
int win_x_getchar(void);
|
||||
int win_x_putchar(const int c);
|
||||
int win_x_putc(const int c, FILE * fp);
|
||||
int win_x_feof(FILE * fp);
|
||||
int win_x_ferror(FILE * fp);
|
||||
int win_x_fputchar(int c);
|
||||
int win_x_fclose(FILE *stream);
|
||||
int win_x_fflush(FILE *stream);
|
||||
int win_x_fgetc(FILE *stream);
|
||||
int win_x_fgetpos(FILE *stream, fpos_t *pos);
|
||||
char *win_x_fgets(char *s, int n, FILE *stream);
|
||||
int win_x_fprintf(FILE *stream, const char *format, ...);
|
||||
int win_x_fputc(int c, FILE *stream);
|
||||
int win_x_fputs(const char *s, FILE *stream);
|
||||
size_t win_x_fread(void *ptr, size_t size, size_t n, FILE *stream);
|
||||
FILE *win_x_freopen(const char *path, const char *mode, FILE *stream);
|
||||
int win_x_fscanf(FILE *stream, const char *format, ...);
|
||||
int win_x_fseek(FILE *stream, long offset, int whence);
|
||||
int win_x_fsetpos(FILE *stream, const fpos_t*pos);
|
||||
long win_x_ftell(FILE *stream);
|
||||
size_t win_x_fwrite(const void *ptr, size_t size, size_t n, FILE *stream);
|
||||
char *win_x_gets(char *s);
|
||||
void win_x_perror(const char *s);
|
||||
int win_x_printf(const char *format, ...);
|
||||
int win_x_puts(const char *s);
|
||||
int win_x_scanf(const char *format, ...);
|
||||
int win_x_ungetc(int c, FILE *stream);
|
||||
int win_x_vfprintf(FILE *stream, const char *format, void *arglist);
|
||||
/* int win_x_vfscanf(FILE *stream, const char *format, void *arglist); */
|
||||
int win_x_vprintf(const char *format, void *arglist);
|
||||
/* int win_x_vscanf(const char *format, void *arglist); */
|
||||
int win_x_read(int fd, char *buf, int n);
|
||||
int win_x_getc(FILE *fp);
|
||||
int win_x_getchar(void);
|
||||
int win_x_putchar(const int c);
|
||||
int win_x_putc(const int c, FILE *fp);
|
||||
int win_x_feof(FILE *fp);
|
||||
int win_x_ferror(FILE *fp);
|
||||
int win_x_fputchar(int c);
|
||||
|
|
|
|||
Loading…
Reference in New Issue