summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--camlibs/canon/canon.c87
-rw-r--r--camlibs/canon/library.h4
-rw-r--r--camlibs/canon/util.c19
-rw-r--r--camlibs/canon/util.h1
4 files changed, 1 insertions, 110 deletions
diff --git a/camlibs/canon/canon.c b/camlibs/canon/canon.c
index be02be706..f57c4c308 100644
--- a/camlibs/canon/canon.c
+++ b/camlibs/canon/canon.c
@@ -58,14 +58,6 @@
#include "serial.h"
#include "usb.h"
-/* Global variable to set debug level. */
-/* Defined levels so far : */
-/* 0 : no debug output */
-/* 1 : debug actions */
-/* 9 : debug everything, including hex dumps of the packets */
-
-int canon_debug_driver = 9;
-
#ifndef HAVE_SNPRINTF
#warning You do not seem to have a snprintf() function. Using sprintf instead.
#warning Note that this leads to SECURITY RISKS!
@@ -450,7 +442,6 @@ _canon_file_list (struct canon_dir *tree, const char *folder, CameraList *list)
{
if (!tree) {
-// debug_message(camera,"no directory listing available!\n");
return GP_ERROR;
}
@@ -1293,28 +1284,6 @@ camera_get_config (Camera *camera, CameraWidget **window)
gp_widget_new (GP_WIDGET_SECTION, _("Debug"), &section);
gp_widget_append (*window, section);
- gp_widget_new (GP_WIDGET_MENU, _("Debug level"), &t);
- gp_widget_add_choice (t, "none");
- gp_widget_add_choice (t, "functions");
- gp_widget_add_choice (t, "complete");
- switch (camera->pl->debug) {
- case 0:
- default:
- gp_widget_set_value (t, "none");
- break;
- case 1:
- gp_widget_set_value (t, "functions");
- break;
- case 9:
- gp_widget_set_value (t, "complete");
- break;
- }
- gp_widget_append (section, t);
-
- gp_widget_new (GP_WIDGET_TOGGLE, _("Dump data by packets to stderr"), &t);
- gp_widget_set_value (t, &(camera->pl->dump_packets));
- gp_widget_append (section, t);
-
return GP_OK;
}
@@ -1323,31 +1292,9 @@ camera_set_config (Camera *camera, CameraWidget *window)
{
CameraWidget *w;
char *wvalue;
- char buf[8];
gp_debug_printf (GP_DEBUG_LOW, "canon", "camera_set_config()");
- gp_widget_get_child_by_label (window, _("Debug level"), &w);
- if (gp_widget_changed (w)) {
- gp_widget_get_value (w, &wvalue);
- if (strcmp (wvalue, "none") == 0)
- camera->pl->debug = 0;
- else if (strcmp (wvalue, "functions") == 0)
- camera->pl->debug = 1;
- else if (strcmp (wvalue, "complete") == 0)
- camera->pl->debug = 9;
-
- sprintf (buf, "%i", camera->pl->debug);
- gp_setting_set ("canon", "debug", buf);
- }
-
- gp_widget_get_child_by_label (window, _("Dump data by packets to stderr"), &w);
- if (gp_widget_changed (w)) {
- gp_widget_get_value (w, &(camera->pl->dump_packets));
- sprintf (buf, "%i", camera->pl->dump_packets);
- gp_setting_set ("canon", "dump_packets", buf);
- }
-
gp_widget_get_child_by_label (window, _("Owner name"), &w);
if (gp_widget_changed (w)) {
gp_widget_get_value (w, &wvalue);
@@ -1462,7 +1409,6 @@ int
camera_init (Camera *camera)
{
GPPortSettings settings;
- char buf[8];
gp_debug_printf (GP_DEBUG_LOW, "canon", "canon camera_init()");
@@ -1489,39 +1435,6 @@ camera_init (Camera *camera)
camera->pl->seq_tx = 1;
camera->pl->seq_rx = 1;
- if (gp_setting_get ("canon", "debug", buf) != GP_OK)
- camera->pl->debug = 1;
-
- if (strncmp (buf, "0", 1) == 0)
- camera->pl->debug = 0;
- if (strncmp (buf, "1", 1) == 0)
- camera->pl->debug = 1;
- if (strncmp (buf, "2", 1) == 0)
- camera->pl->debug = 2;
- if (strncmp (buf, "3", 1) == 0)
- camera->pl->debug = 3;
- if (strncmp (buf, "4", 1) == 0)
- camera->pl->debug = 4;
- if (strncmp (buf, "5", 1) == 0)
- camera->pl->debug = 5;
- if (strncmp (buf, "6", 1) == 0)
- camera->pl->debug = 6;
- if (strncmp (buf, "7", 1) == 0)
- camera->pl->debug = 7;
- if (strncmp (buf, "8", 1) == 0)
- camera->pl->debug = 8;
- if (strncmp (buf, "9", 1) == 0)
- camera->pl->debug = 9;
-
- gp_debug_printf (GP_DEBUG_LOW, "canon", "Debug level: %i", camera->pl->debug);
-
- if (gp_setting_get ("canon", "dump_packets", buf) == GP_OK) {
- if (strncmp (buf, "1", 1) == 0)
- camera->pl->dump_packets = 1;
- if (strncmp (buf, "0", 1) == 0)
- camera->pl->dump_packets = 0;
- }
-
switch (camera->port->type) {
case GP_PORT_USB:
gp_debug_printf (GP_DEBUG_LOW, "canon",
diff --git a/camlibs/canon/library.h b/camlibs/canon/library.h
index e7d5d5bf3..3f4779826 100644
--- a/camlibs/canon/library.h
+++ b/camlibs/canon/library.h
@@ -1,5 +1,5 @@
/*
- * psa50.h - Canon PowerShot A50 "native" operations.
+ * library.h - Canon "native" operations.
*
* Written 1999 by Wolfgang G. Reissnegger and Werner Almesberger
*
@@ -70,8 +70,6 @@ struct _CameraPrivateLibrary
char ident[32]; /* Model ID string given by the camera */
char owner[32]; /* Owner name */
char firmwrev[4]; /* Firmware revision */
- int debug;
- int dump_packets;
int A5;
char psa50_id[200]; /* some models may have a lot to report */
int canon_comm_method;
diff --git a/camlibs/canon/util.c b/camlibs/canon/util.c
index 8cc6e9f96..3367df97a 100644
--- a/camlibs/canon/util.c
+++ b/camlibs/canon/util.c
@@ -25,25 +25,6 @@
#include "util.h"
#include "library.h"
-void
-debug_message (Camera *camera, const char *msg, ...)
-{
- va_list args;
- char buf[4096];
-
- /* We could stuff these instrution into a
- * if (camera->pl->debug) { .... }
- * statement, but this should be obsolete
- * because we're using the official log message
- * mechanism anyway.
- */
- va_start (args, msg);
- vsnprintf (buf, sizeof (buf), msg, args);
- va_end (args);
-
- gp_log (GP_LOG_DEBUG, "canon", "%s", buf);
-}
-
/**
* intatpos:
* @block: byte block we are to write the integer into
diff --git a/camlibs/canon/util.h b/camlibs/canon/util.h
index 9ecb61e37..a3a6ec205 100644
--- a/camlibs/canon/util.h
+++ b/camlibs/canon/util.h
@@ -14,7 +14,6 @@
****************************************************************************/
void dump_hex(Camera *camera,const char *msg, const unsigned char *buf, int len);
-void debug_message(Camera *camera,const char * msg, ...);
void intatpos (unsigned char *block, int pos, int integer);
unsigned int get_int (const unsigned char *p);
int is_thumbnail (const char *name);