diff options
author | Miodrag Milanovic <mmicko@gmail.com> | 2015-12-12 08:58:57 +0100 |
---|---|---|
committer | Miodrag Milanovic <mmicko@gmail.com> | 2015-12-12 08:58:57 +0100 |
commit | 379581fb3690d92f7e3815534a479823aee8ddcc (patch) | |
tree | 77b4a080ba46ba58bfd8382926580cb2aad5a69d /src/tools | |
parent | afe2bbe6481acf518e384509586ada235e106c54 (diff) |
macro removal INLINE -> static inline (nw)
Diffstat (limited to 'src/tools')
-rw-r--r-- | src/tools/imgtool/library.h | 8 | ||||
-rw-r--r-- | src/tools/imgtool/modules/concept.cpp | 4 | ||||
-rw-r--r-- | src/tools/imgtool/modules/mac.cpp | 16 | ||||
-rw-r--r-- | src/tools/imgtool/modules/ti99.cpp | 34 | ||||
-rw-r--r-- | src/tools/imgtool/modules/ti990hd.cpp | 8 | ||||
-rw-r--r-- | src/tools/regrep.cpp | 4 |
6 files changed, 37 insertions, 37 deletions
diff --git a/src/tools/imgtool/library.h b/src/tools/imgtool/library.h index 0ea52a68e44..f9b792bc740 100644 --- a/src/tools/imgtool/library.h +++ b/src/tools/imgtool/library.h @@ -297,7 +297,7 @@ union imgtoolinfo -INLINE INT64 imgtool_get_info_int(const imgtool_class *imgclass, UINT32 state) +static inline INT64 imgtool_get_info_int(const imgtool_class *imgclass, UINT32 state) { union imgtoolinfo info; info.i = 0; @@ -305,7 +305,7 @@ INLINE INT64 imgtool_get_info_int(const imgtool_class *imgclass, UINT32 state) return info.i; } -INLINE void *imgtool_get_info_ptr(const imgtool_class *imgclass, UINT32 state) +static inline void *imgtool_get_info_ptr(const imgtool_class *imgclass, UINT32 state) { union imgtoolinfo info; info.p = nullptr; @@ -313,7 +313,7 @@ INLINE void *imgtool_get_info_ptr(const imgtool_class *imgclass, UINT32 state) return info.p; } -INLINE void *imgtool_get_info_fct(const imgtool_class *imgclass, UINT32 state) +static inline void *imgtool_get_info_fct(const imgtool_class *imgclass, UINT32 state) { union imgtoolinfo info; info.f = nullptr; @@ -321,7 +321,7 @@ INLINE void *imgtool_get_info_fct(const imgtool_class *imgclass, UINT32 state) return info.f; } -INLINE char *imgtool_get_info_string(const imgtool_class *imgclass, UINT32 state) +static inline char *imgtool_get_info_string(const imgtool_class *imgclass, UINT32 state) { union imgtoolinfo info; info.s = nullptr; diff --git a/src/tools/imgtool/modules/concept.cpp b/src/tools/imgtool/modules/concept.cpp index a5c5a37b1ad..3da7304c955 100644 --- a/src/tools/imgtool/modules/concept.cpp +++ b/src/tools/imgtool/modules/concept.cpp @@ -30,7 +30,7 @@ struct UINT16xE Returns value of word in native format */ -INLINE UINT16 get_UINT16xE(int little_endian, UINT16xE word) +static inline UINT16 get_UINT16xE(int little_endian, UINT16xE word) { return little_endian ? (word.bytes[0] | (word.bytes[1] << 8)) : ((word.bytes[0] << 8) | word.bytes[1]); } @@ -46,7 +46,7 @@ INLINE UINT16 get_UINT16xE(int little_endian, UINT16xE word) word (O): pointer to word to write data (I): value to write in word, in native format */ -INLINE void set_UINT16xE(int little_endian, UINT16xE *word, UINT16 data) +static inline void set_UINT16xE(int little_endian, UINT16xE *word, UINT16 data) { if (little_endian) { diff --git a/src/tools/imgtool/modules/mac.cpp b/src/tools/imgtool/modules/mac.cpp index 53ae4be3ec0..938a8a19ec5 100644 --- a/src/tools/imgtool/modules/mac.cpp +++ b/src/tools/imgtool/modules/mac.cpp @@ -131,24 +131,24 @@ struct UINT32BE UINT8 bytes[4]; }; -INLINE UINT16 get_UINT16BE(UINT16BE word) +static inline UINT16 get_UINT16BE(UINT16BE word) { return (word.bytes[0] << 8) | word.bytes[1]; } -INLINE void set_UINT16BE(UINT16BE *word, UINT16 data) +static inline void set_UINT16BE(UINT16BE *word, UINT16 data) { word->bytes[0] = (data >> 8) & 0xff; word->bytes[1] = data & 0xff; } #if 0 -INLINE UINT32 get_UINT24BE(UINT24BE word) +static inline UINT32 get_UINT24BE(UINT24BE word) { return (word.bytes[0] << 16) | (word.bytes[1] << 8) | word.bytes[2]; } -INLINE void set_UINT24BE(UINT24BE *word, UINT32 data) +static inline void set_UINT24BE(UINT24BE *word, UINT32 data) { word->bytes[0] = (data >> 16) & 0xff; word->bytes[1] = (data >> 8) & 0xff; @@ -156,12 +156,12 @@ INLINE void set_UINT24BE(UINT24BE *word, UINT32 data) } #endif -INLINE UINT32 get_UINT32BE(UINT32BE word) +static inline UINT32 get_UINT32BE(UINT32BE word) { return (word.bytes[0] << 24) | (word.bytes[1] << 16) | (word.bytes[2] << 8) | word.bytes[3]; } -INLINE void set_UINT32BE(UINT32BE *word, UINT32 data) +static inline void set_UINT32BE(UINT32BE *word, UINT32 data) { word->bytes[0] = (data >> 24) & 0xff; word->bytes[1] = (data >> 16) & 0xff; @@ -583,7 +583,7 @@ static int mac_stricmp(const UINT8 *s1, const UINT8 *s2) Return a zero if s1 and s2 are equal, a negative value if s1 is less than s2, and a positive value if s1 is greater than s2. */ -INLINE void mac_strcpy(UINT8 *dest, const UINT8 *src) +static inline void mac_strcpy(UINT8 *dest, const UINT8 *src) { memcpy(dest, src, src[0]+1); } @@ -704,7 +704,7 @@ static imgtoolerr_t image_write_block(mac_l1_imgref *image, UINT32 block, const Return tag length */ -INLINE int image_get_tag_len(mac_l1_imgref *image) +static inline int image_get_tag_len(mac_l1_imgref *image) { return 0; } diff --git a/src/tools/imgtool/modules/ti99.cpp b/src/tools/imgtool/modules/ti99.cpp index 220cbebdb27..eb72b22c577 100644 --- a/src/tools/imgtool/modules/ti99.cpp +++ b/src/tools/imgtool/modules/ti99.cpp @@ -278,23 +278,23 @@ struct UINT16LE UINT8 bytes[2]; }; -INLINE UINT16 get_UINT16BE(UINT16BE word) +static inline UINT16 get_UINT16BE(UINT16BE word) { return (word.bytes[0] << 8) | word.bytes[1]; } -INLINE void set_UINT16BE(UINT16BE *word, UINT16 data) +static inline void set_UINT16BE(UINT16BE *word, UINT16 data) { word->bytes[0] = (data >> 8) & 0xff; word->bytes[1] = data & 0xff; } -INLINE UINT16 get_UINT16LE(UINT16LE word) +static inline UINT16 get_UINT16LE(UINT16LE word) { return word.bytes[0] | (word.bytes[1] << 8); } -INLINE void set_UINT16LE(UINT16LE *word, UINT16 data) +static inline void set_UINT16LE(UINT16LE *word, UINT16 data) { word->bytes[0] = data & 0xff; word->bytes[1] = (data >> 8) & 0xff; @@ -1081,7 +1081,7 @@ static void close_image_lvl1(ti99_lvl1_imgref *l1_img) Return offset in image */ -INLINE int sector_address_to_image_offset(const ti99_lvl1_imgref *l1_img, const ti99_sector_address *address) +static inline int sector_address_to_image_offset(const ti99_lvl1_imgref *l1_img, const ti99_sector_address *address) { int offset = 0; @@ -2200,7 +2200,7 @@ static int alloc_fdr_AU(struct ti99_lvl2_imgref *l2_img, unsigned *fdr_AU) return IMGTOOLERR_NOSPACE; } -INLINE int get_dsk_fdr_cluster_baseAU(struct ti99_lvl2_imgref *l2_img, dsk_fdr *fdr, int cluster_index) +static inline int get_dsk_fdr_cluster_baseAU(struct ti99_lvl2_imgref *l2_img, dsk_fdr *fdr, int cluster_index) { int reply; @@ -2213,7 +2213,7 @@ INLINE int get_dsk_fdr_cluster_baseAU(struct ti99_lvl2_imgref *l2_img, dsk_fdr * return reply; } -INLINE int get_dsk_fdr_cluster_baseaphysrec(struct ti99_lvl2_imgref *l2_img, dsk_fdr *fdr, int cluster_index) +static inline int get_dsk_fdr_cluster_baseaphysrec(struct ti99_lvl2_imgref *l2_img, dsk_fdr *fdr, int cluster_index) { int reply; @@ -2226,18 +2226,18 @@ INLINE int get_dsk_fdr_cluster_baseaphysrec(struct ti99_lvl2_imgref *l2_img, dsk return reply; } -INLINE int get_dsk_fdr_cluster_lastfphysrec(dsk_fdr *fdr, int cluster_index) +static inline int get_dsk_fdr_cluster_lastfphysrec(dsk_fdr *fdr, int cluster_index) { return (fdr->clusters[cluster_index][2] << 4) | (fdr->clusters[cluster_index][1] >> 4); } -INLINE void set_dsk_fdr_cluster_lastfphysrec(dsk_fdr *fdr, int cluster_index, int data) +static inline void set_dsk_fdr_cluster_lastfphysrec(dsk_fdr *fdr, int cluster_index, int data) { fdr->clusters[cluster_index][1] = (fdr->clusters[cluster_index][1] & 0x0f) | (data << 4); fdr->clusters[cluster_index][2] = data >> 4; } -INLINE void set_dsk_fdr_cluster(struct ti99_lvl2_imgref *l2_img, dsk_fdr *fdr, int cluster_index, int baseAU, int lastfphysrec) +static inline void set_dsk_fdr_cluster(struct ti99_lvl2_imgref *l2_img, dsk_fdr *fdr, int cluster_index, int baseAU, int lastfphysrec) { /* convert AU address to FDR value */ if (l2_img->AUformat.physrecsperAU <= 2) @@ -2249,29 +2249,29 @@ INLINE void set_dsk_fdr_cluster(struct ti99_lvl2_imgref *l2_img, dsk_fdr *fdr, i fdr->clusters[cluster_index][2] = lastfphysrec >> 4; } -INLINE unsigned get_win_fdr_fphysrecs(win_fdr *fdr) +static inline unsigned get_win_fdr_fphysrecs(win_fdr *fdr) { return (((unsigned) fdr->xinfo_MSB << 12) & 0xf0000) | get_UINT16BE(fdr->fphysrecs_LSW); } -INLINE void set_win_fdr_fphysrecs(win_fdr *fdr, unsigned data) +static inline void set_win_fdr_fphysrecs(win_fdr *fdr, unsigned data) { fdr->xinfo_MSB = (fdr->xinfo_MSB & 0x0f) | ((data >> 12) & 0xf0); set_UINT16BE(&fdr->fphysrecs_LSW, data & 0xffff); } -INLINE unsigned get_win_fdr_fixrecs(win_fdr *fdr) +static inline unsigned get_win_fdr_fixrecs(win_fdr *fdr) { return (((unsigned) fdr->xinfo_MSB << 16) & 0xf0000) | get_UINT16LE(fdr->fixrecs_LSW); } -INLINE void set_win_fdr_fixrecs(win_fdr *fdr, unsigned data) +static inline void set_win_fdr_fixrecs(win_fdr *fdr, unsigned data) { fdr->xinfo_MSB = (fdr->xinfo_MSB & 0xf0) | ((data >> 16) & 0x0f); set_UINT16LE(&fdr->fixrecs_LSW, data & 0xffff); } -INLINE unsigned get_win_fdr_prevsibFDR_aphysrec(struct ti99_lvl2_imgref *l2_img, win_fdr *fdr) +static inline unsigned get_win_fdr_prevsibFDR_aphysrec(struct ti99_lvl2_imgref *l2_img, win_fdr *fdr) { unsigned prevsibFDR_AU = get_UINT16BE(fdr->prevsibFDR_AU); @@ -2280,7 +2280,7 @@ INLINE unsigned get_win_fdr_prevsibFDR_aphysrec(struct ti99_lvl2_imgref *l2_img, : 0; } -INLINE unsigned get_win_fdr_nextsibFDR_aphysrec(struct ti99_lvl2_imgref *l2_img, win_fdr *fdr) +static inline unsigned get_win_fdr_nextsibFDR_aphysrec(struct ti99_lvl2_imgref *l2_img, win_fdr *fdr) { unsigned nextsibFDR_AU = get_UINT16BE(fdr->nextsibFDR_AU); @@ -2289,7 +2289,7 @@ INLINE unsigned get_win_fdr_nextsibFDR_aphysrec(struct ti99_lvl2_imgref *l2_img, : 0; } -INLINE unsigned get_win_fdr_cursibFDR_basefphysrec(win_fdr *fdr) +static inline unsigned get_win_fdr_cursibFDR_basefphysrec(win_fdr *fdr) { return get_UINT16BE(fdr->prevsibFDR_AU) ? get_win_fdr_fphysrecs(fdr) : 0; } diff --git a/src/tools/imgtool/modules/ti990hd.cpp b/src/tools/imgtool/modules/ti990hd.cpp index 2c2a6c3a13c..554addb97bd 100644 --- a/src/tools/imgtool/modules/ti990hd.cpp +++ b/src/tools/imgtool/modules/ti990hd.cpp @@ -47,23 +47,23 @@ struct UINT32BE UINT8 bytes[4]; }; -INLINE UINT16 get_UINT16BE(UINT16BE word) +static inline UINT16 get_UINT16BE(UINT16BE word) { return (word.bytes[0] << 8) | word.bytes[1]; } -INLINE void set_UINT16BE(UINT16BE *word, UINT16 data) +static inline void set_UINT16BE(UINT16BE *word, UINT16 data) { word->bytes[0] = (data >> 8) & 0xff; word->bytes[1] = data & 0xff; } -INLINE UINT32 get_UINT32BE(UINT32BE word) +static inline UINT32 get_UINT32BE(UINT32BE word) { return (word.bytes[0] << 24) | (word.bytes[1] << 16) | (word.bytes[2] << 8) | word.bytes[3]; } -INLINE void set_UINT32BE(UINT32BE *word, UINT32 data) +static inline void set_UINT32BE(UINT32BE *word, UINT32 data) { word->bytes[0] = (data >> 24) & 0xff; word->bytes[1] = (data >> 16) & 0xff; diff --git a/src/tools/regrep.cpp b/src/tools/regrep.cpp index 6f5adbf8f22..121ebac6865 100644 --- a/src/tools/regrep.cpp +++ b/src/tools/regrep.cpp @@ -169,7 +169,7 @@ static void append_driver_list_table(const char *header, std::string &dirname, c from a string -------------------------------------------------*/ -INLINE char *trim_string(char *string) +static inline char *trim_string(char *string) { int length; @@ -191,7 +191,7 @@ INLINE char *trim_string(char *string) index for a given entry -------------------------------------------------*/ -INLINE int get_unique_index(const summary_file *curfile, int index) +static inline int get_unique_index(const summary_file *curfile, int index) { int listnum, curindex = 0; |