Unified style of struct and enum definitions.

merge-requests/1/head
Jan Hauffa 2011-03-08 18:26:32 +01:00 zatwierdzone przez m. allan noah
rodzic ce6d7010d3
commit 2be2be76ae
3 zmienionych plików z 22 dodań i 24 usunięć

Wyświetl plik

@ -61,7 +61,7 @@
#define DEF_LINEARTTHRESHOLD 128 #define DEF_LINEARTTHRESHOLD 128
enum Mustek_Usb_Option enum
{ {
OPT_NUM_OPTS = 0, OPT_NUM_OPTS = 0,
OPT_MODE_GROUP, OPT_MODE_GROUP,
@ -79,12 +79,13 @@ enum Mustek_Usb_Option
OPT_TL_Y, /* top-left y */ OPT_TL_Y, /* top-left y */
OPT_BR_X, /* bottom-right x */ OPT_BR_X, /* bottom-right x */
OPT_BR_Y, /* bottom-right y */ OPT_BR_Y, /* bottom-right y */
/* must come last: */ /* must come last: */
NUM_OPTIONS NUM_OPTIONS
}; };
typedef struct Scanner_Model typedef struct
{ {
/** @name Identification */ /** @name Identification */
/*@{ */ /*@{ */
@ -126,7 +127,6 @@ typedef struct Mustek_Scanner
SANE_Byte *Scan_data_buf; /*store Scanned data for transfer */ SANE_Byte *Scan_data_buf; /*store Scanned data for transfer */
SANE_Byte *Scan_data_buf_start; /*point to data need to transfer */ SANE_Byte *Scan_data_buf_start; /*point to data need to transfer */
size_t scan_buffer_len; /* length of data buf */ size_t scan_buffer_len; /* length of data buf */
} } Mustek_Scanner;
Mustek_Scanner;
#endif #endif

Wyświetl plik

@ -67,7 +67,7 @@
#endif #endif
typedef enum tagFIRMWARESTATE typedef enum
{ {
FS_NULL = 0, FS_NULL = 0,
FS_ATTACHED = 1, FS_ATTACHED = 1,
@ -75,13 +75,13 @@ typedef enum tagFIRMWARESTATE
FS_SCANNING = 3 FS_SCANNING = 3
} FIRMWARESTATE; } FIRMWARESTATE;
typedef enum tagUSBHOST typedef enum
{ {
HT_USB10 = 0, HT_USB10 = 0,
HT_USB20 = 1 HT_USB20 = 1
} USBHOST; } USBHOST;
typedef enum tagLIGHTSOURCE typedef enum
{ {
LS_REFLECTIVE = 1, LS_REFLECTIVE = 1,
LS_POSITIVE = 2, LS_POSITIVE = 2,
@ -130,7 +130,7 @@ typedef struct
} Timings; } Timings;
typedef struct tagADConverter typedef struct
{ {
SANE_Byte GainR; SANE_Byte GainR;
SANE_Byte GainG; SANE_Byte GainG;
@ -164,8 +164,7 @@ typedef struct
SANE_Byte isMotorGoToFirstLine; /*Roy add */ SANE_Byte isMotorGoToFirstLine; /*Roy add */
SANE_Byte * lpShadingTable; /*Roy add */ SANE_Byte * lpShadingTable; /*Roy add */
SANE_Byte isUniformSpeedToScan; SANE_Byte isUniformSpeedToScan;
} } Asic, *PAsic;
Asic, *PAsic;
typedef enum typedef enum
{ {
@ -176,8 +175,7 @@ typedef enum
STATUS_INVAL, STATUS_INVAL,
STATUS_MEM_ERROR, STATUS_MEM_ERROR,
STATUS_IO_ERROR STATUS_IO_ERROR
} } STATUS;
STATUS;
/* debug levels */ /* debug levels */
@ -1150,7 +1148,7 @@ static STATUS Asic_SetCalibrate (PAsic chip, SANE_Byte bScanBits, unsigned short
/* ---------------------- asic motor defines -------------------------- */ /* ---------------------- asic motor defines -------------------------- */
typedef struct tagLLF_RAMACCESS typedef struct
{ {
SANE_Byte ReadWrite; SANE_Byte ReadWrite;
SANE_Byte IsOnChipGamma; SANE_Byte IsOnChipGamma;
@ -1161,7 +1159,7 @@ typedef struct tagLLF_RAMACCESS
SANE_Byte *BufferPtr; SANE_Byte *BufferPtr;
} LLF_RAMACCESS; } LLF_RAMACCESS;
typedef struct tagLLF_MOTOR_CURRENT_AND_PHASE typedef struct
{ {
SANE_Byte MoveType; SANE_Byte MoveType;
SANE_Byte FillPhase; SANE_Byte FillPhase;
@ -1170,7 +1168,7 @@ typedef struct tagLLF_MOTOR_CURRENT_AND_PHASE
SANE_Byte MotorCurrentTableB[32]; SANE_Byte MotorCurrentTableB[32];
} LLF_MOTOR_CURRENT_AND_PHASE; } LLF_MOTOR_CURRENT_AND_PHASE;
typedef struct tagLLF_CALCULATEMOTORTABLE typedef struct
{ {
unsigned short StartSpeed; unsigned short StartSpeed;
unsigned short EndSpeed; unsigned short EndSpeed;
@ -1179,13 +1177,13 @@ typedef struct tagLLF_CALCULATEMOTORTABLE
unsigned short * lpMotorTable; unsigned short * lpMotorTable;
} LLF_CALCULATEMOTORTABLE; } LLF_CALCULATEMOTORTABLE;
typedef struct tagLLF_SETMOTORTABLE typedef struct
{ {
SANE_Byte MotorTableAddress; SANE_Byte MotorTableAddress;
unsigned short *MotorTablePtr; unsigned short *MotorTablePtr;
} LLF_SETMOTORTABLE; } LLF_SETMOTORTABLE;
typedef struct tagLLF_MOTORMOVE typedef struct
{ {
SANE_Byte ActionMode; /* 0: AccDec Mode, 1: Uniform Speed Mode, 2: Test Mode */ SANE_Byte ActionMode; /* 0: AccDec Mode, 1: Uniform Speed Mode, 2: Test Mode */
SANE_Byte ActionType; /* 0: Forward, 1: Backward, 2:Back To Home */ SANE_Byte ActionType; /* 0: Forward, 1: Backward, 2:Back To Home */

Wyświetl plik

@ -65,7 +65,7 @@ typedef unsigned char SCANTYPE;
#define ST_Reflective 0x00 #define ST_Reflective 0x00
#define ST_Transparent 0x01 #define ST_Transparent 0x01
typedef enum tagCOLORMODE typedef enum
{ {
CM_RGB48 = 0, CM_RGB48 = 0,
CM_RGB24 = 4, CM_RGB24 = 4,
@ -80,7 +80,7 @@ typedef enum tagCOLORMODE
/* structures use in parameters of export function*/ /* structures use in parameters of export function*/
typedef struct tagGETPARAMETERS typedef struct
{ {
unsigned short wSourceXDPI; unsigned short wSourceXDPI;
unsigned short wSourceYDPI; unsigned short wSourceYDPI;
@ -88,7 +88,7 @@ typedef struct tagGETPARAMETERS
unsigned int dwLength; unsigned int dwLength;
} GETPARAMETERS, *LPGETPARAMETERS; } GETPARAMETERS, *LPGETPARAMETERS;
typedef struct tagFRAME typedef struct
{ {
unsigned short x1; unsigned short x1;
unsigned short y1; unsigned short y1;
@ -96,7 +96,7 @@ typedef struct tagFRAME
unsigned short y2; unsigned short y2;
} FRAME, *LPFRAME; } FRAME, *LPFRAME;
typedef struct tagSETPARAMETERS typedef struct
{ {
FRAME fmArea; FRAME fmArea;
unsigned short wTargetDPI; unsigned short wTargetDPI;
@ -106,7 +106,7 @@ typedef struct tagSETPARAMETERS
unsigned short * pGammaTable; unsigned short * pGammaTable;
} SETPARAMETERS, *LPSETPARAMETERS; } SETPARAMETERS, *LPSETPARAMETERS;
typedef struct tagIMAGEROWS typedef struct
{ {
RGBORDER roRgbOrder; RGBORDER roRgbOrder;
unsigned short wWantedLineNum; unsigned short wWantedLineNum;
@ -114,7 +114,7 @@ typedef struct tagIMAGEROWS
SANE_Byte * pBuffer; SANE_Byte * pBuffer;
} IMAGEROWS, *LPIMAGEROWS; } IMAGEROWS, *LPIMAGEROWS;
typedef struct tagTARGETIMAGE typedef struct
{ {
SANE_Bool isOptimalSpeed; SANE_Bool isOptimalSpeed;
COLORMODE cmColorMode; COLORMODE cmColorMode;
@ -126,7 +126,7 @@ typedef struct tagTARGETIMAGE
SCANSOURCE ssScanSource; SCANSOURCE ssScanSource;
} TARGETIMAGE, *PTARGETIMAGE; } TARGETIMAGE, *PTARGETIMAGE;
typedef struct tagSUGGESTSETTING typedef struct
{ {
COLORMODE cmScanMode; COLORMODE cmScanMode;
unsigned short wXDpi; unsigned short wXDpi;