mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-09-22 11:21:00 +08:00
2009-05-03 Joel Sherrill <joel.sherrill@oarcorp.com>
* ndstool/include/banner.h, ndstool/include/header.h, ndstool/include/ndstree.h, ndstool/source/banner.cpp, ndstool/source/header.cpp, ndstool/source/ndscreate.cpp, ndstool/source/ndstool.cpp, ndstool/source/passme.cpp: Remove warnings for deprecated character conversions.
This commit is contained in:
@@ -1,3 +1,11 @@
|
||||
2009-05-03 Joel Sherrill <joel.sherrill@oarcorp.com>
|
||||
|
||||
* ndstool/include/banner.h, ndstool/include/header.h,
|
||||
ndstool/include/ndstree.h, ndstool/source/banner.cpp,
|
||||
ndstool/source/header.cpp, ndstool/source/ndscreate.cpp,
|
||||
ndstool/source/ndstool.cpp, ndstool/source/passme.cpp: Remove
|
||||
warnings for deprecated character conversions.
|
||||
|
||||
2008-08-19 Joel Sherrill <joel.sherrill@OARcorp.com>
|
||||
|
||||
* bin2s.c: Fix various warnings by fixing prototypes. Remove unused
|
||||
|
||||
@@ -12,7 +12,7 @@ struct Banner
|
||||
|
||||
#pragma pack()
|
||||
|
||||
extern char *bannerLanguages[];
|
||||
extern const char *bannerLanguages[];
|
||||
|
||||
int InsertTitleString(char *String, FILE *file);
|
||||
unsigned short CalcBannerCRC(Banner &banner);
|
||||
|
||||
@@ -72,14 +72,14 @@ struct Header
|
||||
|
||||
struct Country
|
||||
{
|
||||
char countrycode;
|
||||
char *name;
|
||||
const char countrycode;
|
||||
const char *name;
|
||||
};
|
||||
|
||||
struct Maker
|
||||
{
|
||||
char *makercode;
|
||||
char *name;
|
||||
const char *makercode;
|
||||
const char *name;
|
||||
};
|
||||
|
||||
extern Country countries[];
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
inline int cmp(char *a, bool a_isdir, char *b, bool b_isdir)
|
||||
inline int cmp(const char *a, bool a_isdir, const char *b, bool b_isdir)
|
||||
{
|
||||
// oh... directory sort doesn't matter since we write out dir- and filenames seperately
|
||||
//if (a_isdir && !b_isdir) return -1;
|
||||
@@ -9,7 +9,7 @@ inline int cmp(char *a, bool a_isdir, char *b, bool b_isdir)
|
||||
struct TreeNode
|
||||
{
|
||||
unsigned int dir_id; // directory ID in case of directory entry
|
||||
char *name; // file or directory name
|
||||
const char *name; // file or directory name
|
||||
TreeNode *directory; // nonzero indicates directory. first directory node is a dummy
|
||||
TreeNode *prev, *next; // linked list
|
||||
|
||||
@@ -22,7 +22,7 @@ struct TreeNode
|
||||
}
|
||||
|
||||
// new entry in same directory
|
||||
TreeNode *New(char *name, bool isdir)
|
||||
TreeNode *New(const char *name, bool isdir)
|
||||
{
|
||||
TreeNode *newNode = new TreeNode();
|
||||
newNode->name = strdup(name);
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#include "banner.h"
|
||||
#include "crc.h"
|
||||
|
||||
char *bannerLanguages[] = { "Japanese", "English", "French", "German", "Italian", "Spanish" };
|
||||
const char *bannerLanguages[] = { "Japanese", "English", "French", "German", "Italian", "Spanish" };
|
||||
|
||||
#define RGB16(r,g,b) ((r) | (g<<5) | (b<<10))
|
||||
|
||||
|
||||
@@ -171,7 +171,7 @@ void ShowHeaderInfo(Header &header, int romType, unsigned int length = 0x200)
|
||||
printf("0x64\t%-25s\t0x%08X\n", "ROM control info 2", (int)header.rom_control_info2);
|
||||
printf("0x68\t%-25s\t0x%X\n", "Icon/title offset", (int)header.banner_offset);
|
||||
unsigned short secure_area_crc = CalcSecureAreaCRC((romType == ROMTYPE_NDSDUMPED));
|
||||
char *s1, *s2 = "";
|
||||
const char *s1, *s2 = "";
|
||||
if (romType == ROMTYPE_HOMEBREW) s1 = "-";
|
||||
else if (secure_area_crc == header.secure_area_crc) s1 = "OK";
|
||||
else
|
||||
|
||||
@@ -148,7 +148,7 @@ int CopyFromElf(char *elfFilename, unsigned int *entry, unsigned int *ram_addres
|
||||
/*
|
||||
* AddFile
|
||||
*/
|
||||
void AddFile(char *rootdir, char *prefix, char *entry_name, unsigned int file_id)
|
||||
void AddFile(char *rootdir, const char *prefix, const char *entry_name, unsigned int file_id)
|
||||
{
|
||||
// make filename
|
||||
char strbuf[MAXPATHLEN];
|
||||
@@ -202,7 +202,7 @@ void AddFile(char *rootdir, char *prefix, char *entry_name, unsigned int file_id
|
||||
* AddDirectory
|
||||
* Walks the tree and adds files to NDS
|
||||
*/
|
||||
void AddDirectory(TreeNode *node, char *prefix, unsigned int this_dir_id, unsigned int _parent_id)
|
||||
void AddDirectory(TreeNode *node, const char *prefix, unsigned int this_dir_id, unsigned int _parent_id)
|
||||
{
|
||||
// skip dummy node
|
||||
node = node->next;
|
||||
|
||||
@@ -64,8 +64,8 @@ void Title()
|
||||
*/
|
||||
struct HelpLine
|
||||
{
|
||||
char *option_char;
|
||||
char *text;
|
||||
const char *option_char;
|
||||
const char *text;
|
||||
|
||||
void Print()
|
||||
{
|
||||
@@ -133,7 +133,7 @@ void Help(char *specificoption = 0)
|
||||
bool found = false;
|
||||
for (unsigned int i=0; i<(sizeof(helplines) / sizeof(helplines[0])); i++)
|
||||
{
|
||||
for (char *o = helplines[i].option_char; *o; o++)
|
||||
for (const char *o = helplines[i].option_char; *o; o++)
|
||||
{
|
||||
if (*o == *specificoption) { helplines[i].Print(); found = true; }
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ unsigned char *pc_ram;
|
||||
/*
|
||||
* Find
|
||||
*/
|
||||
template <typename T> unsigned long Find(FILE *f, char *fmt, unsigned long begin, unsigned long end, T data, T mask, int thumb, int armnr)
|
||||
template <typename T> unsigned long Find(FILE *f, const char *fmt, unsigned long begin, unsigned long end, T data, T mask, int thumb, int armnr)
|
||||
{
|
||||
for (unsigned long i=begin; i<end; i+=sizeof(T))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user