From: <ai...@us...> - 2009-10-21 01:01:15
|
Revision: 10538 http://plplot.svn.sourceforge.net/plplot/?rev=10538&view=rev Author: airwin Date: 2009-10-21 01:01:07 +0000 (Wed, 21 Oct 2009) Log Message: ----------- Style header files and configuration templates for them in the include directory (excluding include/qt.h since that is C++) and for the config.h configuration template, config.h.cmake. Modified Paths: -------------- trunk/config.h.cmake trunk/include/dirent_msvc.h trunk/include/disptab.h trunk/include/drivers.h trunk/include/gcw.h trunk/include/ltdl_win32.h trunk/include/metadefs.h trunk/include/moc_files.h.in trunk/include/pdf.h trunk/include/plConfig.h.cmake trunk/include/plDevs.h.cmake trunk/include/plcore.h trunk/include/pldebug.h trunk/include/pldll.h.in trunk/include/plevent.h trunk/include/plfci-truetype.h trunk/include/plfci-type1.h trunk/include/plfreetype.h trunk/include/plplot.h trunk/include/plplotP.h trunk/include/plplotcanvas-hacktext.h trunk/include/plplotcanvas.h trunk/include/plstrm.h trunk/include/plunicode-type1.h trunk/include/plxwd.h trunk/include/ps.h Modified: trunk/config.h.cmake =================================================================== --- trunk/config.h.cmake 2009-10-21 00:33:14 UTC (rev 10537) +++ trunk/config.h.cmake 2009-10-21 01:01:07 UTC (rev 10538) @@ -1,39 +1,39 @@ /* Configured (by CMake) macros for PLplot that are required for the - core build but _not_ required for the build of the installed - examples (and presumably any user applications). Therefore, the - configured config.h should not be installed. In contrast, - include/plConfig.h.cmake (note, plConfig.h #includes config.h for - the core build because HAVE_CONFIG_H is #defined in that case) - contains configured macros that are required for the core build, - installed examples build, and build of user applications. - Therefore, in contrast to config.h, plConfig.h should be installed. + * core build but _not_ required for the build of the installed + * examples (and presumably any user applications). Therefore, the + * configured config.h should not be installed. In contrast, + * include/plConfig.h.cmake (note, plConfig.h #includes config.h for + * the core build because HAVE_CONFIG_H is #defined in that case) + * contains configured macros that are required for the core build, + * installed examples build, and build of user applications. + * Therefore, in contrast to config.h, plConfig.h should be installed. + * + * Maintenance issue: in makes no sense to configure duplicate macros + * for both config.h and plConfig.h. Therefore, when adding a macro + * decide which file to put it in depending on whether the result is + * needed for the installed examples build or not. Furthermore, move + * configured macros from one file to the other as needed depending on + * that criterion, but do not copy them. + * + */ - Maintenance issue: in makes no sense to configure duplicate macros - for both config.h and plConfig.h. Therefore, when adding a macro - decide which file to put it in depending on whether the result is - needed for the installed examples build or not. Furthermore, move - configured macros from one file to the other as needed depending on - that criterion, but do not copy them. - -*/ - /* Location of executables */ -#define BIN_DIR "@BIN_DIR@" +#define BIN_DIR "@BIN_DIR@" /* Location of Build tree */ -#define BUILD_DIR "@BUILD_DIR@" +#define BUILD_DIR "@BUILD_DIR@" /* Location of package data files */ -#define DATA_DIR "@DATA_DIR@" +#define DATA_DIR "@DATA_DIR@" /* Location of dynamically loaded drivers */ -#define DRV_DIR "@DRV_DIR@" +#define DRV_DIR "@DRV_DIR@" /* Name of the default cmap0 palette to use */ -#define PL_DEFAULT_CMAP0_FILE "@DEFAULT_CMAP0_FILE@" +#define PL_DEFAULT_CMAP0_FILE "@DEFAULT_CMAP0_FILE@" /* Name of the default cmap1 palette to use */ -#define PL_DEFAULT_CMAP1_FILE "@DEFAULT_CMAP1_FILE@" +#define PL_DEFAULT_CMAP1_FILE "@DEFAULT_CMAP1_FILE@" /* Define if there is support for dynamically loaded drivers */ #cmakedefine ENABLE_DYNDRIVERS @@ -42,7 +42,7 @@ #cmakedefine HAVE_CMATH 1 /* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'. - */ + */ #cmakedefine HAVE_DIRENT_H 1 /* Define to 1 if you have the <dlfcn.h> header file. */ @@ -94,7 +94,7 @@ #cmakedefine HAVE_LIBART_LGPL_LIBART_H 1 /* Define to 1 if you have the <libgnomecanvas/libgnomecanvas.h> header file. - */ + */ #cmakedefine HAVE_LIBGNOMECANVAS_LIBGNOMECANVAS_H 1 /* Define to 1 if you have the <libgnomeprint/gnome-print.h> header file. */ @@ -131,11 +131,11 @@ #cmakedefine HAVE_STDLIB_H 1 /* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'. - */ + */ #cmakedefine HAVE_SYS_DIR_H 1 /* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'. - */ + */ #cmakedefine HAVE_SYS_NDIR_H 1 /* Define to 1 if you have the <sys/stat.h> header file. */ @@ -160,121 +160,121 @@ #cmakedefine NEED_SYS_TYPE_H /* Name of package */ -#define PACKAGE "@PACKAGE@" +#define PACKAGE "@PACKAGE@" /* Define if the win32 ltdl implementation should be used */ #cmakedefine LTDL_WIN32 /* Portable definition for PTHREAD_MUTEX_RECURSIVE */ -#define PLPLOT_MUTEX_RECURSIVE @PLPLOT_MUTEX_RECURSIVE@ +#define PLPLOT_MUTEX_RECURSIVE @PLPLOT_MUTEX_RECURSIVE@ /* Directory containing fonts that are accessible from freetype */ -#define PL_FREETYPE_FONT_DIR "@PL_FREETYPE_FONT_DIR@" +#define PL_FREETYPE_FONT_DIR "@PL_FREETYPE_FONT_DIR@" /* MONO font accessible from freetype */ -#define PL_FREETYPE_MONO "@PL_FREETYPE_MONO@" +#define PL_FREETYPE_MONO "@PL_FREETYPE_MONO@" /* MONO_BOLD font accessible from freetype */ -#define PL_FREETYPE_MONO_BOLD "@PL_FREETYPE_MONO_BOLD@" +#define PL_FREETYPE_MONO_BOLD "@PL_FREETYPE_MONO_BOLD@" /* MONO_BOLD_ITALIC font accessible from freetype */ -#define PL_FREETYPE_MONO_BOLD_ITALIC "@PL_FREETYPE_MONO_BOLD_ITALIC@" +#define PL_FREETYPE_MONO_BOLD_ITALIC "@PL_FREETYPE_MONO_BOLD_ITALIC@" /* MONO_BOLD_OBLIQUE font accessible from freetype */ -#define PL_FREETYPE_MONO_BOLD_OBLIQUE "@PL_FREETYPE_MONO_BOLD_OBLIQUE@" +#define PL_FREETYPE_MONO_BOLD_OBLIQUE "@PL_FREETYPE_MONO_BOLD_OBLIQUE@" /* MONO_ITALIC font accessible from freetype */ -#define PL_FREETYPE_MONO_ITALIC "@PL_FREETYPE_MONO_ITALIC@" +#define PL_FREETYPE_MONO_ITALIC "@PL_FREETYPE_MONO_ITALIC@" /* MONO_OBLIQUE font accessible from freetype */ -#define PL_FREETYPE_MONO_OBLIQUE "@PL_FREETYPE_MONO_OBLIQUE@" +#define PL_FREETYPE_MONO_OBLIQUE "@PL_FREETYPE_MONO_OBLIQUE@" /* SANS font accessible from freetype */ -#define PL_FREETYPE_SANS "@PL_FREETYPE_SANS@" +#define PL_FREETYPE_SANS "@PL_FREETYPE_SANS@" /* SANS_BOLD font accessible from freetype */ -#define PL_FREETYPE_SANS_BOLD "@PL_FREETYPE_SANS_BOLD@" +#define PL_FREETYPE_SANS_BOLD "@PL_FREETYPE_SANS_BOLD@" /* SANS_BOLD_ITALIC font accessible from freetype */ -#define PL_FREETYPE_SANS_BOLD_ITALIC "@PL_FREETYPE_SANS_BOLD_ITALIC@" +#define PL_FREETYPE_SANS_BOLD_ITALIC "@PL_FREETYPE_SANS_BOLD_ITALIC@" /* SANS_BOLD_OBLIQUE font accessible from freetype */ -#define PL_FREETYPE_SANS_BOLD_OBLIQUE "@PL_FREETYPE_SANS_BOLD_OBLIQUE@" +#define PL_FREETYPE_SANS_BOLD_OBLIQUE "@PL_FREETYPE_SANS_BOLD_OBLIQUE@" /* SANS_ITALIC font accessible from freetype */ -#define PL_FREETYPE_SANS_ITALIC "@PL_FREETYPE_SANS_ITALIC@" +#define PL_FREETYPE_SANS_ITALIC "@PL_FREETYPE_SANS_ITALIC@" /* SANS_OBLIQUE font accessible from freetype */ -#define PL_FREETYPE_SANS_OBLIQUE "@PL_FREETYPE_SANS_OBLIQUE@" +#define PL_FREETYPE_SANS_OBLIQUE "@PL_FREETYPE_SANS_OBLIQUE@" /* SCRIPT font accessible from freetype */ -#define PL_FREETYPE_SCRIPT "@PL_FREETYPE_SCRIPT@" +#define PL_FREETYPE_SCRIPT "@PL_FREETYPE_SCRIPT@" /* SCRIPT_BOLD font accessible from freetype */ -#define PL_FREETYPE_SCRIPT_BOLD "@PL_FREETYPE_SCRIPT_BOLD@" +#define PL_FREETYPE_SCRIPT_BOLD "@PL_FREETYPE_SCRIPT_BOLD@" /* SCRIPT_BOLD_ITALIC font accessible from freetype */ -#define PL_FREETYPE_SCRIPT_BOLD_ITALIC "@PL_FREETYPE_SCRIPT_BOLD_ITALIC@" +#define PL_FREETYPE_SCRIPT_BOLD_ITALIC "@PL_FREETYPE_SCRIPT_BOLD_ITALIC@" /* SCRIPT_BOLD_OBLIQUE font accessible from freetype */ -#define PL_FREETYPE_SCRIPT_BOLD_OBLIQUE "@PL_FREETYPE_SCRIPT_BOLD_OBLIQUE@" +#define PL_FREETYPE_SCRIPT_BOLD_OBLIQUE "@PL_FREETYPE_SCRIPT_BOLD_OBLIQUE@" /* SCRIPT_ITALIC font accessible from freetype */ -#define PL_FREETYPE_SCRIPT_ITALIC "@PL_FREETYPE_SCRIPT_ITALIC@" +#define PL_FREETYPE_SCRIPT_ITALIC "@PL_FREETYPE_SCRIPT_ITALIC@" /* SCRIPT_OBLIQUE font accessible from freetype */ -#define PL_FREETYPE_SCRIPT_OBLIQUE "@PL_FREETYPE_SCRIPT_OBLIQUE@" +#define PL_FREETYPE_SCRIPT_OBLIQUE "@PL_FREETYPE_SCRIPT_OBLIQUE@" /* SERIF font accessible from freetype */ -#define PL_FREETYPE_SERIF "@PL_FREETYPE_SERIF@" +#define PL_FREETYPE_SERIF "@PL_FREETYPE_SERIF@" /* SERIF_BOLD font accessible from freetype */ -#define PL_FREETYPE_SERIF_BOLD "@PL_FREETYPE_SERIF_BOLD@" +#define PL_FREETYPE_SERIF_BOLD "@PL_FREETYPE_SERIF_BOLD@" /* SERIF_BOLD_ITALIC font accessible from freetype */ -#define PL_FREETYPE_SERIF_BOLD_ITALIC "@PL_FREETYPE_SERIF_BOLD_ITALIC@" +#define PL_FREETYPE_SERIF_BOLD_ITALIC "@PL_FREETYPE_SERIF_BOLD_ITALIC@" /* SERIF_BOLD_OBLIQUE font accessible from freetype */ -#define PL_FREETYPE_SERIF_BOLD_OBLIQUE "@PL_FREETYPE_SERIF_BOLD_OBLIQUE@" +#define PL_FREETYPE_SERIF_BOLD_OBLIQUE "@PL_FREETYPE_SERIF_BOLD_OBLIQUE@" /* SERIF_ITALIC font accessible from freetype */ -#define PL_FREETYPE_SERIF_ITALIC "@PL_FREETYPE_SERIF_ITALIC@" +#define PL_FREETYPE_SERIF_ITALIC "@PL_FREETYPE_SERIF_ITALIC@" /* SERIF_OBLIQUE font accessible from freetype */ -#define PL_FREETYPE_SERIF_OBLIQUE "@PL_FREETYPE_SERIF_OBLIQUE@" +#define PL_FREETYPE_SERIF_OBLIQUE "@PL_FREETYPE_SERIF_OBLIQUE@" /* Symbol font accessible from freetype */ -#define PL_FREETYPE_SYMBOL "@PL_FREETYPE_SYMBOL@" +#define PL_FREETYPE_SYMBOL "@PL_FREETYPE_SYMBOL@" /* SYMBOL_BOLD font accessible from freetype */ -#define PL_FREETYPE_SYMBOL_BOLD "@PL_FREETYPE_SYMBOL_BOLD@" +#define PL_FREETYPE_SYMBOL_BOLD "@PL_FREETYPE_SYMBOL_BOLD@" /* SYMBOL_BOLD_ITALIC font accessible from freetype */ -#define PL_FREETYPE_SYMBOL_BOLD_ITALIC "@PL_FREETYPE_SYMBOL_BOLD_ITALIC@" +#define PL_FREETYPE_SYMBOL_BOLD_ITALIC "@PL_FREETYPE_SYMBOL_BOLD_ITALIC@" /* SYMBOL_BOLD_OBLIQUE font accessible from freetype */ -#define PL_FREETYPE_SYMBOL_BOLD_OBLIQUE "@PL_FREETYPE_SYMBOL_BOLD_OBLIQUE@" +#define PL_FREETYPE_SYMBOL_BOLD_OBLIQUE "@PL_FREETYPE_SYMBOL_BOLD_OBLIQUE@" /* SYMBOL_ITALIC font accessible from freetype */ -#define PL_FREETYPE_SYMBOL_ITALIC "@PL_FREETYPE_SYMBOL_ITALIC@" +#define PL_FREETYPE_SYMBOL_ITALIC "@PL_FREETYPE_SYMBOL_ITALIC@" /* SYMBOL_OBLIQUE font accessible from freetype */ -#define PL_FREETYPE_SYMBOL_OBLIQUE "@PL_FREETYPE_SYMBOL_OBLIQUE@" +#define PL_FREETYPE_SYMBOL_OBLIQUE "@PL_FREETYPE_SYMBOL_OBLIQUE@" /* Define as the return type of signal handlers (`int' or `void'). */ -#define RETSIGTYPE @RETSIGTYPE@ +#define RETSIGTYPE @RETSIGTYPE@ /* Location of Source tree */ -#define SOURCE_DIR "@SOURCE_DIR@" +#define SOURCE_DIR "@SOURCE_DIR@" /* Define to 1 if you have the ANSI C header files. */ #cmakedefine STDC_HEADERS 1 /* Location of Tcl stuff */ -#define TCL_DIR "@TCL_DIR@" +#define TCL_DIR "@TCL_DIR@" /* Version number of package */ -#define VERSION "@VERSION@" +#define VERSION "@VERSION@" /* Define if csa is desired */ #cmakedefine WITH_CSA Modified: trunk/include/dirent_msvc.h =================================================================== --- trunk/include/dirent_msvc.h 2009-10-21 00:33:14 UTC (rev 10537) +++ trunk/include/dirent_msvc.h 2009-10-21 01:01:07 UTC (rev 10538) @@ -1,8 +1,8 @@ /* * dirent.h - dirent API for Microsoft Visual Studio - * + * * Copyright (C) 2006 Toni Ronkko - * + * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * ``Software''), to deal in the Software without restriction, including @@ -10,10 +10,10 @@ * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: - * + * * The above copyright notice and this permission notice shall be included * in all copies or substantial portions of the Software. - * + * * THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. @@ -33,13 +33,13 @@ * Bug fix: due to the strncpy_s() function this file only compiled in * Visual Studio 2005. Using the new string functions only when the * compiler version allows. - * + * * Nov 2, 2006, Toni Ronkko * Major update: removed support for Watcom C, MS-DOS and Turbo C to * simplify the file, updated the code to compile cleanly on Visual * Studio 2005 with both unicode and multi-byte character strings, * removed rewinddir() as it had a bug. - * + * * Aug 20, 2006, Toni Ronkko * Removed all remarks about MSVC 1.0, which is antiqued now. Simplified * comments by removing SGML tags. @@ -61,40 +61,42 @@ #include <assert.h> -typedef struct dirent { - /* name of current directory entry (a multi-byte character string) */ - char d_name[MAX_PATH + 1]; +typedef struct dirent +{ + /* name of current directory entry (a multi-byte character string) */ + char d_name[MAX_PATH + 1]; - /* file attributes */ - WIN32_FIND_DATAA data; + /* file attributes */ + WIN32_FIND_DATAA data; } dirent; -typedef struct DIR { - /* current directory entry */ - dirent current; +typedef struct DIR +{ + /* current directory entry */ + dirent current; - /* is there an un-processed entry in current? */ - int cached; + /* is there an un-processed entry in current? */ + int cached; - /* file search handle */ - HANDLE search_handle; + /* file search handle */ + HANDLE search_handle; - /* search pattern (3 = zero terminator + pattern "\\*") */ - char patt[MAX_PATH + 3]; + /* search pattern (3 = zero terminator + pattern "\\*") */ + char patt[MAX_PATH + 3]; } DIR; -static DIR *opendir (const char *dirname); -static struct dirent *readdir (DIR *dirp); -static int closedir (DIR *dirp); +static DIR *opendir( const char *dirname ); +static struct dirent *readdir( DIR *dirp ); +static int closedir( DIR *dirp ); /* use the new safe string functions introduced in Visual Studio 2005 */ -#if defined(_MSC_VER) && _MSC_VER >= 1400 -# define STRNCPY(dest,src,size) strncpy_s((dest),(size),(src),_TRUNCATE) +#if defined ( _MSC_VER ) && _MSC_VER >= 1400 +# define STRNCPY( dest, src, size ) strncpy_s(( dest ), ( size ), ( src ), _TRUNCATE ) #else -# define STRNCPY(dest,src,size) strncpy((dest),(src),(size)) +# define STRNCPY( dest, src, size ) strncpy(( dest ), ( src ), ( size )) #endif @@ -105,82 +107,89 @@ */ static DIR* opendir( - const char *dirname) + const char *dirname ) { - DIR *dirp; - assert (dirname != NULL); - assert (strlen (dirname) < MAX_PATH); + DIR *dirp; + assert( dirname != NULL ); + assert( strlen( dirname ) < MAX_PATH ); - /* construct new DIR structure */ - dirp = (DIR*) malloc (sizeof (struct DIR)); - if (dirp != NULL) { - char *p; - - /* take directory name... */ - STRNCPY (dirp->patt, dirname, sizeof(dirp->patt)); - dirp->patt[MAX_PATH] = '\0'; - - /* ... and append search pattern to it */ - p = strchr (dirp->patt, '\0'); - if (dirp->patt < p && *(p-1) != '\\' && *(p-1) != ':') { - *p++ = '\\'; - } - *p++ = '*'; - *p = '\0'; + /* construct new DIR structure */ + dirp = (DIR*) malloc( sizeof ( struct DIR )); + if ( dirp != NULL ) + { + char *p; - /* open stream and retrieve first file */ - dirp->search_handle = FindFirstFileA (dirp->patt, &dirp->current.data); - if (dirp->search_handle == INVALID_HANDLE_VALUE) { - /* invalid search pattern? */ - free (dirp); - return NULL; + /* take directory name... */ + STRNCPY( dirp->patt, dirname, sizeof ( dirp->patt )); + dirp->patt[MAX_PATH] = '\0'; + + /* ... and append search pattern to it */ + p = strchr( dirp->patt, '\0' ); + if ( dirp->patt < p && *( p - 1 ) != '\\' && *( p - 1 ) != ':' ) + { + *p++ = '\\'; + } + *p++ = '*'; + *p = '\0'; + + /* open stream and retrieve first file */ + dirp->search_handle = FindFirstFileA( dirp->patt, &dirp->current.data ); + if ( dirp->search_handle == INVALID_HANDLE_VALUE ) + { + /* invalid search pattern? */ + free( dirp ); + return NULL; + } + + /* there is an un-processed directory entry in memory now */ + dirp->cached = 1; } - - /* there is an un-processed directory entry in memory now */ - dirp->cached = 1; - - } - return dirp; + return dirp; } - + /* * Read a directory entry, and return a pointer to a dirent structure * containing the name of the entry in d_name field. Individual directory * entries returned by this very function include regular files, * sub-directories, pseudo-directories "." and "..", but also volume labels, - * hidden files and system files may be returned. + * hidden files and system files may be returned. */ static struct dirent * readdir( - DIR *dirp) + DIR *dirp ) { - assert (dirp != NULL); + assert( dirp != NULL ); - if (dirp->search_handle == INVALID_HANDLE_VALUE) { - /* directory stream was opened/rewound incorrectly or it ended normally */ - return NULL; - } + if ( dirp->search_handle == INVALID_HANDLE_VALUE ) + { + /* directory stream was opened/rewound incorrectly or it ended normally */ + return NULL; + } - /* get next directory entry */ - if (dirp->cached != 0) { - /* a valid directory entry already in memory */ - dirp->cached = 0; - } else { - /* read next directory entry from disk */ - if (FindNextFileA (dirp->search_handle, &dirp->current.data) == FALSE) { - /* the very last file has been processed or an error occured */ - FindClose (dirp->search_handle); - dirp->search_handle = INVALID_HANDLE_VALUE; - return NULL; + /* get next directory entry */ + if ( dirp->cached != 0 ) + { + /* a valid directory entry already in memory */ + dirp->cached = 0; } - } + else + { + /* read next directory entry from disk */ + if ( FindNextFileA( dirp->search_handle, &dirp->current.data ) == FALSE ) + { + /* the very last file has been processed or an error occured */ + FindClose( dirp->search_handle ); + dirp->search_handle = INVALID_HANDLE_VALUE; + return NULL; + } + } - /* copy as a multibyte character string */ - STRNCPY (dirp->current.d_name, dirp->current.data.cFileName, sizeof(dirp->current.d_name)); - dirp->current.d_name[MAX_PATH] = '\0'; - - return &dirp->current; + /* copy as a multibyte character string */ + STRNCPY( dirp->current.d_name, dirp->current.data.cFileName, sizeof ( dirp->current.d_name )); + dirp->current.d_name[MAX_PATH] = '\0'; + + return &dirp->current; } @@ -191,19 +200,20 @@ */ static int closedir( - DIR *dirp) + DIR *dirp ) { - assert (dirp != NULL); - - /* release search handle */ - if (dirp->search_handle != INVALID_HANDLE_VALUE) { - FindClose (dirp->search_handle); - dirp->search_handle = INVALID_HANDLE_VALUE; - } + assert( dirp != NULL ); - /* release directory handle */ - free (dirp); - return 0; + /* release search handle */ + if ( dirp->search_handle != INVALID_HANDLE_VALUE ) + { + FindClose( dirp->search_handle ); + dirp->search_handle = INVALID_HANDLE_VALUE; + } + + /* release directory handle */ + free( dirp ); + return 0; } Modified: trunk/include/disptab.h =================================================================== --- trunk/include/disptab.h 2009-10-21 00:33:14 UTC (rev 10537) +++ trunk/include/disptab.h 2009-10-21 01:01:07 UTC (rev 10538) @@ -1,8 +1,8 @@ /* $Id$ + * + * Defines the data structure which holds the driver functions. + */ - Defines the data structure which holds the driver functions. -*/ - #ifndef __DISPATCH_H__ #define __DISPATCH_H__ @@ -10,18 +10,19 @@ struct PLStream_struct; -enum { +enum +{ plDevType_FileOriented = 0, - plDevType_Interactive = 1, - plDevType_Null = -1 + plDevType_Interactive = 1, + plDevType_Null = -1 }; /*--------------------------------------------------------------------------*\ * Define structure containing pointers to device dependent functions. * - * pl_MenuStr Pointer to string that is printed in device menu. + * pl_MenuStr Pointer to string that is printed in device menu. * - * pl_DevName A short device "name" for device selection by name. + * pl_DevName A short device "name" for device selection by name. * * pl_type 0 for file-oriented device, 1 for interactive * (the null driver uses -1 here) @@ -37,16 +38,16 @@ * be set up before calling this routine (note: some drivers * ignore these). * - * pl_line Draws a line between two points. + * pl_line Draws a line between two points. * * pl_polyline Draws a polyline (no broken segments). * - * pl_eop Finishes out current page (see note). + * pl_eop Finishes out current page (see note). * * pl_bop Set up for plotting on a new page. May also open a new - * a new graphics file (see note). + * a new graphics file (see note). * - * pl_tidy Tidy up. May close graphics file (see note). + * pl_tidy Tidy up. May close graphics file (see note). * * pl_state Handle change in PLStream state * (color, pen width, fill attribute, etc). @@ -63,22 +64,23 @@ * different files then pl_bop() should open the file and pl_eop() should * close it. Do NOT open files in both pl_init() and pl_bop() or close * files in both pl_eop() and pl_tidy(). -\*--------------------------------------------------------------------------*/ + \*--------------------------------------------------------------------------*/ -typedef void (*plD_init_fp) (struct PLStream_struct *); -typedef void (*plD_line_fp) (struct PLStream_struct *, short, short, short, short); -typedef void (*plD_polyline_fp)(struct PLStream_struct *, short *, short *, PLINT); -typedef void (*plD_eop_fp) (struct PLStream_struct *); -typedef void (*plD_bop_fp) (struct PLStream_struct *); -typedef void (*plD_tidy_fp) (struct PLStream_struct *); -typedef void (*plD_state_fp) (struct PLStream_struct *, PLINT); -typedef void (*plD_esc_fp) (struct PLStream_struct *, PLINT, void *); +typedef void ( *plD_init_fp )( struct PLStream_struct * ); +typedef void ( *plD_line_fp )( struct PLStream_struct *, short, short, short, short ); +typedef void ( *plD_polyline_fp )( struct PLStream_struct *, short *, short *, PLINT ); +typedef void ( *plD_eop_fp )( struct PLStream_struct * ); +typedef void ( *plD_bop_fp )( struct PLStream_struct * ); +typedef void ( *plD_tidy_fp )( struct PLStream_struct * ); +typedef void ( *plD_state_fp )( struct PLStream_struct *, PLINT ); +typedef void ( *plD_esc_fp )( struct PLStream_struct *, PLINT, void * ); -typedef struct { - const char *pl_MenuStr; - const char *pl_DevName; - int pl_type; - int pl_seq; +typedef struct +{ + const char *pl_MenuStr; + const char *pl_DevName; + int pl_type; + int pl_seq; plD_init_fp pl_init; plD_line_fp pl_line; plD_polyline_fp pl_polyline; @@ -86,7 +88,7 @@ plD_bop_fp pl_bop; plD_tidy_fp pl_tidy; plD_state_fp pl_state; - plD_esc_fp pl_esc; + plD_esc_fp pl_esc; } PLDispatchTable; #endif /* __DISPATCH_H__ */ Modified: trunk/include/drivers.h =================================================================== --- trunk/include/drivers.h 2009-10-21 00:33:14 UTC (rev 10537) +++ trunk/include/drivers.h 2009-10-21 01:01:07 UTC (rev 10538) @@ -1,29 +1,29 @@ /* $Id$ + * + * Contains all prototypes for driver functions. + * + * Copyright (C) 2004 Andrew Roach + * Copyright (C) 2005 Thomas J. Duck + * Copyright (C) 2006 Andrew Ross + * + * This file is part of PLplot. + * + * PLplot is free software; you can redistribute it and/or modify + * it under the terms of the GNU Library General Public License as published + * by the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * PLplot is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public License + * along with PLplot; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ - Contains all prototypes for driver functions. - - Copyright (C) 2004 Andrew Roach - Copyright (C) 2005 Thomas J. Duck - Copyright (C) 2006 Andrew Ross - - This file is part of PLplot. - - PLplot is free software; you can redistribute it and/or modify - it under the terms of the GNU Library General Public License as published - by the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - PLplot is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with PLplot; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - -*/ - #ifndef __DRIVERS_H__ #define __DRIVERS_H__ @@ -34,98 +34,98 @@ extern "C" { #endif -PLDLLIMPEXP_DRIVER void plD_dispatch_init_mac8 ( PLDispatchTable *pdt ); -PLDLLIMPEXP_DRIVER void plD_dispatch_init_mac1 ( PLDispatchTable *pdt ); -PLDLLIMPEXP_DRIVER void plD_dispatch_init_aqt ( PLDispatchTable *pdt ); -PLDLLIMPEXP_DRIVER void plD_dispatch_init_nx ( PLDispatchTable *pdt ); -PLDLLIMPEXP_DRIVER void plD_dispatch_init_os2 ( PLDispatchTable *pdt ); -PLDLLIMPEXP_DRIVER void plD_dispatch_init_xw ( PLDispatchTable *pdt ); -PLDLLIMPEXP_DRIVER void plD_dispatch_init_gcw ( PLDispatchTable *pdt ); -PLDLLIMPEXP_DRIVER void plD_dispatch_init_gnome ( PLDispatchTable *pdt ); -PLDLLIMPEXP_DRIVER void plD_dispatch_init_tk ( PLDispatchTable *pdt ); -PLDLLIMPEXP_DRIVER void plD_dispatch_init_vga ( PLDispatchTable *pdt ); -PLDLLIMPEXP_DRIVER void plD_dispatch_init_mgr ( PLDispatchTable *pdt ); -PLDLLIMPEXP_DRIVER void plD_dispatch_init_win3 ( PLDispatchTable *pdt ); -PLDLLIMPEXP_DRIVER void plD_dispatch_init_vga ( PLDispatchTable *pdt ); -PLDLLIMPEXP_DRIVER void plD_dispatch_init_vga ( PLDispatchTable *pdt ); -PLDLLIMPEXP_DRIVER void plD_dispatch_init_vga ( PLDispatchTable *pdt ); -PLDLLIMPEXP_DRIVER void plD_dispatch_init_tiff ( PLDispatchTable *pdt ); -PLDLLIMPEXP_DRIVER void plD_dispatch_init_jpg ( PLDispatchTable *pdt ); -PLDLLIMPEXP_DRIVER void plD_dispatch_init_jpeg ( PLDispatchTable *pdt ); -PLDLLIMPEXP_DRIVER void plD_dispatch_init_bmp ( PLDispatchTable *pdt ); -PLDLLIMPEXP_DRIVER void plD_dispatch_init_vga ( PLDispatchTable *pdt ); -PLDLLIMPEXP_DRIVER void plD_dispatch_init_xterm ( PLDispatchTable *pdt ); -PLDLLIMPEXP_DRIVER void plD_dispatch_init_tekt ( PLDispatchTable *pdt ); -PLDLLIMPEXP_DRIVER void plD_dispatch_init_tek4107t ( PLDispatchTable *pdt ); -PLDLLIMPEXP_DRIVER void plD_dispatch_init_mskermit ( PLDispatchTable *pdt ); +PLDLLIMPEXP_DRIVER void plD_dispatch_init_mac8( PLDispatchTable *pdt ); +PLDLLIMPEXP_DRIVER void plD_dispatch_init_mac1( PLDispatchTable *pdt ); +PLDLLIMPEXP_DRIVER void plD_dispatch_init_aqt( PLDispatchTable *pdt ); +PLDLLIMPEXP_DRIVER void plD_dispatch_init_nx( PLDispatchTable *pdt ); +PLDLLIMPEXP_DRIVER void plD_dispatch_init_os2( PLDispatchTable *pdt ); +PLDLLIMPEXP_DRIVER void plD_dispatch_init_xw( PLDispatchTable *pdt ); +PLDLLIMPEXP_DRIVER void plD_dispatch_init_gcw( PLDispatchTable *pdt ); +PLDLLIMPEXP_DRIVER void plD_dispatch_init_gnome( PLDispatchTable *pdt ); +PLDLLIMPEXP_DRIVER void plD_dispatch_init_tk( PLDispatchTable *pdt ); +PLDLLIMPEXP_DRIVER void plD_dispatch_init_vga( PLDispatchTable *pdt ); +PLDLLIMPEXP_DRIVER void plD_dispatch_init_mgr( PLDispatchTable *pdt ); +PLDLLIMPEXP_DRIVER void plD_dispatch_init_win3( PLDispatchTable *pdt ); +PLDLLIMPEXP_DRIVER void plD_dispatch_init_vga( PLDispatchTable *pdt ); +PLDLLIMPEXP_DRIVER void plD_dispatch_init_vga( PLDispatchTable *pdt ); +PLDLLIMPEXP_DRIVER void plD_dispatch_init_vga( PLDispatchTable *pdt ); +PLDLLIMPEXP_DRIVER void plD_dispatch_init_tiff( PLDispatchTable *pdt ); +PLDLLIMPEXP_DRIVER void plD_dispatch_init_jpg( PLDispatchTable *pdt ); +PLDLLIMPEXP_DRIVER void plD_dispatch_init_jpeg( PLDispatchTable *pdt ); +PLDLLIMPEXP_DRIVER void plD_dispatch_init_bmp( PLDispatchTable *pdt ); +PLDLLIMPEXP_DRIVER void plD_dispatch_init_vga( PLDispatchTable *pdt ); +PLDLLIMPEXP_DRIVER void plD_dispatch_init_xterm( PLDispatchTable *pdt ); +PLDLLIMPEXP_DRIVER void plD_dispatch_init_tekt( PLDispatchTable *pdt ); +PLDLLIMPEXP_DRIVER void plD_dispatch_init_tek4107t( PLDispatchTable *pdt ); +PLDLLIMPEXP_DRIVER void plD_dispatch_init_mskermit( PLDispatchTable *pdt ); PLDLLIMPEXP_DRIVER void plD_dispatch_init_versaterm( PLDispatchTable *pdt ); -PLDLLIMPEXP_DRIVER void plD_dispatch_init_vlt ( PLDispatchTable *pdt ); -PLDLLIMPEXP_DRIVER void plD_dispatch_init_conex ( PLDispatchTable *pdt ); -PLDLLIMPEXP_DRIVER void plD_dispatch_init_dg ( PLDispatchTable *pdt ); -PLDLLIMPEXP_DRIVER void plD_dispatch_init_plm ( PLDispatchTable *pdt ); -PLDLLIMPEXP_DRIVER void plD_dispatch_init_tekf ( PLDispatchTable *pdt ); -PLDLLIMPEXP_DRIVER void plD_dispatch_init_tek4107f ( PLDispatchTable *pdt ); -PLDLLIMPEXP_DRIVER void plD_dispatch_init_psm ( PLDispatchTable *pdt ); -PLDLLIMPEXP_DRIVER void plD_dispatch_init_psc ( PLDispatchTable *pdt ); -PLDLLIMPEXP_DRIVER void plD_dispatch_init_xfig ( PLDispatchTable *pdt ); -PLDLLIMPEXP_DRIVER void plD_dispatch_init_ljiip ( PLDispatchTable *pdt ); -PLDLLIMPEXP_DRIVER void plD_dispatch_init_ljii ( PLDispatchTable *pdt ); -PLDLLIMPEXP_DRIVER void plD_dispatch_init_hp7470 ( PLDispatchTable *pdt ); -PLDLLIMPEXP_DRIVER void plD_dispatch_init_hp7580 ( PLDispatchTable *pdt ); -PLDLLIMPEXP_DRIVER void plD_dispatch_init_hpgl ( PLDispatchTable *pdt ); -PLDLLIMPEXP_DRIVER void plD_dispatch_init_imp ( PLDispatchTable *pdt ); -PLDLLIMPEXP_DRIVER void plD_dispatch_init_pbm ( PLDispatchTable *pdt ); -PLDLLIMPEXP_DRIVER void plD_dispatch_init_png ( PLDispatchTable *pdt ); -PLDLLIMPEXP_DRIVER void plD_dispatch_init_gif ( PLDispatchTable *pdt ); -PLDLLIMPEXP_DRIVER void plD_dispatch_init_cgm ( PLDispatchTable *pdt ); -PLDLLIMPEXP_DRIVER void plD_dispatch_init_null ( PLDispatchTable *pdt ); -PLDLLIMPEXP_DRIVER void plD_dispatch_init_tkwin ( PLDispatchTable *pdt ); -PLDLLIMPEXP_DRIVER void plD_dispatch_init_pstex ( PLDispatchTable *pdt ); -PLDLLIMPEXP_DRIVER void plD_dispatch_init_psttfc ( PLDispatchTable *pdt ); -PLDLLIMPEXP_DRIVER void plD_dispatch_init_psttfm ( PLDispatchTable *pdt ); -PLDLLIMPEXP_DRIVER void plD_dispatch_init_ntk ( PLDispatchTable *pdt ); -PLDLLIMPEXP_DRIVER void plD_dispatch_init_mem ( PLDispatchTable *pdt ); -PLDLLIMPEXP_DRIVER void plD_dispatch_init_wingcc ( PLDispatchTable *pdt ); -PLDLLIMPEXP_DRIVER void plD_dispatch_init_wxwidgets ( PLDispatchTable *pdt ); -PLDLLIMPEXP_DRIVER void plD_dispatch_init_wxpng ( PLDispatchTable *pdt ); -PLDLLIMPEXP_DRIVER void plD_dispatch_init_svg ( PLDispatchTable *pdt ); -PLDLLIMPEXP_DRIVER void plD_dispatch_init_pdf ( PLDispatchTable *pdt ); -PLDLLIMPEXP_DRIVER void plD_dispatch_init_xcairo ( PLDispatchTable *pdt ); -PLDLLIMPEXP_DRIVER void plD_dispatch_init_pdfcairo ( PLDispatchTable *pdt ); -PLDLLIMPEXP_DRIVER void plD_dispatch_init_pscairo ( PLDispatchTable *pdt ); -PLDLLIMPEXP_DRIVER void plD_dispatch_init_svgcairo ( PLDispatchTable *pdt ); -PLDLLIMPEXP_DRIVER void plD_dispatch_init_pngcairo ( PLDispatchTable *pdt ); -PLDLLIMPEXP_DRIVER void plD_dispatch_init_memcairo ( PLDispatchTable *pdt ); -PLDLLIMPEXP_DRIVER void plD_dispatch_init_extcairo ( PLDispatchTable *pdt ); -PLDLLIMPEXP_DRIVER void plD_dispatch_init_bmpqt ( PLDispatchTable *pdt ); -PLDLLIMPEXP_DRIVER void plD_dispatch_init_jpgqt ( PLDispatchTable *pdt ); -PLDLLIMPEXP_DRIVER void plD_dispatch_init_pngqt ( PLDispatchTable *pdt ); -PLDLLIMPEXP_DRIVER void plD_dispatch_init_ppmqt ( PLDispatchTable *pdt ); -PLDLLIMPEXP_DRIVER void plD_dispatch_init_tiffqt ( PLDispatchTable *pdt ); -PLDLLIMPEXP_DRIVER void plD_dispatch_init_svgqt ( PLDispatchTable *pdt ); -PLDLLIMPEXP_DRIVER void plD_dispatch_init_epsqt ( PLDispatchTable *pdt ); -PLDLLIMPEXP_DRIVER void plD_dispatch_init_pdfqt ( PLDispatchTable *pdt ); -PLDLLIMPEXP_DRIVER void plD_dispatch_init_qtwidget ( PLDispatchTable *pdt ); -PLDLLIMPEXP_DRIVER void plD_dispatch_init_extqt ( PLDispatchTable *pdt ); +PLDLLIMPEXP_DRIVER void plD_dispatch_init_vlt( PLDispatchTable *pdt ); +PLDLLIMPEXP_DRIVER void plD_dispatch_init_conex( PLDispatchTable *pdt ); +PLDLLIMPEXP_DRIVER void plD_dispatch_init_dg( PLDispatchTable *pdt ); +PLDLLIMPEXP_DRIVER void plD_dispatch_init_plm( PLDispatchTable *pdt ); +PLDLLIMPEXP_DRIVER void plD_dispatch_init_tekf( PLDispatchTable *pdt ); +PLDLLIMPEXP_DRIVER void plD_dispatch_init_tek4107f( PLDispatchTable *pdt ); +PLDLLIMPEXP_DRIVER void plD_dispatch_init_psm( PLDispatchTable *pdt ); +PLDLLIMPEXP_DRIVER void plD_dispatch_init_psc( PLDispatchTable *pdt ); +PLDLLIMPEXP_DRIVER void plD_dispatch_init_xfig( PLDispatchTable *pdt ); +PLDLLIMPEXP_DRIVER void plD_dispatch_init_ljiip( PLDispatchTable *pdt ); +PLDLLIMPEXP_DRIVER void plD_dispatch_init_ljii( PLDispatchTable *pdt ); +PLDLLIMPEXP_DRIVER void plD_dispatch_init_hp7470( PLDispatchTable *pdt ); +PLDLLIMPEXP_DRIVER void plD_dispatch_init_hp7580( PLDispatchTable *pdt ); +PLDLLIMPEXP_DRIVER void plD_dispatch_init_hpgl( PLDispatchTable *pdt ); +PLDLLIMPEXP_DRIVER void plD_dispatch_init_imp( PLDispatchTable *pdt ); +PLDLLIMPEXP_DRIVER void plD_dispatch_init_pbm( PLDispatchTable *pdt ); +PLDLLIMPEXP_DRIVER void plD_dispatch_init_png( PLDispatchTable *pdt ); +PLDLLIMPEXP_DRIVER void plD_dispatch_init_gif( PLDispatchTable *pdt ); +PLDLLIMPEXP_DRIVER void plD_dispatch_init_cgm( PLDispatchTable *pdt ); +PLDLLIMPEXP_DRIVER void plD_dispatch_init_null( PLDispatchTable *pdt ); +PLDLLIMPEXP_DRIVER void plD_dispatch_init_tkwin( PLDispatchTable *pdt ); +PLDLLIMPEXP_DRIVER void plD_dispatch_init_pstex( PLDispatchTable *pdt ); +PLDLLIMPEXP_DRIVER void plD_dispatch_init_psttfc( PLDispatchTable *pdt ); +PLDLLIMPEXP_DRIVER void plD_dispatch_init_psttfm( PLDispatchTable *pdt ); +PLDLLIMPEXP_DRIVER void plD_dispatch_init_ntk( PLDispatchTable *pdt ); +PLDLLIMPEXP_DRIVER void plD_dispatch_init_mem( PLDispatchTable *pdt ); +PLDLLIMPEXP_DRIVER void plD_dispatch_init_wingcc( PLDispatchTable *pdt ); +PLDLLIMPEXP_DRIVER void plD_dispatch_init_wxwidgets( PLDispatchTable *pdt ); +PLDLLIMPEXP_DRIVER void plD_dispatch_init_wxpng( PLDispatchTable *pdt ); +PLDLLIMPEXP_DRIVER void plD_dispatch_init_svg( PLDispatchTable *pdt ); +PLDLLIMPEXP_DRIVER void plD_dispatch_init_pdf( PLDispatchTable *pdt ); +PLDLLIMPEXP_DRIVER void plD_dispatch_init_xcairo( PLDispatchTable *pdt ); +PLDLLIMPEXP_DRIVER void plD_dispatch_init_pdfcairo( PLDispatchTable *pdt ); +PLDLLIMPEXP_DRIVER void plD_dispatch_init_pscairo( PLDispatchTable *pdt ); +PLDLLIMPEXP_DRIVER void plD_dispatch_init_svgcairo( PLDispatchTable *pdt ); +PLDLLIMPEXP_DRIVER void plD_dispatch_init_pngcairo( PLDispatchTable *pdt ); +PLDLLIMPEXP_DRIVER void plD_dispatch_init_memcairo( PLDispatchTable *pdt ); +PLDLLIMPEXP_DRIVER void plD_dispatch_init_extcairo( PLDispatchTable *pdt ); +PLDLLIMPEXP_DRIVER void plD_dispatch_init_bmpqt( PLDispatchTable *pdt ); +PLDLLIMPEXP_DRIVER void plD_dispatch_init_jpgqt( PLDispatchTable *pdt ); +PLDLLIMPEXP_DRIVER void plD_dispatch_init_pngqt( PLDispatchTable *pdt ); +PLDLLIMPEXP_DRIVER void plD_dispatch_init_ppmqt( PLDispatchTable *pdt ); +PLDLLIMPEXP_DRIVER void plD_dispatch_init_tiffqt( PLDispatchTable *pdt ); +PLDLLIMPEXP_DRIVER void plD_dispatch_init_svgqt( PLDispatchTable *pdt ); +PLDLLIMPEXP_DRIVER void plD_dispatch_init_epsqt( PLDispatchTable *pdt ); +PLDLLIMPEXP_DRIVER void plD_dispatch_init_pdfqt( PLDispatchTable *pdt ); +PLDLLIMPEXP_DRIVER void plD_dispatch_init_qtwidget( PLDispatchTable *pdt ); +PLDLLIMPEXP_DRIVER void plD_dispatch_init_extqt( PLDispatchTable *pdt ); /* Prototypes for plot buffer calls. */ -void plbuf_init (PLStream *); -void plbuf_line (PLStream *, short, short, short, short); -void plbuf_polyline (PLStream *, short *, short *, PLINT); -void plbuf_eop (PLStream *); -void plbuf_bop (PLStream *); -void plbuf_tidy (PLStream *); -void plbuf_state (PLStream *, PLINT); -void plbuf_esc (PLStream *, PLINT, void *); -PLDLLIMPEXP void * plbuf_save (PLStream *, void *); -PLDLLIMPEXP void * plbuf_switch (PLStream *, void *); -PLDLLIMPEXP void plbuf_restore (PLStream *, void *); +void plbuf_init( PLStream * ); +void plbuf_line( PLStream *, short, short, short, short ); +void plbuf_polyline( PLStream *, short *, short *, PLINT ); +void plbuf_eop( PLStream * ); +void plbuf_bop( PLStream * ); +void plbuf_tidy( PLStream * ); +void plbuf_state( PLStream *, PLINT ); +void plbuf_esc( PLStream *, PLINT, void * ); +PLDLLIMPEXP void * plbuf_save( PLStream *, void * ); +PLDLLIMPEXP void * plbuf_switch( PLStream *, void * ); +PLDLLIMPEXP void plbuf_restore( PLStream *, void * ); -PLDLLIMPEXP void plRemakePlot (PLStream *); +PLDLLIMPEXP void plRemakePlot( PLStream * ); #ifdef __cplusplus } #endif -#endif /* __DRIVERS_H__ */ +#endif /* __DRIVERS_H__ */ Modified: trunk/include/gcw.h =================================================================== --- trunk/include/gcw.h 2009-10-21 00:33:14 UTC (rev 10537) +++ trunk/include/gcw.h 2009-10-21 01:01:07 UTC (rev 10538) @@ -1,27 +1,27 @@ /* gcw - PLplot Gnome Canvas Widget device driver. + * + * Copyright (C) 2004, 2005 Thomas J. Duck + * Copyright (C) 2004 Rafael Laboissiere + * All rights reserved. + * + * NOTICE + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + */ - Copyright (C) 2004, 2005 Thomas J. Duck - Copyright (C) 2004 Rafael Laboissiere - All rights reserved. - -NOTICE - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 - USA -*/ - #ifndef __GCW_H__ #define __GCW_H__ @@ -48,44 +48,44 @@ /*=========================================================================*/ /* GcwPLdev - the PLplot device structure for the GCW driver */ -typedef struct { - GnomeCanvas* canvas; /* The canvas to draw on */ - GdkPixmap* background; /* The background */ - GdkGC* gc; /* A graphics context for the pixmap */ +typedef struct +{ + GnomeCanvas * canvas; /* The canvas to draw on */ + GdkPixmap * background; /* The background */ + GdkGC * gc; /* A graphics context for the pixmap */ - GnomeCanvasGroup* group_visible; /* Visible group, removed at next eop */ - GnomeCanvasGroup* group_hidden; /* Hidden group --> visible at eop */ - GnomeCanvasGroup* group_persistent; /* Persistent group, at from and never erased */ + GnomeCanvasGroup* group_visible; /* Visible group, removed at next eop */ + GnomeCanvasGroup* group_hidden; /* Hidden group --> visible at eop */ + GnomeCanvasGroup* group_persistent; /* Persistent group, at from and never erased */ - gboolean use_persistence; /* Flags the persistent group should be used, - * and that it and the background should not be - * erased when the page is advanced. - */ + gboolean use_persistence; /* Flags the persistent group should be used, + * and that it and the background should not be + * erased when the page is advanced. + */ - GtkWidget* window; /* A window used in standalone mode */ - GtkWidget* notebook; /* A notebook pager in the window */ - GtkWidget* statusbar; /* A statusbar for the window */ - GtkWidget* filew; /* A file widget chooser when Save is pressed */ + GtkWidget * window; /* A window used in standalone mode */ + GtkWidget * notebook; /* A notebook pager in the window */ + GtkWidget * statusbar; /* A statusbar for the window */ + GtkWidget * filew; /* A file widget chooser when Save is pressed */ - guint32 color; /* Current pen color */ - GdkColor bgcolor; /* Background color (shouldn't change) */ - GdkColormap* colormap; /* The gdk colormap for the canvas */ + guint32 color; /* Current pen color */ + GdkColor bgcolor; /* Background color (shouldn't change) */ + GdkColormap* colormap; /* The gdk colormap for the canvas */ - PLINT width; /* Width of the canvas in device pixels */ - PLINT height; /* Height of the canvas in device pixels */ + PLINT width; /* Width of the canvas in device pixels */ + PLINT height; /* Height of the canvas in device pixels */ - PLINT pen_color; /* Current pen color */ - PLINT pen_width; /* Current pen width */ + PLINT pen_color; /* Current pen color */ + PLINT pen_width; /* Current pen width */ - gboolean use_pixmap; /* Flags pixmap use for lines and fills */ - gboolean pixmap_has_data; /* Flags that the pixmap has data */ + gboolean use_pixmap; /* Flags pixmap use for lines and fills */ + gboolean pixmap_has_data; /* Flags that the pixmap has data */ - gboolean plstate_width; /* Flags indicating change of state before */ - gboolean plstate_color0; /* device is fully initialized */ - gboolean plstate_color1; + gboolean plstate_width; /* Flags indicating change of state before */ + gboolean plstate_color0; /* device is fully initialized */ + gboolean plstate_color1; - gboolean allow_resize; /* Flags whether device resizing is allowed */ - + gboolean allow_resize; /* Flags whether device resizing is allowed */ } GcwPLdev; @@ -100,26 +100,26 @@ * side, but report/receive everything in virtual coordinates to/from the * PLplot core. */ -#define VSCALE (32.) +#define VSCALE ( 32. ) /* pixels per mm */ -#define DEVICE_PIXELS_PER_MM (3.4) -#define VIRTUAL_PIXELS_PER_MM (DEVICE_PIXELS_PER_MM*VSCALE) +#define DEVICE_PIXELS_PER_MM ( 3.4 ) +#define VIRTUAL_PIXELS_PER_MM ( DEVICE_PIXELS_PER_MM * VSCALE ) /* mm per inch */ -#define MM_PER_IN (25.4) +#define MM_PER_IN ( 25.4 ) /* pixels per inch */ -#define DEVICE_PIXELS_PER_IN (DEVICE_PIXELS_PER_MM*MM_PER_IN) -#define VIRTUAL_PIXELS_PER_IN (VIRTUAL_PIXELS_PER_MM*MM_PER_IN) +#define DEVICE_PIXELS_PER_IN ( DEVICE_PIXELS_PER_MM * MM_PER_IN ) +#define VIRTUAL_PIXELS_PER_IN ( VIRTUAL_PIXELS_PER_MM * MM_PER_IN ) /* Default dimensions of the canvas (in inches) */ -#define CANVAS_WIDTH (10.) -#define CANVAS_HEIGHT (7.5) +#define CANVAS_WIDTH ( 10. ) +#define CANVAS_HEIGHT ( 7.5 ) /* The zoom factor for 100% zoom in */ -#define ZOOM100 (1.0) -#define ZOOMSTEP (1.25) +#define ZOOM100 ( 1.0 ) +#define ZOOMSTEP ( 1.25 ) /*=========================================================================*/ @@ -127,20 +127,20 @@ /* Public_functions */ -void gcw_use_text(PLINT use_text); -void gcw_use_pixmap(PLINT use_pixmap); -void gcw_use_hrshsym(PLINT use_hrshsym); +void gcw_use_text( PLINT use_text ); +void gcw_use_pixmap( PLINT use_pixmap ); +void gcw_use_hrshsym( PLINT use_hrshsym ); /* Private functions */ -void gcw_debug(char* msg); +void gcw_debug( char* msg ); PLDLLIMPEXP_GNOME2 void gcw_set_gdk_color(); PLDLLIMPEXP_GNOME2 void gcw_clear_background(); -PLDLLIMPEXP_GNOME2 void gcw_init_canvas(GnomeCanvas* canvas); -PLDLLIMPEXP_GNOME2 void gcw_install_canvas(GnomeCanvas *canvas); -PLDLLIMPEXP_GNOME2 void gcw_set_device_size(PLINT width,PLINT height); -void gcw_set_canvas_size(GnomeCanvas* canvas,PLINT width,PLINT height); -void gcw_set_canvas_zoom(GnomeCanvas* canvas,PLFLT magnification); -void gcw_use_persistence(PLINT use_persistence); +PLDLLIMPEXP_GNOME2 void gcw_init_canvas( GnomeCanvas* canvas ); +PLDLLIMPEXP_GNOME2 void gcw_install_canvas( GnomeCanvas *canvas ); +PLDLLIMPEXP_GNOME2 void gcw_set_device_size( PLINT width, PLINT height ); +void gcw_set_canvas_size( GnomeCanvas* canvas, PLINT width, PLINT height ); +void gcw_set_canvas_zoom( GnomeCanvas* canvas, PLFLT magnification ); +void gcw_use_persistence( PLINT use_persistence ); #endif /* __GCW_H__ */ Modified: trunk/include/ltdl_win32.h =================================================================== --- trunk/include/ltdl_win32.h 2009-10-21 00:33:14 UTC (rev 10537) +++ trunk/include/ltdl_win32.h 2009-10-21 01:01:07 UTC (rev 10538) @@ -1,27 +1,27 @@ /* $Id$ + * + * Contains all prototypes for driver functions. + * + * Copyright (C) 2008 Werner Smekal + * + * This file is part of PLplot. + * + * PLplot is free software; you can redistribute it and/or modify + * it under the terms of the GNU Library General Public License as published + * by the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * PLplot is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public License + * along with PLplot; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ - Contains all prototypes for driver functions. - - Copyright (C) 2008 Werner Smekal - - This file is part of PLplot. - - PLplot is free software; you can redistribute it and/or modify - it under the terms of the GNU Library General Public License as published - by the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - PLplot is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with PLplot; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - -*/ - #ifndef __LTDL_WIN32_H__ #define __LTDL_WIN32_H__ @@ -30,11 +30,11 @@ struct __dlhandle { - HINSTANCE hinstLib; - struct __dlhandle* previousHandle; + HINSTANCE hinstLib; + struct __dlhandle* previousHandle; }; -typedef struct __dlhandle* lt_dlhandle; -typedef void lt_ptr; +typedef struct __dlhandle* lt_dlhandle; +typedef void lt_ptr; PLDLLIMPEXP void lt_dlinit( void ); Modified: trunk/include/metadefs.h =================================================================== --- trunk/include/metadefs.h 2009-10-21 00:33:14 UTC (rev 10537) +++ trunk/include/metadefs.h 2009-10-21 01:01:07 UTC (rev 10538) @@ -1,72 +1,72 @@ /* $Id$ + * + * Geoffrey Furnish + * 5 May 1991 + * + * This file contains definitions of constants and structures which + * are needed by the PLplot metafile writer and renderer. + */ - Geoffrey Furnish - 5 May 1991 - - This file contains definitions of constants and structures which - are needed by the PLplot metafile writer and renderer. -*/ - /* -* PLMETA_HEADER holds the magic string at head of metafile. -* PLMETA_VERSION holds the version number (year & letter). -* -* Note: All strings written into the file header are limited to a maximum -* of 80 characters. -*/ + * PLMETA_HEADER holds the magic string at head of metafile. + * PLMETA_VERSION holds the version number (year & letter). + * + * Note: All strings written into the file header are limited to a maximum + * of 80 characters. + */ -#define PLMETA_HEADER "PLPLOT" -#define PLMETA_VERSION "2005a" +#define PLMETA_HEADER "PLPLOT" +#define PLMETA_VERSION "2005a" /* These are used by the TK driver client/server code */ -#define PLSERV_HEADER "PLPLOT" -#define PLSERV_VERSION "2005b" +#define PLSERV_HEADER "PLPLOT" +#define PLSERV_VERSION "2005b" /* Symbolic constants for old metafile versions (prior to 1992a). */ /* Now these are stored in the metafile header. */ -#define PLMETA_X_OLD 10000 -#define PLMETA_Y_OLD 10000 +#define PLMETA_X_OLD 10000 +#define PLMETA_Y_OLD 10000 /* Virtual dots/mm for our virtual display space. */ -#define PIXEL_RES_X_OLD 42 -#define PIXEL_RES_Y_OLD 56 +#define PIXEL_RES_X_OLD 42 +#define PIXEL_RES_Y_OLD 56 /* Macros to make it easier to abort on nonzero return code */ /* Can't call plexit on a write failure since that would be circular */ -#define plm_wr(code) \ - if (code) { fprintf(stderr, "Unable to write to MetaFile\n"); exit(1); } +#define plm_wr( code ) \ + if ( code ) { fprintf( stderr, "Unable to write to MetaFile\n" ); exit( 1 ); } -#define plm_rd(code) \ - if (code) plexit( "Unable to read from MetaFile" ) +#define plm_rd( code ) \ + if ( code ) plexit( "Unable to read from MetaFile" ) /* - Metafile commands. + * Metafile commands. + * + *** NOTICE !!! *** + * If you change ANY of the following, you will wreck backward + * backward compatibility with old metafiles. You may add, but do + * NOT delete !!! + */ - *** NOTICE !!! *** - If you change ANY of the following, you will wreck backward - backward compatibility with old metafiles. You may add, but do - NOT delete !!! -*/ - -#define INITIALIZE 1 -#define CLOSE 2 -#define SWITCH_TO_TEXT 3 /* Obsolete, replaced by ESCAPE */ -#define SWITCH_TO_GRAPH 4 /* Obsolete, replaced by ESCAPE */ -#define EOP 5 -#define BOP 6 -#define NEW_COLOR 7 /* Obsolete, replaced by CHANGE_STATE */ -#define NEW_WIDTH 8 /* Obsolete, replaced by CHANGE_STATE */ -#define LINE 9 -#define LINETO 10 -#define ESCAPE 11 -#define ADVANCE 12 /* Obsolete, BOP/EOP used instead */ -#define POLYLINE 13 -#define NEW_COLOR0 NEW_COLOR -#define NEW_COLOR1 14 -#define CHANGE_STATE 15 -#define BOP0 16 /* First BOP in a file */ -#define END_OF_FIELD 255 +#define INITIALIZE 1 +#define CLOSE 2 +#define SWITCH_TO_TEXT 3 /* Obsolete, replaced by ESCAPE */ +#define SWITCH_TO_GRAPH 4 /* Obsolete, replaced by ESCAPE */ +#define EOP 5 +#define BOP 6 +#define NEW_COLOR 7 /* Obsolete, replaced by CHANGE_STATE */ +#define NEW_WIDTH 8 /* Obsolete, replaced by CHANGE_STATE */ +#define LINE 9 +#define LINETO 10 +#define ESCAPE 11 +#define ADVANCE 12 /* Obsolete, BOP/EOP used instead */ +#define POLYLINE 13 +#define NEW_COLOR0 NEW_COLOR +#define NEW_COLOR1 14 +#define CHANGE_STATE 15 +#define BOP0 16 /* First BOP in a file */ +#define END_OF_FIELD 255 Modified: trunk/include/moc_files.h.in =================================================================== --- trunk/include/moc_files.h.in 2009-10-21 00:33:14 UTC (rev 10537) +++ trunk/include/moc_files.h.in 2009-10-21 01:01:07 UTC (rev 10538) @@ -1,6 +1,6 @@ -/* Configured header file listing the moc-generated files to include in plqt.cpp. */ +/* Configured header file listing the moc-generated files to include in plqt.cpp. */ #ifndef __MOC_FILES_H__ #define __MOC_FILES_H__ #include "@QT_MOC_OUTFILES@" -#endif /* __MOC_FILES_H__i */ +#endif /* __MOC_FILES_H__i */ Modified: trunk/include/pdf.h =================================================================== --- trunk/include/pdf.h 2009-10-21 00:33:14 UTC (rev 10537) +++ trunk/include/pdf.h 2009-10-21 01:01:07 UTC (rev 10538) @@ -1,43 +1,43 @@ /* $Id$ + * + * Copyright (C) 1992 by Maurice J. LeBrun + * + * Macros and prototypes for the PDF package. + * + * This software may be freely copied, modified and redistributed without + * fee provided that this copyright notice is preserved intact on all + * copies and modified copies. + * + * There is no warranty or other guarantee of fitness of this software. + * It is provided solely "as is". The author(s) disclaim(s) all + * responsibility and liability with respect to this software's usage or + * its effect upon hardware or computer systems. + */ - Copyright (C) 1992 by Maurice J. LeBrun - - Macros and prototypes for the PDF package. - - This software may be freely copied, modified and redistributed without - fee provided that this copyright notice is preserved intact on all - copies and modified copies. - - There is no warranty or other guarantee of fitness of this software. - It is provided solely "as is". The author(s) disclaim(s) all - responsibility and liability with respect to this software's usage or - its effect upon hardware or computer systems. -*/ - #ifndef __PDF_H__ #define __PDF_H__ /*--------------------------------------------------------------------------*\ * dll functions -\*--------------------------------------------------------------------------*/ + \*--------------------------------------------------------------------------*/ #include "pldll.h" /* Some unsigned types */ #ifndef U_CHAR -#define U_CHAR unsigned char +#define U_CHAR unsigned char #endif #ifndef U_SHORT -#define U_SHORT unsigned short +#define U_SHORT unsigned short #endif #ifndef U_INT -#define U_INT unsigned int +#define U_INT unsigned int #endif #ifndef U_LONG -#define U_LONG unsigned long +#define U_LONG unsigned long #endif #ifdef PLPLOT_USE_TCL_CHANNELS @@ -48,65 +48,67 @@ /* The low level PDF i/o routines use the transfer method appropriate for */ /* the first non-null type below */ -typedef struct { - FILE *file; /* Filesystem */ - unsigned char *buffer; /* Memory buffer */ +typedef struct +{ + FILE *file; /* Filesystem */ + unsigned char *buffer; /* Memory buffer */ #ifdef PLPLOT_USE_TCL_CHANNELS - Tcl_Channel tclChan; /* Tcl channel */ + Tcl_Channel tclChan; /* Tcl channel */ #endif - long bp, bufmax; /* Buffer pointer and max size */ + long bp, bufmax; /* Buffer pointer and max size */ } PDFstrm; /* Info for the i/o device. Only used by Tcl/TK/dp drivers for now */ -typedef struct { - int fd; /* I/O device file descriptor */ - FILE *file; /* File handle */ - const char *fileName; /* Fifo or socket name (if needed) */ - const char *fileHandle; /* Handle for use from interpreter */ - int type; /* Communication channel type */ - const char *typeName; /* As above, but in string form */ +typedef struct +{ + int fd; /* I/O device file descriptor */ + FILE *file; /* File handle */ + const char *fileName; /* Fifo or socket name (if needed) */ + const char *fileHandle; /* Handle for use from interpreter */ + int type; /* Communication channel type */ + const char *typeName; /* As above, but in string form */ } PLiodev; /* Error numbers */ -#define PDF_ERROR 1 /* Unknown error */ -#define PDF_FNOPEN 2 /* File not open */ -#define PDF_FAOPEN 3 /* File already open */ -#define PDF_BADUN 4 /* Bad unit number */ -#define PDF_BADNBITS 5 /* Invalid # of bits */ -#define PDF_RDERR 6 /* Read error */ -#define PDF_WRERR 7 /* Write error */ -#define PDF_NOTPDF 8 /* Not a valid PDF file */ +#define PDF_ERROR 1 /* Unknown error */ +#define PDF_FNOPEN 2 /* File not open */ +#define PDF_FAOPEN 3 /* File already open */ +#define PDF_BADUN 4 /* Bad unit number */ +#define PDF_BADNBITS 5 /* Invalid # of bits */ +#define PDF_RDERR 6 /* Read error */ +#define PDF_WRERR 7 /* Write error */ +#define PDF_NOTPDF 8 /* Not a valid PDF file */ /* Prototypes */ /* Use a wrapper for the prototypes for use from K&R C */ -void pdf_set PLARGS((char *option, int value)); -PLDLLIMPEXP PDFstrm *pdf_fopen PLARGS((const char *fileName, const char *mode)); -PLDLLIMPEXP PDFstrm *pdf_bopen PLARGS((U_CHAR *buffer, long bufmax)); -PLDLLIMPEXP PDFstrm *pdf_finit PLARGS((FILE *file)); +void pdf_set PLARGS(( char *option, int value )); +PLDLLIMPEXP PDFstrm *pdf_fopen PLARGS(( const char *fileName, const char *mode )); +PLDLLIMPEXP PDFstrm *pdf_bopen PLARGS(( U_CHAR * buffer, long bufmax )); +PLDLLIMPEXP PDFstrm *pdf_finit PLARGS(( FILE * file )); PDFstrm *plLibOpenPdfstrm PLARGS((const char *fn)); -PLDLLIMPEXP int pdf_close PLARGS((PDFstrm *pdfs)); +PLDLLIMPEXP int pdf_close PLARGS(( PDFstrm * pdfs )); -int pdf_putc PLARGS((int c, PDFstrm *pdfs)); -PLDLLIMPEXP int pdf_getc PLARGS((PDFstrm *pdfs)); -PLDLLIMPEXP int pdf_ungetc PLARGS((int c, PDFstrm *pdfs)); -int pdf_rdx PLARGS((U_CHAR *x, long nitems, PDFstrm *pdfs)); +int pdf_putc PLARGS(( int c, PDFstrm * pdfs )); +PLDLLIMPEXP int pdf_getc PLARGS(( PDFstrm * pdfs )); +PLDLLIMPEXP int pdf_ungetc PLARGS(( int c, PDFstrm * pdfs )); +int pdf_rdx PLARGS(( U_CHAR * x, long nitems, PDFstrm * pdfs )); -PLDLLIMPEXP int pdf_rd_header PLARGS((PDFstrm *pdfs, char *header)); -PLDLLIMPEXP int pdf_wr_header PLARGS((PDFstrm *pdfs, char *header)); -int pdf_wr_string PLARGS((PDFstrm *pdfs, const char *string)); -int pdf_rd_string PLARGS((PDFst... [truncated message content] |