summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcus Meissner <marcus@jet.franken.de>2006-11-19 20:08:56 +0000
committerMarcus Meissner <marcus@jet.franken.de>2006-11-19 20:08:56 +0000
commit9ff6401b48bcf56fc2b04a8d78a2da4a89f1acd9 (patch)
tree58575eaebe46f63f1160069d0a888cad9bdfe7a9
parentd8d10cdfd26eab3197b300069e145b7423e3eafc (diff)
downloadlibgphoto2-9ff6401b48bcf56fc2b04a8d78a2da4a89f1acd9.tar.gz
made 3 functions and some data static.
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@9428 67ed7778-7388-44ab-90cf-0a291f65f57c
-rw-r--r--camlibs/sonix/ChangeLog4
-rw-r--r--camlibs/sonix/library.c2
-rw-r--r--camlibs/sonix/sakar-avi-header.h4
-rw-r--r--camlibs/sonix/sonix.c55
-rw-r--r--camlibs/sonix/sonix.h4
5 files changed, 34 insertions, 35 deletions
diff --git a/camlibs/sonix/ChangeLog b/camlibs/sonix/ChangeLog
index 69ef1cf31..0a1b4232d 100644
--- a/camlibs/sonix/ChangeLog
+++ b/camlibs/sonix/ChangeLog
@@ -1,3 +1,7 @@
+2006-11-19 Marcus Meissner <marcus@jet.franken.de>
+
+ * sonix.c: made 3 functions static
+
2006-08-17 Theodore Kilgore <kilgota@auburn.edu>
* library.c: Workaround for gtkam problem if camera empty.
diff --git a/camlibs/sonix/library.c b/camlibs/sonix/library.c
index a5e4e2901..631c11d69 100644
--- a/camlibs/sonix/library.c
+++ b/camlibs/sonix/library.c
@@ -50,7 +50,7 @@
#include "sakar-avi-header.h"
#define GP_MODULE "sonix"
-struct {
+static const struct {
char *name;
CameraDriverStatus status;
unsigned short idVendor;
diff --git a/camlibs/sonix/sakar-avi-header.h b/camlibs/sonix/sakar-avi-header.h
index 28c881de4..1b52dbb01 100644
--- a/camlibs/sonix/sakar-avi-header.h
+++ b/camlibs/sonix/sakar-avi-header.h
@@ -2,13 +2,13 @@
#define __SAKAR_AVI_HEADER_H
#define SAKAR_AVI_FRAME_HEADER_LENGTH 8
-unsigned char SakarAviFrameHeader[SAKAR_AVI_FRAME_HEADER_LENGTH] = {
+static const unsigned char SakarAviFrameHeader[SAKAR_AVI_FRAME_HEADER_LENGTH] = {
0x30, 0x30, 0x64, 0x63, /* 00dc */
0x00, 0x00, 0x00, 0x00 /* size of frame */
};
#define SAKAR_AVI_HEADER_LENGTH 224
-unsigned char SakarAviHeader[SAKAR_AVI_HEADER_LENGTH] = {
+static const unsigned char SakarAviHeader[SAKAR_AVI_HEADER_LENGTH] = {
/* -- RIFF HEADER -- */
0x52, 0x49, 0x46, 0x46, /* 0x00; RIFF */
0x00, 0x00, 0x00, 0x00, /* 0x04; number of bytes following */
diff --git a/camlibs/sonix/sonix.c b/camlibs/sonix/sonix.c
index f8472ccfb..8b2acf9f8 100644
--- a/camlibs/sonix/sonix.c
+++ b/camlibs/sonix/sonix.c
@@ -33,6 +33,33 @@
#define GP_MODULE "sonix"
+/* Three often-used generic commands */
+
+/* This reads a one-byte "status" response */
+static int
+SONIX_READ (GPPort *port, char *data)
+{
+ gp_port_usb_msg_interface_read(port, 0, 1, 0, data, 1);
+ return GP_OK;
+}
+
+/* This reads a 4-byte response to a command */
+static int
+SONIX_READ4 (GPPort *port, char *data)
+{
+ gp_port_usb_msg_interface_read(port, 0, 4, 0, data, 4);
+ return GP_OK;
+}
+
+/* A command to the camera is a 6-byte string, and this sends it. */
+static int
+SONIX_COMMAND (GPPort *port, char *command)
+{
+ gp_port_usb_msg_interface_write(port, 8, 2, 0, command ,6);
+ return GP_OK;
+}
+
+
int sonix_init (GPPort *port, CameraPrivateLibrary *priv)
{
int i, command_done=1;
@@ -364,31 +391,3 @@ sonix_decode(unsigned char * dst, unsigned char * src, int width, int height)
}
return GP_OK;
}
-
-/* Three often-used generic commands */
-
-
-/* This reads a one-byte "status" response */
-int
-SONIX_READ (GPPort *port, char *data)
-{
- gp_port_usb_msg_interface_read(port, 0, 1, 0, data, 1);
- return GP_OK;
-}
-
-/* This reads a 4-byte response to a command */
-int
-SONIX_READ4 (GPPort *port, char *data)
-{
- gp_port_usb_msg_interface_read(port, 0, 4, 0, data, 4);
- return GP_OK;
-}
-
-/* A command to the camera is a 6-byte string, and this sends it. */
-int
-SONIX_COMMAND (GPPort *port, char *command)
-{
- gp_port_usb_msg_interface_write(port, 8, 2, 0, command ,6);
- return GP_OK;
-}
-
diff --git a/camlibs/sonix/sonix.h b/camlibs/sonix/sonix.h
index db8c19263..2d8efa060 100644
--- a/camlibs/sonix/sonix.h
+++ b/camlibs/sonix/sonix.h
@@ -49,8 +49,4 @@ int sonix_capture_image (GPPort *port);
int sonix_exit (GPPort *port);
int sonix_decode (unsigned char * dst, unsigned char * src,
int width, int height);
-int SONIX_READ (GPPort *port, char *data);
-int SONIX_READ4 (GPPort *port, char *data);
-int SONIX_COMMAND (GPPort *port, char *command);
-
#endif