From cdb37588233e650899951f7774841c87bb59157c Mon Sep 17 00:00:00 2001 From: Juergen Keil Date: Wed, 26 Jun 2002 15:57:47 +0000 Subject: Update nvtvd source so that we can compile it with Sun's Forte cc (C99 macros with variable arguments, structure initialization by name not available) CVS patchset: 2169 CVS date: 2002/06/26 15:57:47 --- src/xine-engine/nvtvd.c | 62 +++++++++++++++++++++++++++++++++++++++++++++---- src/xine-engine/nvtvd.h | 18 ++++++++++---- 2 files changed, 72 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/xine-engine/nvtvd.c b/src/xine-engine/nvtvd.c index b9f01b956..c2124dfef 100644 --- a/src/xine-engine/nvtvd.c +++ b/src/xine-engine/nvtvd.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: nvtvd.c,v 1.1 2002/06/10 21:42:45 mshopf Exp $ + * $Id: nvtvd.c,v 1.2 2002/06/26 15:57:47 jkeil Exp $ * * nvtvd - Routines for communication with nvtvd. * @@ -52,7 +52,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: nvtvd.c,v 1.1 2002/06/10 21:42:45 mshopf Exp $ + * $Id: nvtvd.c,v 1.2 2002/06/26 15:57:47 jkeil Exp $ * * Contents: * @@ -110,6 +110,7 @@ void pipeWriteList (FILE *pipe, int size, void *list); #endif /* _PIPE_H */ +#if __GNUC__ /* excerpt from debug.h */ #define ERROR(X...) fprintf(stderr, X) @@ -123,6 +124,22 @@ void pipeWriteList (FILE *pipe, int size, void *list); #define DPRINTF(X...) /* */ #endif +#else /* !__GNUC__ */ + +/* excerpt from debug.h */ +#define ERROR(...) fprintf(stderr, __VA_ARGS__) + +/* Fake output */ +#define FPRINTF(...) fprintf(stderr, __VA_ARGS__) + +#ifdef NVTV_DEBUG +#define DPRINTF(...) fprintf(stderr, __VA_ARGS__) +#define NO_TIMEOUT +#else +#define DPRINTF(...) /* */ +#endif +#endif + /* NVTV client backend -- Dirk Thierbach * * This file is part of nvtv, a tool for tv-output on NVidia cards. @@ -141,7 +158,7 @@ void pipeWriteList (FILE *pipe, int size, void *list); * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: nvtvd.c,v 1.1 2002/06/10 21:42:45 mshopf Exp $ + * $Id: nvtvd.c,v 1.2 2002/06/26 15:57:47 jkeil Exp $ * * Contents: * @@ -425,6 +442,7 @@ Bool bcl_serviceViewportCursor (int flags, int cursor_x, int cursor_y, return result; } +#if __GNUC__ BackAccessRec bcl_access_func = { openCard: bcl_openCard, closeCard: bcl_closeCard, @@ -459,6 +477,42 @@ BackCardRec bcl_card_func = { adjustViewport: bcl_adjustViewport, serviceViewportCursor: bcl_serviceViewportCursor, }; +#else +BackAccessRec bcl_access_func = { + bcl_openCard, + bcl_closeCard, +#ifdef DEBUG_PROBE + bnull_probeSystem, +#endif +}; + +BackCardRec bcl_card_func = { + bcl_openCard, + bcl_closeCard, + bcl_probeChips, +#ifdef DEBUG_PROBE + bnull_probeCard, + bnull_probeBus, +#endif + bcl_setHeads, + bcl_getHeads, + bcl_setChip, + bcl_setSettings, + bcl_getSettings, + bcl_setMode, + bcl_getMode, + bcl_setModeSettings, + bcl_setTestImage, + bcl_getStatus, + bcl_getConnection, + bcl_findBySize, + bcl_findByOverscan, + bcl_initSharedView, + bcl_getTwinView, + bcl_adjustViewport, + bcl_serviceViewportCursor, +}; +#endif /* -------- Init -------- */ @@ -529,7 +583,7 @@ CardPtr back_client_init (void) * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: nvtvd.c,v 1.1 2002/06/10 21:42:45 mshopf Exp $ + * $Id: nvtvd.c,v 1.2 2002/06/26 15:57:47 jkeil Exp $ * * Contents: * diff --git a/src/xine-engine/nvtvd.h b/src/xine-engine/nvtvd.h index 11ef2284d..4bbefc756 100644 --- a/src/xine-engine/nvtvd.h +++ b/src/xine-engine/nvtvd.h @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: nvtvd.h,v 1.1 2002/06/10 21:42:45 mshopf Exp $ + * $Id: nvtvd.h,v 1.2 2002/06/26 15:57:47 jkeil Exp $ * * nvtvd - Routines for communication with nvtvd. * @@ -230,8 +230,13 @@ typedef union _DevUnion { #include +#ifdef __GNUC__ #define DEBUG(x) /*x*/ #define ErrorF(x...) fprintf(stderr,x) +#else +#define DEBUG(x) /*x*/ +#define ErrorF(...) fprintf(stderr, __VA_ARGS__) +#endif #define __inline__ inline @@ -444,8 +449,13 @@ typedef struct _ScrnInfoRec *ScrnInfoPtr; extern ScrnInfoPtr *xf86Screens; /* List of pointers to ScrnInfoRecs */ +#ifdef __GNUC__ #define xf86Msg(type,format,args...) /* fprintf(stderr,format,args) */ #define xf86DrvMsg(scrnIndex,type,format, args...) /* fprintf(stderr,format,args) */ +#else +#define xf86Msg(type,format,...) /* fprintf(stderr,format,__VA_ARGS__) */ +#define xf86DrvMsg(scrnIndex,type,format, ...) /* fprintf(stderr,format,__VA_ARGS_) */ +#endif /* ---------------- nv driver files ---------------- */ @@ -568,7 +578,7 @@ typedef struct _riva_hw_inst * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: nvtvd.h,v 1.1 2002/06/10 21:42:45 mshopf Exp $ + * $Id: nvtvd.h,v 1.2 2002/06/26 15:57:47 jkeil Exp $ * * Contents: * @@ -1085,7 +1095,7 @@ typedef struct { * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: nvtvd.h,v 1.1 2002/06/10 21:42:45 mshopf Exp $ + * $Id: nvtvd.h,v 1.2 2002/06/26 15:57:47 jkeil Exp $ * * Contents: * @@ -1201,7 +1211,7 @@ extern BackCardPtr back_card; * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: nvtvd.h,v 1.1 2002/06/10 21:42:45 mshopf Exp $ + * $Id: nvtvd.h,v 1.2 2002/06/26 15:57:47 jkeil Exp $ * * Contents: * -- cgit v1.2.3