summaryrefslogtreecommitdiff
path: root/camlibs/gsmart300
diff options
context:
space:
mode:
authorTill Adam <till@adam-lilienthal.de>2003-05-29 07:23:22 +0000
committerTill Adam <till@adam-lilienthal.de>2003-05-29 07:23:22 +0000
commit86b94becc1f1e32301ccf1fa5cd5965634dec3b9 (patch)
tree4e4269e905b6df99a2fa751ff742a5d1e998c35c /camlibs/gsmart300
parente0682ef23a535d47c1dc436970dcdc89eae517e5 (diff)
downloadlibgphoto2-86b94becc1f1e32301ccf1fa5cd5965634dec3b9.tar.gz
u_int* -> uint*
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@6447 67ed7778-7388-44ab-90cf-0a291f65f57c
Diffstat (limited to 'camlibs/gsmart300')
-rw-r--r--camlibs/gsmart300/gsmart300-jpeg-header.h4
-rw-r--r--camlibs/gsmart300/gsmart300.c40
-rw-r--r--camlibs/gsmart300/gsmart300.h9
3 files changed, 27 insertions, 26 deletions
diff --git a/camlibs/gsmart300/gsmart300-jpeg-header.h b/camlibs/gsmart300/gsmart300-jpeg-header.h
index 2524e73c8..5541e8f96 100644
--- a/camlibs/gsmart300/gsmart300-jpeg-header.h
+++ b/camlibs/gsmart300/gsmart300-jpeg-header.h
@@ -9,7 +9,7 @@
* 563 - 564 : Image Width(H Byte,L Byte)
*/
#define GSMART_JPG_DEFAULT_HEADER_LENGTH 589
-u_int8_t Gsmart_300_JPGDefaultHeader[GSMART_JPG_DEFAULT_HEADER_LENGTH] = {
+uint8_t Gsmart_300_JPGDefaultHeader[GSMART_JPG_DEFAULT_HEADER_LENGTH] = {
//SOI(Start of Image)
0xFF,0xD8,
//DQT(Define Quantization Table)
@@ -65,7 +65,7 @@ u_int8_t Gsmart_300_JPGDefaultHeader[GSMART_JPG_DEFAULT_HEADER_LENGTH] = {
};
/* Quantization tables for GSmart300 */
-u_int8_t Gsmart_300_QTable[10][64]=
+uint8_t Gsmart_300_QTable[10][64]=
{
// index 0, Q85
{ 5, 3, 4, 4, 4, 3, 5, 4, 4, 4, 5, 5, 5, 6, 7, 12,
diff --git a/camlibs/gsmart300/gsmart300.c b/camlibs/gsmart300/gsmart300.c
index 4990bdf3a..1be4019ce 100644
--- a/camlibs/gsmart300/gsmart300.c
+++ b/camlibs/gsmart300/gsmart300.c
@@ -57,12 +57,12 @@
#define GP_MODULE "gsmart300"
static int gsmart300_download_data (CameraPrivateLibrary * lib,
- int data_type, u_int16_t index, unsigned int size,
- u_int8_t * buf);
+ int data_type, uint16_t index, unsigned int size,
+ uint8_t * buf);
static int gsmart300_get_FATs (CameraPrivateLibrary * lib);
static int yuv2rgb (int y, int u, int v, int *r, int *g, int *b);
static int gsmart300_get_image_thumbnail (CameraPrivateLibrary * lib,
- u_int8_t ** buf, unsigned int *len,
+ uint8_t ** buf, unsigned int *len,
struct GsmartFile *g_file);
#define __GS300_FAT 0
@@ -85,7 +85,7 @@ int
gsmart300_delete_file (CameraPrivateLibrary * lib, unsigned int index)
{
struct GsmartFile *g_file;
- u_int16_t fat_index;
+ uint16_t fat_index;
CHECK (gsmart300_get_file_info (lib, index, &g_file));
@@ -116,13 +116,13 @@ gsmart300_delete_all (CameraPrivateLibrary * lib)
}
int
-gsmart300_request_file (CameraPrivateLibrary * lib, u_int8_t ** buf,
+gsmart300_request_file (CameraPrivateLibrary * lib, uint8_t ** buf,
unsigned int *len, unsigned int number)
{
struct GsmartFile *g_file;
- u_int8_t *p, *lp_jpg, *start_of_file;
- u_int8_t qIndex, value;
- u_int8_t *mybuf;
+ uint8_t *p, *lp_jpg, *start_of_file;
+ uint8_t qIndex, value;
+ uint8_t *mybuf;
int i;
/* NOTE : these varialbes are slightly renamed */
int flash_size, data_size, file_size;
@@ -197,7 +197,7 @@ gsmart300_request_file (CameraPrivateLibrary * lib, u_int8_t ** buf,
}
int
-gsmart300_request_thumbnail (CameraPrivateLibrary * lib, u_int8_t ** buf,
+gsmart300_request_thumbnail (CameraPrivateLibrary * lib, uint8_t ** buf,
unsigned int *len, unsigned int number, int *type)
{
struct GsmartFile *g_file;
@@ -211,16 +211,16 @@ gsmart300_request_thumbnail (CameraPrivateLibrary * lib, u_int8_t ** buf,
static int
-gsmart300_get_image_thumbnail (CameraPrivateLibrary * lib, u_int8_t ** buf,
+gsmart300_get_image_thumbnail (CameraPrivateLibrary * lib, uint8_t ** buf,
unsigned int *len, struct GsmartFile *g_file)
{
unsigned int size;
- u_int8_t *p;
- u_int8_t *mybuf = NULL;
- u_int8_t *tmp;
+ uint8_t *p;
+ uint8_t *mybuf = NULL;
+ uint8_t *tmp;
unsigned int t_width, t_height;
- u_int8_t *yuv_p;
- u_int8_t *rgb_p;
+ uint8_t *yuv_p;
+ uint8_t *rgb_p;
unsigned char pbm_header[14];
p = g_file->fat;
@@ -320,9 +320,9 @@ gsmart300_reset (CameraPrivateLibrary * lib)
/* buf must be of length n*0x200 */
/* Pictured are pointed by there index which runs over 0 to npic -1*/
static int gsmart300_download_data (CameraPrivateLibrary * lib, int data_type,
- u_int16_t index, unsigned int size, u_int8_t * buf)
+ uint16_t index, unsigned int size, uint8_t * buf)
{
- u_int16_t fat_index = 0x1fff - index;
+ uint16_t fat_index = 0x1fff - index;
int i;
if (data_type == __GS300_FAT)
@@ -350,11 +350,11 @@ static int gsmart300_download_data (CameraPrivateLibrary * lib, int data_type,
static int
gsmart300_get_FATs (CameraPrivateLibrary * lib)
{
- u_int8_t type;
+ uint8_t type;
unsigned int index = 0;
unsigned int file_index = 0;
- u_int8_t *p = NULL;
- u_int8_t buf[14];
+ uint8_t *p = NULL;
+ uint8_t buf[14];
CHECK (gsmart300_get_file_count(lib));
diff --git a/camlibs/gsmart300/gsmart300.h b/camlibs/gsmart300/gsmart300.h
index c66e5e866..1b33fbd1d 100644
--- a/camlibs/gsmart300/gsmart300.h
+++ b/camlibs/gsmart300/gsmart300.h
@@ -28,6 +28,7 @@
#ifndef __GSMART300_H__
#define __GSMART300_H__
#include <gphoto2-camera.h>
+#include <inttypes.h>
#define FLASH_PAGE_SIZE_300 0x200
#define GSMART_FILE_TYPE_IMAGE 0x00
@@ -40,7 +41,7 @@ struct GsmartFile
int width;
int height;
int index;
- u_int8_t *fat;
+ uint8_t *fat;
int mime_type;
};
@@ -49,7 +50,7 @@ struct _CameraPrivateLibrary
GPPort *gpdev;
int dirty;
int num_files;
- u_int8_t *fats;
+ uint8_t *fats;
struct GsmartFile *files;
};
@@ -60,9 +61,9 @@ int gsmart300_delete_file (CameraPrivateLibrary * lib, unsigned int index);
int gsmart300_delete_all (CameraPrivateLibrary * lib);
int gsmart300_get_file_info (CameraPrivateLibrary * lib, unsigned int index,
struct GsmartFile **file);
-int gsmart300_request_file (CameraPrivateLibrary * lib, u_int8_t ** buf,
+int gsmart300_request_file (CameraPrivateLibrary * lib, uint8_t ** buf,
unsigned int *len, unsigned int number);
-int gsmart300_request_thumbnail (CameraPrivateLibrary * lib, u_int8_t ** buf,
+int gsmart300_request_thumbnail (CameraPrivateLibrary * lib, uint8_t ** buf,
unsigned int *len, unsigned int number, int *type);
#endif /* __GSMART300_H__ */