Commit 4b53c3aa authored by Stefan Huehner's avatar Stefan Huehner Committed by Alexandre Julliard

Make some function static.

parent 12c08baf
...@@ -51,7 +51,7 @@ THOSE_ZIP_CONSTS; ...@@ -51,7 +51,7 @@ THOSE_ZIP_CONSTS;
*/ */
/* try to open a cabinet file, returns success */ /* try to open a cabinet file, returns success */
BOOL cabinet_open(struct cabinet *cab) static BOOL cabinet_open(struct cabinet *cab)
{ {
const char *name = cab->filename; const char *name = cab->filename;
HANDLE fh; HANDLE fh;
...@@ -89,7 +89,7 @@ BOOL cabinet_open(struct cabinet *cab) ...@@ -89,7 +89,7 @@ BOOL cabinet_open(struct cabinet *cab)
* *
* close the file handle in a struct cabinet. * close the file handle in a struct cabinet.
*/ */
void cabinet_close(struct cabinet *cab) { static void cabinet_close(struct cabinet *cab) {
TRACE("(cab == ^%p)\n", cab); TRACE("(cab == ^%p)\n", cab);
if (cab->fh) CloseHandle(cab->fh); if (cab->fh) CloseHandle(cab->fh);
cab->fh = 0; cab->fh = 0;
...@@ -98,7 +98,7 @@ void cabinet_close(struct cabinet *cab) { ...@@ -98,7 +98,7 @@ void cabinet_close(struct cabinet *cab) {
/******************************************************* /*******************************************************
* ensure_filepath2 (internal) * ensure_filepath2 (internal)
*/ */
BOOL ensure_filepath2(char *path) { static BOOL ensure_filepath2(char *path) {
BOOL ret = TRUE; BOOL ret = TRUE;
int len; int len;
char *new_path; char *new_path;
...@@ -147,7 +147,7 @@ BOOL ensure_filepath2(char *path) { ...@@ -147,7 +147,7 @@ BOOL ensure_filepath2(char *path) {
* *
* ensure_filepath("a\b\c\d.txt") ensures a, a\b and a\b\c exist as dirs * ensure_filepath("a\b\c\d.txt") ensures a, a\b and a\b\c exist as dirs
*/ */
BOOL ensure_filepath(char *path) { static BOOL ensure_filepath(char *path) {
char new_path[MAX_PATH]; char new_path[MAX_PATH];
int len, i, lastslashpos = -1; int len, i, lastslashpos = -1;
...@@ -176,7 +176,7 @@ BOOL ensure_filepath(char *path) { ...@@ -176,7 +176,7 @@ BOOL ensure_filepath(char *path) {
* *
* opens a file for output, returns success * opens a file for output, returns success
*/ */
BOOL file_open(struct cab_file *fi, BOOL lower, LPCSTR dir) static BOOL file_open(struct cab_file *fi, BOOL lower, LPCSTR dir)
{ {
char c, *d, *name; char c, *d, *name;
BOOL ok = FALSE; BOOL ok = FALSE;
...@@ -239,7 +239,7 @@ BOOL file_open(struct cab_file *fi, BOOL lower, LPCSTR dir) ...@@ -239,7 +239,7 @@ BOOL file_open(struct cab_file *fi, BOOL lower, LPCSTR dir)
* *
* closes a completed file * closes a completed file
*/ */
void file_close(struct cab_file *fi) static void file_close(struct cab_file *fi)
{ {
TRACE("(fi == ^%p)\n", fi); TRACE("(fi == ^%p)\n", fi);
...@@ -255,7 +255,7 @@ void file_close(struct cab_file *fi) ...@@ -255,7 +255,7 @@ void file_close(struct cab_file *fi)
* writes from buf to a file specified as a cab_file struct. * writes from buf to a file specified as a cab_file struct.
* returns success/failure * returns success/failure
*/ */
BOOL file_write(struct cab_file *fi, cab_UBYTE *buf, cab_off_t length) static BOOL file_write(struct cab_file *fi, cab_UBYTE *buf, cab_off_t length)
{ {
DWORD bytes_written; DWORD bytes_written;
...@@ -276,7 +276,7 @@ BOOL file_write(struct cab_file *fi, cab_UBYTE *buf, cab_off_t length) ...@@ -276,7 +276,7 @@ BOOL file_write(struct cab_file *fi, cab_UBYTE *buf, cab_off_t length)
* advance the file pointer associated with the cab structure * advance the file pointer associated with the cab structure
* by distance bytes * by distance bytes
*/ */
void cabinet_skip(struct cabinet *cab, cab_off_t distance) static void cabinet_skip(struct cabinet *cab, cab_off_t distance)
{ {
TRACE("(cab == ^%p, distance == %u)\n", cab, distance); TRACE("(cab == ^%p, distance == %u)\n", cab, distance);
if (SetFilePointer(cab->fh, distance, NULL, FILE_CURRENT) == INVALID_SET_FILE_POINTER) { if (SetFilePointer(cab->fh, distance, NULL, FILE_CURRENT) == INVALID_SET_FILE_POINTER) {
...@@ -290,7 +290,7 @@ void cabinet_skip(struct cabinet *cab, cab_off_t distance) ...@@ -290,7 +290,7 @@ void cabinet_skip(struct cabinet *cab, cab_off_t distance)
* *
* seek to the specified absolute offset in a cab * seek to the specified absolute offset in a cab
*/ */
void cabinet_seek(struct cabinet *cab, cab_off_t offset) { static void cabinet_seek(struct cabinet *cab, cab_off_t offset) {
TRACE("(cab == ^%p, offset == %u)\n", cab, offset); TRACE("(cab == ^%p, offset == %u)\n", cab, offset);
if (SetFilePointer(cab->fh, offset, NULL, FILE_BEGIN) != offset) if (SetFilePointer(cab->fh, offset, NULL, FILE_BEGIN) != offset)
ERR("%s seek failure\n", debugstr_a(cab->filename)); ERR("%s seek failure\n", debugstr_a(cab->filename));
...@@ -301,7 +301,7 @@ void cabinet_seek(struct cabinet *cab, cab_off_t offset) { ...@@ -301,7 +301,7 @@ void cabinet_seek(struct cabinet *cab, cab_off_t offset) {
* *
* returns the file pointer position of a cab * returns the file pointer position of a cab
*/ */
cab_off_t cabinet_getoffset(struct cabinet *cab) static cab_off_t cabinet_getoffset(struct cabinet *cab)
{ {
return SetFilePointer(cab->fh, 0, NULL, FILE_CURRENT); return SetFilePointer(cab->fh, 0, NULL, FILE_CURRENT);
} }
...@@ -311,7 +311,7 @@ cab_off_t cabinet_getoffset(struct cabinet *cab) ...@@ -311,7 +311,7 @@ cab_off_t cabinet_getoffset(struct cabinet *cab)
* *
* read data from a cabinet, returns success * read data from a cabinet, returns success
*/ */
BOOL cabinet_read(struct cabinet *cab, cab_UBYTE *buf, cab_off_t length) static BOOL cabinet_read(struct cabinet *cab, cab_UBYTE *buf, cab_off_t length)
{ {
DWORD bytes_read; DWORD bytes_read;
cab_off_t avail = cab->filelen - cabinet_getoffset(cab); cab_off_t avail = cab->filelen - cabinet_getoffset(cab);
...@@ -339,7 +339,7 @@ BOOL cabinet_read(struct cabinet *cab, cab_UBYTE *buf, cab_off_t length) ...@@ -339,7 +339,7 @@ BOOL cabinet_read(struct cabinet *cab, cab_UBYTE *buf, cab_off_t length)
* *
* allocate and read an aribitrarily long string from the cabinet * allocate and read an aribitrarily long string from the cabinet
*/ */
char *cabinet_read_string(struct cabinet *cab) static char *cabinet_read_string(struct cabinet *cab)
{ {
cab_off_t len=256, base = cabinet_getoffset(cab), maxlen = cab->filelen - base; cab_off_t len=256, base = cabinet_getoffset(cab), maxlen = cab->filelen - base;
BOOL ok = FALSE; BOOL ok = FALSE;
...@@ -387,7 +387,7 @@ char *cabinet_read_string(struct cabinet *cab) ...@@ -387,7 +387,7 @@ char *cabinet_read_string(struct cabinet *cab)
* *
* reads the header and all folder and file entries in this cabinet * reads the header and all folder and file entries in this cabinet
*/ */
BOOL cabinet_read_entries(struct cabinet *cab) static BOOL cabinet_read_entries(struct cabinet *cab)
{ {
int num_folders, num_files, header_resv, folder_resv = 0, i; int num_folders, num_files, header_resv, folder_resv = 0, i;
struct cab_folder *fol, *linkfol = NULL; struct cab_folder *fol, *linkfol = NULL;
...@@ -525,7 +525,7 @@ BOOL cabinet_read_entries(struct cabinet *cab) ...@@ -525,7 +525,7 @@ BOOL cabinet_read_entries(struct cabinet *cab)
* file [name]. Returns a cabinet structure if successful, or NULL * file [name]. Returns a cabinet structure if successful, or NULL
* otherwise. * otherwise.
*/ */
struct cabinet *load_cab_offset(LPCSTR name, cab_off_t offset) static struct cabinet *load_cab_offset(LPCSTR name, cab_off_t offset)
{ {
struct cabinet *cab = (struct cabinet *) calloc(1, sizeof(struct cabinet)); struct cabinet *cab = (struct cabinet *) calloc(1, sizeof(struct cabinet));
int ok; int ok;
...@@ -553,7 +553,7 @@ struct cabinet *load_cab_offset(LPCSTR name, cab_off_t offset) ...@@ -553,7 +553,7 @@ struct cabinet *load_cab_offset(LPCSTR name, cab_off_t offset)
/******************************************************** /********************************************************
* Ziphuft_free (internal) * Ziphuft_free (internal)
*/ */
void Ziphuft_free(struct Ziphuft *t) static void Ziphuft_free(struct Ziphuft *t)
{ {
register struct Ziphuft *p, *q; register struct Ziphuft *p, *q;
...@@ -570,7 +570,7 @@ void Ziphuft_free(struct Ziphuft *t) ...@@ -570,7 +570,7 @@ void Ziphuft_free(struct Ziphuft *t)
/********************************************************* /*********************************************************
* Ziphuft_build (internal) * Ziphuft_build (internal)
*/ */
cab_LONG Ziphuft_build(cab_ULONG *b, cab_ULONG n, cab_ULONG s, cab_UWORD *d, cab_UWORD *e, static cab_LONG Ziphuft_build(cab_ULONG *b, cab_ULONG n, cab_ULONG s, cab_UWORD *d, cab_UWORD *e,
struct Ziphuft **t, cab_LONG *m, cab_decomp_state *decomp_state) struct Ziphuft **t, cab_LONG *m, cab_decomp_state *decomp_state)
{ {
cab_ULONG a; /* counter for codes of length k */ cab_ULONG a; /* counter for codes of length k */
...@@ -750,7 +750,7 @@ struct Ziphuft **t, cab_LONG *m, cab_decomp_state *decomp_state) ...@@ -750,7 +750,7 @@ struct Ziphuft **t, cab_LONG *m, cab_decomp_state *decomp_state)
/********************************************************* /*********************************************************
* Zipinflate_codes (internal) * Zipinflate_codes (internal)
*/ */
cab_LONG Zipinflate_codes(struct Ziphuft *tl, struct Ziphuft *td, static cab_LONG Zipinflate_codes(struct Ziphuft *tl, struct Ziphuft *td,
cab_LONG bl, cab_LONG bd, cab_decomp_state *decomp_state) cab_LONG bl, cab_LONG bd, cab_decomp_state *decomp_state)
{ {
register cab_ULONG e; /* table entry flag/number of extra bits */ register cab_ULONG e; /* table entry flag/number of extra bits */
...@@ -833,7 +833,7 @@ cab_LONG Zipinflate_codes(struct Ziphuft *tl, struct Ziphuft *td, ...@@ -833,7 +833,7 @@ cab_LONG Zipinflate_codes(struct Ziphuft *tl, struct Ziphuft *td,
/*********************************************************** /***********************************************************
* Zipinflate_stored (internal) * Zipinflate_stored (internal)
*/ */
cab_LONG Zipinflate_stored(cab_decomp_state *decomp_state) static cab_LONG Zipinflate_stored(cab_decomp_state *decomp_state)
/* "decompress" an inflated type 0 (stored) block. */ /* "decompress" an inflated type 0 (stored) block. */
{ {
cab_ULONG n; /* number of bytes in block */ cab_ULONG n; /* number of bytes in block */
...@@ -877,7 +877,7 @@ cab_LONG Zipinflate_stored(cab_decomp_state *decomp_state) ...@@ -877,7 +877,7 @@ cab_LONG Zipinflate_stored(cab_decomp_state *decomp_state)
/****************************************************** /******************************************************
* Zipinflate_fixed (internal) * Zipinflate_fixed (internal)
*/ */
cab_LONG Zipinflate_fixed(cab_decomp_state *decomp_state) static cab_LONG Zipinflate_fixed(cab_decomp_state *decomp_state)
{ {
struct Ziphuft *fixed_tl; struct Ziphuft *fixed_tl;
struct Ziphuft *fixed_td; struct Ziphuft *fixed_td;
...@@ -923,7 +923,7 @@ cab_LONG Zipinflate_fixed(cab_decomp_state *decomp_state) ...@@ -923,7 +923,7 @@ cab_LONG Zipinflate_fixed(cab_decomp_state *decomp_state)
/************************************************************** /**************************************************************
* Zipinflate_dynamic (internal) * Zipinflate_dynamic (internal)
*/ */
cab_LONG Zipinflate_dynamic(cab_decomp_state *decomp_state) static cab_LONG Zipinflate_dynamic(cab_decomp_state *decomp_state)
/* decompress an inflated type 2 (dynamic Huffman codes) block. */ /* decompress an inflated type 2 (dynamic Huffman codes) block. */
{ {
cab_LONG i; /* temporary variables */ cab_LONG i; /* temporary variables */
...@@ -1058,7 +1058,7 @@ cab_LONG Zipinflate_dynamic(cab_decomp_state *decomp_state) ...@@ -1058,7 +1058,7 @@ cab_LONG Zipinflate_dynamic(cab_decomp_state *decomp_state)
/***************************************************** /*****************************************************
* Zipinflate_block (internal) * Zipinflate_block (internal)
*/ */
cab_LONG Zipinflate_block(cab_LONG *e, cab_decomp_state *decomp_state) /* e == last block flag */ static cab_LONG Zipinflate_block(cab_LONG *e, cab_decomp_state *decomp_state) /* e == last block flag */
{ /* decompress an inflated block */ { /* decompress an inflated block */
cab_ULONG t; /* block type */ cab_ULONG t; /* block type */
register cab_ULONG b; /* bit buffer */ register cab_ULONG b; /* bit buffer */
...@@ -1096,7 +1096,7 @@ cab_LONG Zipinflate_block(cab_LONG *e, cab_decomp_state *decomp_state) /* e == l ...@@ -1096,7 +1096,7 @@ cab_LONG Zipinflate_block(cab_LONG *e, cab_decomp_state *decomp_state) /* e == l
/**************************************************** /****************************************************
* ZIPdecompress (internal) * ZIPdecompress (internal)
*/ */
int ZIPdecompress(int inlen, int outlen, cab_decomp_state *decomp_state) static int ZIPdecompress(int inlen, int outlen, cab_decomp_state *decomp_state)
{ {
cab_LONG e; /* last block flag */ cab_LONG e; /* last block flag */
...@@ -1132,7 +1132,7 @@ int ZIPdecompress(int inlen, int outlen, cab_decomp_state *decomp_state) ...@@ -1132,7 +1132,7 @@ int ZIPdecompress(int inlen, int outlen, cab_decomp_state *decomp_state)
* *
* Initialise a model which decodes symbols from [s] to [s]+[n]-1 * Initialise a model which decodes symbols from [s] to [s]+[n]-1
*/ */
void QTMinitmodel(struct QTMmodel *m, struct QTMmodelsym *sym, int n, int s) { static void QTMinitmodel(struct QTMmodel *m, struct QTMmodelsym *sym, int n, int s) {
int i; int i;
m->shiftsleft = 4; m->shiftsleft = 4;
m->entries = n; m->entries = n;
...@@ -1149,7 +1149,7 @@ void QTMinitmodel(struct QTMmodel *m, struct QTMmodelsym *sym, int n, int s) { ...@@ -1149,7 +1149,7 @@ void QTMinitmodel(struct QTMmodel *m, struct QTMmodelsym *sym, int n, int s) {
/****************************************************************** /******************************************************************
* QTMinit (internal) * QTMinit (internal)
*/ */
int QTMinit(int window, int level, cab_decomp_state *decomp_state) { static int QTMinit(int window, int level, cab_decomp_state *decomp_state) {
unsigned int wndsize = 1 << window; unsigned int wndsize = 1 << window;
int msz = window * 2, i; int msz = window * 2, i;
cab_ULONG j; cab_ULONG j;
...@@ -1256,7 +1256,7 @@ void QTMupdatemodel(struct QTMmodel *model, int sym) { ...@@ -1256,7 +1256,7 @@ void QTMupdatemodel(struct QTMmodel *model, int sym) {
/******************************************************************* /*******************************************************************
* QTMdecompress (internal) * QTMdecompress (internal)
*/ */
int QTMdecompress(int inlen, int outlen, cab_decomp_state *decomp_state) static int QTMdecompress(int inlen, int outlen, cab_decomp_state *decomp_state)
{ {
cab_UBYTE *inpos = CAB(inbuf); cab_UBYTE *inpos = CAB(inbuf);
cab_UBYTE *window = QTM(window); cab_UBYTE *window = QTM(window);
...@@ -1438,7 +1438,7 @@ int QTMdecompress(int inlen, int outlen, cab_decomp_state *decomp_state) ...@@ -1438,7 +1438,7 @@ int QTMdecompress(int inlen, int outlen, cab_decomp_state *decomp_state)
/************************************************************ /************************************************************
* LZXinit (internal) * LZXinit (internal)
*/ */
int LZXinit(int window, cab_decomp_state *decomp_state) { static int LZXinit(int window, cab_decomp_state *decomp_state) {
cab_ULONG wndsize = 1 << window; cab_ULONG wndsize = 1 << window;
int i, j, posn_slots; int i, j, posn_slots;
...@@ -1579,7 +1579,7 @@ int make_decode_table(cab_ULONG nsyms, cab_ULONG nbits, cab_UBYTE *length, cab_U ...@@ -1579,7 +1579,7 @@ int make_decode_table(cab_ULONG nsyms, cab_ULONG nbits, cab_UBYTE *length, cab_U
/************************************************************ /************************************************************
* lzx_read_lens (internal) * lzx_read_lens (internal)
*/ */
int lzx_read_lens(cab_UBYTE *lens, cab_ULONG first, cab_ULONG last, struct lzx_bits *lb, static int lzx_read_lens(cab_UBYTE *lens, cab_ULONG first, cab_ULONG last, struct lzx_bits *lb,
cab_decomp_state *decomp_state) { cab_decomp_state *decomp_state) {
cab_ULONG i,j, x,y; cab_ULONG i,j, x,y;
int z; int z;
...@@ -1626,7 +1626,7 @@ int lzx_read_lens(cab_UBYTE *lens, cab_ULONG first, cab_ULONG last, struct lzx_b ...@@ -1626,7 +1626,7 @@ int lzx_read_lens(cab_UBYTE *lens, cab_ULONG first, cab_ULONG last, struct lzx_b
/******************************************************* /*******************************************************
* LZXdecompress (internal) * LZXdecompress (internal)
*/ */
int LZXdecompress(int inlen, int outlen, cab_decomp_state *decomp_state) { static int LZXdecompress(int inlen, int outlen, cab_decomp_state *decomp_state) {
cab_UBYTE *inpos = CAB(inbuf); cab_UBYTE *inpos = CAB(inbuf);
cab_UBYTE *endinp = inpos + inlen; cab_UBYTE *endinp = inpos + inlen;
cab_UBYTE *window = LZX(window); cab_UBYTE *window = LZX(window);
...@@ -1949,7 +1949,7 @@ int LZXdecompress(int inlen, int outlen, cab_decomp_state *decomp_state) { ...@@ -1949,7 +1949,7 @@ int LZXdecompress(int inlen, int outlen, cab_decomp_state *decomp_state) {
/********************************************************* /*********************************************************
* find_cabs_in_file (internal) * find_cabs_in_file (internal)
*/ */
struct cabinet *find_cabs_in_file(LPCSTR name, cab_UBYTE search_buf[]) static struct cabinet *find_cabs_in_file(LPCSTR name, cab_UBYTE search_buf[])
{ {
struct cabinet *cab, *cab2, *firstcab = NULL, *linkcab = NULL; struct cabinet *cab, *cab2, *firstcab = NULL, *linkcab = NULL;
cab_UBYTE *pstart = &search_buf[0], *pend, *p; cab_UBYTE *pstart = &search_buf[0], *pend, *p;
...@@ -2067,7 +2067,7 @@ struct cabinet *find_cabs_in_file(LPCSTR name, cab_UBYTE search_buf[]) ...@@ -2067,7 +2067,7 @@ struct cabinet *find_cabs_in_file(LPCSTR name, cab_UBYTE search_buf[])
* tries to find *cabname, from the directory path of origcab, correcting the * tries to find *cabname, from the directory path of origcab, correcting the
* case of *cabname if necessary, If found, writes back to *cabname. * case of *cabname if necessary, If found, writes back to *cabname.
*/ */
void find_cabinet_file(char **cabname, LPCSTR origcab) { static void find_cabinet_file(char **cabname, LPCSTR origcab) {
char *tail, *cab, *name, *nextpart, nametmp[MAX_PATH]; char *tail, *cab, *name, *nextpart, nametmp[MAX_PATH];
int found = 0; int found = 0;
...@@ -2156,7 +2156,7 @@ void find_cabinet_file(char **cabname, LPCSTR origcab) { ...@@ -2156,7 +2156,7 @@ void find_cabinet_file(char **cabname, LPCSTR origcab) {
* in CAB.c) for an implementation of this that correctly frees the discarded * in CAB.c) for an implementation of this that correctly frees the discarded
* file entries. * file entries.
*/ */
struct cab_file *process_files(struct cabinet *basecab) { static struct cab_file *process_files(struct cabinet *basecab) {
struct cabinet *cab; struct cabinet *cab;
struct cab_file *outfi = NULL, *linkfi = NULL, *nextfi, *fi, *cfi; struct cab_file *outfi = NULL, *linkfi = NULL, *nextfi, *fi, *cfi;
struct cab_folder *fol, *firstfol, *lastfol = NULL, *predfol; struct cab_folder *fol, *firstfol, *lastfol = NULL, *predfol;
...@@ -2259,7 +2259,7 @@ struct cab_file *process_files(struct cabinet *basecab) { ...@@ -2259,7 +2259,7 @@ struct cab_file *process_files(struct cabinet *basecab) {
* *
* FIXME: use a winapi to do this * FIXME: use a winapi to do this
*/ */
int convertUTF(cab_UBYTE *in) { static int convertUTF(cab_UBYTE *in) {
cab_UBYTE c, *out = in, *end = in + strlen((char *) in) + 1; cab_UBYTE c, *out = in, *end = in + strlen((char *) in) + 1;
cab_ULONG x; cab_ULONG x;
...@@ -2291,7 +2291,7 @@ int convertUTF(cab_UBYTE *in) { ...@@ -2291,7 +2291,7 @@ int convertUTF(cab_UBYTE *in) {
/**************************************************** /****************************************************
* NONEdecompress (internal) * NONEdecompress (internal)
*/ */
int NONEdecompress(int inlen, int outlen, cab_decomp_state *decomp_state) static int NONEdecompress(int inlen, int outlen, cab_decomp_state *decomp_state)
{ {
if (inlen != outlen) return DECR_ILLEGALDATA; if (inlen != outlen) return DECR_ILLEGALDATA;
memcpy(CAB(outbuf), CAB(inbuf), (size_t) inlen); memcpy(CAB(outbuf), CAB(inbuf), (size_t) inlen);
...@@ -2322,7 +2322,7 @@ cab_ULONG checksum(cab_UBYTE *data, cab_UWORD bytes, cab_ULONG csum) { ...@@ -2322,7 +2322,7 @@ cab_ULONG checksum(cab_UBYTE *data, cab_UWORD bytes, cab_ULONG csum) {
/********************************************************** /**********************************************************
* decompress (internal) * decompress (internal)
*/ */
int decompress(struct cab_file *fi, int savemode, int fix, cab_decomp_state *decomp_state) static int decompress(struct cab_file *fi, int savemode, int fix, cab_decomp_state *decomp_state)
{ {
cab_ULONG bytes = savemode ? fi->length : fi->offset - CAB(offset); cab_ULONG bytes = savemode ? fi->length : fi->offset - CAB(offset);
struct cabinet *cab = CAB(current)->cab[CAB(split)]; struct cabinet *cab = CAB(current)->cab[CAB(split)];
...@@ -2412,7 +2412,7 @@ int decompress(struct cab_file *fi, int savemode, int fix, cab_decomp_state *dec ...@@ -2412,7 +2412,7 @@ int decompress(struct cab_file *fi, int savemode, int fix, cab_decomp_state *dec
* *
* workhorse to extract a particular file from a cab * workhorse to extract a particular file from a cab
*/ */
void extract_file(struct cab_file *fi, int lower, int fix, LPCSTR dir, cab_decomp_state *decomp_state) static void extract_file(struct cab_file *fi, int lower, int fix, LPCSTR dir, cab_decomp_state *decomp_state)
{ {
struct cab_folder *fol = fi->folder, *oldfol = CAB(current); struct cab_folder *fol = fi->folder, *oldfol = CAB(current);
cab_LONG err = DECR_OK; cab_LONG err = DECR_OK;
...@@ -2523,7 +2523,7 @@ exit_handler: ...@@ -2523,7 +2523,7 @@ exit_handler:
/********************************************************* /*********************************************************
* print_fileinfo (internal) * print_fileinfo (internal)
*/ */
void print_fileinfo(struct cab_file *fi) { static void print_fileinfo(struct cab_file *fi) {
char *fname = NULL; char *fname = NULL;
if (fi->attribs & cffile_A_NAME_IS_UTF) { if (fi->attribs & cffile_A_NAME_IS_UTF) {
......
...@@ -413,7 +413,7 @@ void ME_InsertTextFromCursor(ME_TextEditor *editor, int nCursor, ...@@ -413,7 +413,7 @@ void ME_InsertTextFromCursor(ME_TextEditor *editor, int nCursor,
} }
} }
BOOL ME_ArrowLeft(ME_TextEditor *editor, ME_Cursor *p) static BOOL ME_ArrowLeft(ME_TextEditor *editor, ME_Cursor *p)
{ {
if (p->nOffset) { if (p->nOffset) {
p->nOffset = ME_StrRelPos2(p->pRun->member.run.strText, p->nOffset, -1); p->nOffset = ME_StrRelPos2(p->pRun->member.run.strText, p->nOffset, -1);
...@@ -453,7 +453,7 @@ BOOL ME_ArrowLeft(ME_TextEditor *editor, ME_Cursor *p) ...@@ -453,7 +453,7 @@ BOOL ME_ArrowLeft(ME_TextEditor *editor, ME_Cursor *p)
return FALSE; return FALSE;
} }
BOOL ME_ArrowRight(ME_TextEditor *editor, ME_Cursor *p) static BOOL ME_ArrowRight(ME_TextEditor *editor, ME_Cursor *p)
{ {
int new_ofs = ME_StrRelPos2(p->pRun->member.run.strText, p->nOffset, 1); int new_ofs = ME_StrRelPos2(p->pRun->member.run.strText, p->nOffset, 1);
if (new_ofs<p->pRun->member.run.strText->nLen) { if (new_ofs<p->pRun->member.run.strText->nLen) {
...@@ -698,7 +698,7 @@ static int ME_GetXForArrow(ME_TextEditor *editor, ME_Cursor *pCursor) ...@@ -698,7 +698,7 @@ static int ME_GetXForArrow(ME_TextEditor *editor, ME_Cursor *pCursor)
return x; return x;
} }
void ME_ArrowUp(ME_TextEditor *editor, ME_Cursor *pCursor) static void ME_ArrowUp(ME_TextEditor *editor, ME_Cursor *pCursor)
{ {
ME_DisplayItem *pRun = pCursor->pRun; ME_DisplayItem *pRun = pCursor->pRun;
ME_DisplayItem *pItem, *pItem2; ME_DisplayItem *pItem, *pItem2;
...@@ -725,7 +725,7 @@ void ME_ArrowUp(ME_TextEditor *editor, ME_Cursor *pCursor) ...@@ -725,7 +725,7 @@ void ME_ArrowUp(ME_TextEditor *editor, ME_Cursor *pCursor)
pCursor->pRun = ME_FindRunInRow(editor, pItem2, x, &pCursor->nOffset, &editor->bCaretAtEnd); pCursor->pRun = ME_FindRunInRow(editor, pItem2, x, &pCursor->nOffset, &editor->bCaretAtEnd);
} }
void ME_ArrowDown(ME_TextEditor *editor, ME_Cursor *pCursor) static void ME_ArrowDown(ME_TextEditor *editor, ME_Cursor *pCursor)
{ {
ME_DisplayItem *pRun = pCursor->pRun; ME_DisplayItem *pRun = pCursor->pRun;
ME_DisplayItem *pItem; ME_DisplayItem *pItem;
...@@ -749,7 +749,7 @@ void ME_ArrowDown(ME_TextEditor *editor, ME_Cursor *pCursor) ...@@ -749,7 +749,7 @@ void ME_ArrowDown(ME_TextEditor *editor, ME_Cursor *pCursor)
assert(pCursor->pRun->type == diRun); assert(pCursor->pRun->type == diRun);
} }
void ME_ArrowPageUp(ME_TextEditor *editor, ME_Cursor *pCursor) static void ME_ArrowPageUp(ME_TextEditor *editor, ME_Cursor *pCursor)
{ {
ME_DisplayItem *pRun = pCursor->pRun; ME_DisplayItem *pRun = pCursor->pRun;
ME_DisplayItem *pLast, *p; ME_DisplayItem *pLast, *p;
...@@ -804,7 +804,7 @@ void ME_ArrowPageUp(ME_TextEditor *editor, ME_Cursor *pCursor) ...@@ -804,7 +804,7 @@ void ME_ArrowPageUp(ME_TextEditor *editor, ME_Cursor *pCursor)
In such a situation, clicking the scrollbar restores its position back to the In such a situation, clicking the scrollbar restores its position back to the
normal range (ie. sets it to (doclength-screenheight)). */ normal range (ie. sets it to (doclength-screenheight)). */
void ME_ArrowPageDown(ME_TextEditor *editor, ME_Cursor *pCursor) static void ME_ArrowPageDown(ME_TextEditor *editor, ME_Cursor *pCursor)
{ {
ME_DisplayItem *pRun = pCursor->pRun; ME_DisplayItem *pRun = pCursor->pRun;
ME_DisplayItem *pLast, *p; ME_DisplayItem *pLast, *p;
...@@ -852,7 +852,7 @@ void ME_ArrowPageDown(ME_TextEditor *editor, ME_Cursor *pCursor) ...@@ -852,7 +852,7 @@ void ME_ArrowPageDown(ME_TextEditor *editor, ME_Cursor *pCursor)
assert(pCursor->pRun->type == diRun); assert(pCursor->pRun->type == diRun);
} }
void ME_ArrowHome(ME_TextEditor *editor, ME_Cursor *pCursor) static void ME_ArrowHome(ME_TextEditor *editor, ME_Cursor *pCursor)
{ {
ME_DisplayItem *pRow = ME_FindItemBack(pCursor->pRun, diStartRow); ME_DisplayItem *pRow = ME_FindItemBack(pCursor->pRun, diStartRow);
if (pRow) { if (pRow) {
...@@ -871,7 +871,7 @@ void ME_ArrowHome(ME_TextEditor *editor, ME_Cursor *pCursor) ...@@ -871,7 +871,7 @@ void ME_ArrowHome(ME_TextEditor *editor, ME_Cursor *pCursor)
editor->bCaretAtEnd = FALSE; editor->bCaretAtEnd = FALSE;
} }
void ME_ArrowCtrlHome(ME_TextEditor *editor, ME_Cursor *pCursor) static void ME_ArrowCtrlHome(ME_TextEditor *editor, ME_Cursor *pCursor)
{ {
ME_DisplayItem *pRow = ME_FindItemBack(pCursor->pRun, diTextStart); ME_DisplayItem *pRow = ME_FindItemBack(pCursor->pRun, diTextStart);
if (pRow) { if (pRow) {
...@@ -883,7 +883,7 @@ void ME_ArrowCtrlHome(ME_TextEditor *editor, ME_Cursor *pCursor) ...@@ -883,7 +883,7 @@ void ME_ArrowCtrlHome(ME_TextEditor *editor, ME_Cursor *pCursor)
} }
} }
void ME_ArrowEnd(ME_TextEditor *editor, ME_Cursor *pCursor) static void ME_ArrowEnd(ME_TextEditor *editor, ME_Cursor *pCursor)
{ {
ME_DisplayItem *pRow; ME_DisplayItem *pRow;
...@@ -907,7 +907,7 @@ void ME_ArrowEnd(ME_TextEditor *editor, ME_Cursor *pCursor) ...@@ -907,7 +907,7 @@ void ME_ArrowEnd(ME_TextEditor *editor, ME_Cursor *pCursor)
editor->bCaretAtEnd = FALSE; editor->bCaretAtEnd = FALSE;
} }
void ME_ArrowCtrlEnd(ME_TextEditor *editor, ME_Cursor *pCursor) static void ME_ArrowCtrlEnd(ME_TextEditor *editor, ME_Cursor *pCursor)
{ {
ME_DisplayItem *p = ME_FindItemFwd(pCursor->pRun, diTextEnd); ME_DisplayItem *p = ME_FindItemFwd(pCursor->pRun, diTextEnd);
assert(p); assert(p);
...@@ -924,7 +924,7 @@ BOOL ME_IsSelection(ME_TextEditor *editor) ...@@ -924,7 +924,7 @@ BOOL ME_IsSelection(ME_TextEditor *editor)
return memcmp(&editor->pCursors[0], &editor->pCursors[1], sizeof(ME_Cursor))!=0; return memcmp(&editor->pCursors[0], &editor->pCursors[1], sizeof(ME_Cursor))!=0;
} }
int ME_GetSelCursor(ME_TextEditor *editor, int dir) static int ME_GetSelCursor(ME_TextEditor *editor, int dir)
{ {
int cdir = ME_GetCursorOfs(editor, 0) - ME_GetCursorOfs(editor, 1); int cdir = ME_GetCursorOfs(editor, 0) - ME_GetCursorOfs(editor, 1);
...@@ -934,7 +934,7 @@ int ME_GetSelCursor(ME_TextEditor *editor, int dir) ...@@ -934,7 +934,7 @@ int ME_GetSelCursor(ME_TextEditor *editor, int dir)
return 1; return 1;
} }
BOOL ME_CancelSelection(ME_TextEditor *editor, int dir) static BOOL ME_CancelSelection(ME_TextEditor *editor, int dir)
{ {
int cdir; int cdir;
...@@ -979,7 +979,7 @@ BOOL ME_UpdateSelection(ME_TextEditor *editor, ME_Cursor *pTempCursor) ...@@ -979,7 +979,7 @@ BOOL ME_UpdateSelection(ME_TextEditor *editor, ME_Cursor *pTempCursor)
return TRUE; return TRUE;
} }
void ME_RepaintSelection(ME_TextEditor *editor, ME_Cursor *pTempCursor) static void ME_RepaintSelection(ME_TextEditor *editor, ME_Cursor *pTempCursor)
{ {
if (ME_UpdateSelection(editor, pTempCursor)) { if (ME_UpdateSelection(editor, pTempCursor)) {
ME_EnsureVisible(editor, editor->pCursors[0].pRun); ME_EnsureVisible(editor, editor->pCursors[0].pRun);
......
...@@ -134,7 +134,7 @@ HRESULT WINAPI DrawThemeBackground(HTHEME hTheme, HDC hdc, int iPartId, ...@@ -134,7 +134,7 @@ HRESULT WINAPI DrawThemeBackground(HTHEME hTheme, HDC hdc, int iPartId,
* *
* Select the image to use * Select the image to use
*/ */
PTHEME_PROPERTY UXTHEME_SelectImage(HTHEME hTheme, HDC hdc, int iPartId, int iStateId, const RECT *pRect, BOOL glyph) static PTHEME_PROPERTY UXTHEME_SelectImage(HTHEME hTheme, HDC hdc, int iPartId, int iStateId, const RECT *pRect, BOOL glyph)
{ {
PTHEME_PROPERTY tp; PTHEME_PROPERTY tp;
int imageselecttype = IST_NONE; int imageselecttype = IST_NONE;
...@@ -186,7 +186,7 @@ PTHEME_PROPERTY UXTHEME_SelectImage(HTHEME hTheme, HDC hdc, int iPartId, int iSt ...@@ -186,7 +186,7 @@ PTHEME_PROPERTY UXTHEME_SelectImage(HTHEME hTheme, HDC hdc, int iPartId, int iSt
* *
* Load image for part/state * Load image for part/state
*/ */
HRESULT UXTHEME_LoadImage(HTHEME hTheme, HDC hdc, int iPartId, int iStateId, const RECT *pRect, BOOL glyph, static HRESULT UXTHEME_LoadImage(HTHEME hTheme, HDC hdc, int iPartId, int iStateId, const RECT *pRect, BOOL glyph,
HBITMAP *hBmp, RECT *bmpRect) HBITMAP *hBmp, RECT *bmpRect)
{ {
int imagelayout = IL_VERTICAL; int imagelayout = IL_VERTICAL;
...@@ -267,7 +267,7 @@ static inline BOOL UXTHEME_Blt(HDC hdcDest, int nXOriginDest, int nYOriginDest, ...@@ -267,7 +267,7 @@ static inline BOOL UXTHEME_Blt(HDC hdcDest, int nXOriginDest, int nYOriginDest,
* *
* Draw an imagefile glyph * Draw an imagefile glyph
*/ */
HRESULT UXTHEME_DrawImageGlyph(HTHEME hTheme, HDC hdc, int iPartId, static HRESULT UXTHEME_DrawImageGlyph(HTHEME hTheme, HDC hdc, int iPartId,
int iStateId, RECT *pRect, int iStateId, RECT *pRect,
const DTBGOPTS *pOptions) const DTBGOPTS *pOptions)
{ {
...@@ -333,7 +333,7 @@ HRESULT UXTHEME_DrawImageGlyph(HTHEME hTheme, HDC hdc, int iPartId, ...@@ -333,7 +333,7 @@ HRESULT UXTHEME_DrawImageGlyph(HTHEME hTheme, HDC hdc, int iPartId,
* *
* Draw glyph on top of background, if appropriate * Draw glyph on top of background, if appropriate
*/ */
HRESULT UXTHEME_DrawGlyph(HTHEME hTheme, HDC hdc, int iPartId, static HRESULT UXTHEME_DrawGlyph(HTHEME hTheme, HDC hdc, int iPartId,
int iStateId, RECT *pRect, int iStateId, RECT *pRect,
const DTBGOPTS *pOptions) const DTBGOPTS *pOptions)
{ {
...@@ -356,7 +356,7 @@ HRESULT UXTHEME_DrawGlyph(HTHEME hTheme, HDC hdc, int iPartId, ...@@ -356,7 +356,7 @@ HRESULT UXTHEME_DrawGlyph(HTHEME hTheme, HDC hdc, int iPartId,
* *
* Draw an imagefile background * Draw an imagefile background
*/ */
HRESULT UXTHEME_DrawImageBackground(HTHEME hTheme, HDC hdc, int iPartId, static HRESULT UXTHEME_DrawImageBackground(HTHEME hTheme, HDC hdc, int iPartId,
int iStateId, RECT *pRect, int iStateId, RECT *pRect,
const DTBGOPTS *pOptions) const DTBGOPTS *pOptions)
{ {
...@@ -576,7 +576,7 @@ draw_error: ...@@ -576,7 +576,7 @@ draw_error:
* *
* Draw the bounding rectangle for a borderfill background * Draw the bounding rectangle for a borderfill background
*/ */
HRESULT UXTHEME_DrawBorderRectangle(HTHEME hTheme, HDC hdc, int iPartId, static HRESULT UXTHEME_DrawBorderRectangle(HTHEME hTheme, HDC hdc, int iPartId,
int iStateId, RECT *pRect, int iStateId, RECT *pRect,
const DTBGOPTS *pOptions) const DTBGOPTS *pOptions)
{ {
...@@ -621,7 +621,7 @@ HRESULT UXTHEME_DrawBorderRectangle(HTHEME hTheme, HDC hdc, int iPartId, ...@@ -621,7 +621,7 @@ HRESULT UXTHEME_DrawBorderRectangle(HTHEME hTheme, HDC hdc, int iPartId,
* *
* Fill a borderfill background rectangle * Fill a borderfill background rectangle
*/ */
HRESULT UXTHEME_DrawBackgroundFill(HTHEME hTheme, HDC hdc, int iPartId, static HRESULT UXTHEME_DrawBackgroundFill(HTHEME hTheme, HDC hdc, int iPartId,
int iStateId, RECT *pRect, int iStateId, RECT *pRect,
const DTBGOPTS *pOptions) const DTBGOPTS *pOptions)
{ {
...@@ -696,7 +696,7 @@ HRESULT UXTHEME_DrawBackgroundFill(HTHEME hTheme, HDC hdc, int iPartId, ...@@ -696,7 +696,7 @@ HRESULT UXTHEME_DrawBackgroundFill(HTHEME hTheme, HDC hdc, int iPartId,
* *
* Draw an imagefile background * Draw an imagefile background
*/ */
HRESULT UXTHEME_DrawBorderBackground(HTHEME hTheme, HDC hdc, int iPartId, static HRESULT UXTHEME_DrawBorderBackground(HTHEME hTheme, HDC hdc, int iPartId,
int iStateId, const RECT *pRect, int iStateId, const RECT *pRect,
const DTBGOPTS *pOptions) const DTBGOPTS *pOptions)
{ {
......
...@@ -149,7 +149,7 @@ static inline BOOL UXINI_isspace(WCHAR c) ...@@ -149,7 +149,7 @@ static inline BOOL UXINI_isspace(WCHAR c)
* RETURNS * RETURNS
* The section name, non NULL terminated * The section name, non NULL terminated
*/ */
LPCWSTR UXINI_GetNextLine(PUXINI_FILE uf, DWORD *dwLen) static LPCWSTR UXINI_GetNextLine(PUXINI_FILE uf, DWORD *dwLen)
{ {
LPCWSTR lpLineEnd; LPCWSTR lpLineEnd;
LPCWSTR lpLineStart; LPCWSTR lpLineStart;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment