File imgen-string_const_to_charp.patch of Package imgen (Revision 316ddbd24a22afcfa4d8ee3b371ad9e8)
Currently displaying revision 316ddbd24a22afcfa4d8ee3b371ad9e8 , Show latest
69
1
Index: Expr.h
2
===================================================================
3
--- Expr.h.orig 2012-06-29 16:24:40.560239703 +0200
4
+++ Expr.h 2012-07-02 11:43:59.435836695 +0200
5
6
typedef struct {
7
int type; /* type of operation - internal number */
8
int pri; /* priority of this operation */
9
- char *st; /* string which cause this operation */
10
+ const char *st; /* string which cause this operation */
11
} table;
12
13
private:
14
Index: Image.cpp
15
===================================================================
16
--- Image.cpp.orig 2012-06-29 16:24:40.561239679 +0200
17
+++ Image.cpp 2012-06-29 16:28:55.092194054 +0200
18
19
const int Image::NVRam::_fsizes[] = { 512*1024, 1048576, 2*1048576, 4*1048576 };
20
21
static struct {
22
- char *fname;
23
+ const char *fname;
24
Image::FORMATS fvalue;
25
} formats[] = {
26
{ "image", Image::OUT_IMAGE },
27
28
29
bool Image::get_fw_ver (FwVer v) {
30
31
- char* ver_params[] = {
32
+ const char *ver_params[] = {
33
"FWInfo.FW_VER_MAJOR",
34
"FWInfo.FW_VER_MINOR",
35
"FWInfo.FW_VER_SUBMINOR"
36
Index: TImage.cpp
37
===================================================================
38
--- TImage.cpp.orig 2012-06-29 16:24:40.594238896 +0200
39
+++ TImage.cpp 2012-07-02 11:41:51.583949021 +0200
40
41
// ??? Do I need to fill this data, or burner will replace it anyway ???
42
43
// Get GUIDs and related info
44
- char *guid_names[NGUIDS] = GUID_PARAM_NAMES;
45
- char *guid_names_old[NGUIDS] = GUID_PARAM_NAMES_OLD;
46
+ const char * const guid_names[NGUIDS] = GUID_PARAM_NAMES;
47
+ const char * const guid_names_old[NGUIDS] = GUID_PARAM_NAMES_OLD;
48
49
50
u_int32_t guids[NGUIDS];
51
52
// Get the file's extension. Allowed extensions: bin, img.
53
//
54
55
- char* file_type_str;
56
+ const char* file_type_str;
57
if (file_type == H_ROM) {
58
file_type_str = "expantion rom";
59
} else if (file_type == H_USER_DATA) {
60
61
62
bool TImage::get_fw_ver (FwVer v) {
63
64
- char* ver_params[] = {
65
+ const char* ver_params[] = {
66
"FW.Major Rev ID",
67
"FW.Minor Rev ID",
68
"FW.SubMinor rev ID"
69