[gs-cvs] rev 8337 - trunk/gs/src
giles at ghostscript.com
giles at ghostscript.com
Wed Oct 31 10:00:52 PDT 2007
Author: giles
Date: 2007-10-31 10:00:51 -0700 (Wed, 31 Oct 2007)
New Revision: 8337
Modified:
trunk/gs/src/gsdevice.c
trunk/gs/src/gsdevice.h
trunk/gs/src/imainarg.c
Log:
Add a gs_getdefaultdevice() call and use it when printing the help
message. It just returns the first device as before. Bug 689273.
Modified: trunk/gs/src/gsdevice.c
===================================================================
--- trunk/gs/src/gsdevice.c 2007-10-30 23:45:46 UTC (rev 8336)
+++ trunk/gs/src/gsdevice.c 2007-10-31 17:00:51 UTC (rev 8337)
@@ -206,6 +206,13 @@
return list[index];
}
+/* Get the default device from the known device list */
+const gx_device *
+gs_getdefaultdevice(void)
+{
+ return gs_getdevice(0);
+}
+
/* Fill in the GC structure descriptor for a device. */
static void
gx_device_make_struct_type(gs_memory_struct_type_t *st,
Modified: trunk/gs/src/gsdevice.h
===================================================================
--- trunk/gs/src/gsdevice.h 2007-10-30 23:45:46 UTC (rev 8336)
+++ trunk/gs/src/gsdevice.h 2007-10-31 17:00:51 UTC (rev 8337)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001-2006 Artifex Software, Inc.
+/* Copyright (C) 2001-2007 Artifex Software, Inc.
All Rights Reserved.
This software is provided AS-IS with no warranty, either express or
@@ -39,9 +39,11 @@
/* Device procedures not involving a graphics state. */
+const gx_device *gs_getdevice(int);
+const gx_device *gs_getdefaultdevice(void);
+
int gs_opendevice(gx_device *);
int gs_copyscanlines(gx_device *, int, byte *, uint, int *, uint *);
-const gx_device *gs_getdevice(int);
int gs_copydevice(gx_device **, const gx_device *, gs_memory_t *);
/*
* If keep_open is true and dev->is_open is true, the copy *may* have
Modified: trunk/gs/src/imainarg.c
===================================================================
--- trunk/gs/src/imainarg.c 2007-10-30 23:45:46 UTC (rev 8336)
+++ trunk/gs/src/imainarg.c 2007-10-31 17:00:51 UTC (rev 8337)
@@ -939,7 +939,7 @@
print_devices(const gs_main_instance *minst)
{
outprintf(minst->heap, "%s", help_default_device);
- outprintf(minst->heap, " %s\n", gs_devicename(gs_getdevice(0)));
+ outprintf(minst->heap, " %s\n", gs_devicename(gs_getdefaultdevice()));
outprintf(minst->heap, "%s", help_devices);
{
int i;
More information about the gs-cvs
mailing list