psvita Posted November 22, 2014 Group: Members Topic Count: 28 Topics Per Day: 0.01 Content Count: 50 Reputation: 0 Joined: 03/02/12 Last Seen: December 6, 2014 Share Posted November 22, 2014 (edited) long time since I compiled rAthena , I still missing to compiled the nullpo.h because it [warning]C4819: The file contains a character that cannot be represented in the current code page (874). Save the file in Unicode format to prevent data loss everytime I compiled it , however it still compiled finish and useable. and today I try to check inside nullpo.h and I found this , it's the problem that why my visual cannot read the code. anyone please help me how to convert this code for visual can reading it. or post your correct unicode of nullpo.h here. thanks you This is my problem 1 // Copyright (c) Athena Dev Teams - Licensed under GNU GPL 2 // For more information, see LICENCE in the main folder 3 4 #ifndef _NULLPO_H_ 5 #define _NULLPO_H_ 6 7 8 #include "../common/cbasetypes.h" 9 10 #define NLP_MARK __FILE__, __LINE__, __func__ 11 12 // enabled by default on debug builds 13 #if defined(DEBUG) && !defined(NULLPO_CHECK) 14 #define NULLPO_CHECK 15 #endif 16 17 /*---------------------------------------------------------------------------- 18 * Macros 19 *---------------------------------------------------------------------------- 20 */ 21 /*====================================== 22 * Null`FbN y o͌ return 23 *EWJifƂreturnô 24 * sP̂ŎgĂB 25 *Enullpo_ret(x = func()); 26 * ̂悤Ȏgp@z肵Ă܂B 27 *-------------------------------------- 28 * nullpo_ret(t) 29 * ߂l 0Œ 30 * [] 31 * t `FbNΏ 32 *-------------------------------------- 33 * nullpo_retv(t) 34 * ߂l Ȃ 35 * [] 36 * t `FbNΏ 37 *-------------------------------------- 38 * nullpo_retr(ret, t) 39 * ߂l w 40 * [] 41 * ret return(ret); 42 * t `FbNΏ 43 *-------------------------------------- 44 * nullpo_ret_f(t, fmt, ...) 45 * ڍo͗p 46 * ߂l 0 47 * [] 48 * t `FbNΏ 49 * fmt ... vprintfɓn 50 * lWϐ̏oȂǂ 51 *-------------------------------------- 52 * nullpo_retv_f(t, fmt, ...) 53 * ڍo͗p 54 * ߂l Ȃ 55 * [] 56 * t `FbNΏ 57 * fmt ... vprintfɓn 58 * lWϐ̏oȂǂ 59 *-------------------------------------- 60 * nullpo_retr_f(ret, t, fmt, ...) 61 * ڍo͗p 62 * ߂l w 63 * [] 64 * ret return(ret); 65 * t `FbNΏ 66 * fmt ... vprintfɓn 67 * lWϐ̏oȂǂ 68 *-------------------------------------- 69 */ 70 71 #if defined(NULLPO_CHECK) 72 73 #define nullpo_ret(t) \ 74 if (nullpo_chk(NLP_MARK, (void *)(t))) {return(0);} 75 76 #define nullpo_retv(t) \ 77 if (nullpo_chk(NLP_MARK, (void *)(t))) {return;} 78 79 #define nullpo_retr(ret, t) \ 80 if (nullpo_chk(NLP_MARK, (void *)(t))) {return(ret);} 81 82 #define nullpo_retb(t) \ 83 if (nullpo_chk(NLP_MARK, (void *)(t))) {break;} 84 85 // ψ}NɊւRpC 86 #if __STDC_VERSION__ >= 199901L 87 /* C99ɑΉ */ 88 #define nullpo_ret_f(t, fmt, ...) \ 89 if (nullpo_chk_f(NLP_MARK, (void *)(t), (fmt), __VA_ARGS__)) {return(0);} 90 91 #define nullpo_retv_f(t, fmt, ...) \ 92 if (nullpo_chk_f(NLP_MARK, (void *)(t), (fmt), __VA_ARGS__)) {return;} 93 94 #define nullpo_retr_f(ret, t, fmt, ...) \ 95 if (nullpo_chk_f(NLP_MARK, (void *)(t), (fmt), __VA_ARGS__)) {return(ret);} 96 97 #define nullpo_retb_f(t, fmt, ...) \ 98 if (nullpo_chk_f(NLP_MARK, (void *)(t), (fmt), __VA_ARGS__)) {break;} 99 100 #elif __GNUC__ >= 2 101 /* GCCp */ 102 #define nullpo_ret_f(t, fmt, args...) \ 103 if (nullpo_chk_f(NLP_MARK, (void *)(t), (fmt), ## args)) {return(0);} 104 105 #define nullpo_retv_f(t, fmt, args...) \ 106 if (nullpo_chk_f(NLP_MARK, (void *)(t), (fmt), ## args)) {return;} 107 108 #define nullpo_retr_f(ret, t, fmt, args...) \ 109 if (nullpo_chk_f(NLP_MARK, (void *)(t), (fmt), ## args)) {return(ret);} 110 111 #define nullpo_retb_f(t, fmt, args...) \ 112 if (nullpo_chk_f(NLP_MARK, (void *)(t), (fmt), ## args)) {break;} 113 114 #else 115 116 /* ̑̏ꍇEEE orz */ 117 118 #endif 119 120 #else /* NULLPO_CHECK */ 121 /* No Nullpo check */ 122 123 // if((t)){;} 124 // ǂ@vȂ̂ŁEEE̍łB 125 // ꉞ[jO͏oȂ͂ 126 127 #define nullpo_ret(t) (void)(t) 128 #define nullpo_retv(t) (void)(t) 129 #define nullpo_retr(ret, t) (void)(t) 130 #define nullpo_retb(t) (void)(t) 131 132 // ψ}NɊւRpC 133 #if __STDC_VERSION__ >= 199901L 134 /* C99ɑΉ */ 135 #define nullpo_ret_f(t, fmt, ...) (void)(t) 136 #define nullpo_retv_f(t, fmt, ...) (void)(t) 137 #define nullpo_retr_f(ret, t, fmt, ...) (void)(t) 138 #define nullpo_retb_f(t, fmt, ...) (void)(t) 139 140 #elif __GNUC__ >= 2 141 /* GCCp */ 142 #define nullpo_ret_f(t, fmt, args...) (void)(t) 143 #define nullpo_retv_f(t, fmt, args...) (void)(t) 144 #define nullpo_retr_f(ret, t, fmt, args...) (void)(t) 145 #define nullpo_retb_f(t, fmt, args...) (void)(t) 146 147 #else 148 /* ̑̏ꍇEEE orz */ 149 #endif 150 151 #endif /* NULLPO_CHECK */ 152 153 /*---------------------------------------------------------------------------- 154 * Functions 155 *---------------------------------------------------------------------------- 156 */ 157 /*====================================== 158 * nullpo_chk 159 * Null`FbN y o 160 * [] 161 * file __FILE__ 162 * line __LINE__ 163 * func __func__ () 164 * ɂ NLP_MARK gƂ悢 165 * target `FbNΏ 166 * [Ԃl] 167 * 0 OK 168 * 1 NULL 169 *-------------------------------------- 170 */ 171 int nullpo_chk(const char *file, int line, const char *func, const void *target); 172 173 174 /*====================================== 175 * nullpo_chk_f 176 * Null`FbN y ڍׂȏo 177 * [] 178 * file __FILE__ 179 * line __LINE__ 180 * func __func__ () 181 * ɂ NLP_MARK gƂ悢 182 * target `FbNΏ 183 * fmt ... vprintfɓn 184 * lWϐ̏oȂǂ 185 * [Ԃl] 186 * 0 OK 187 * 1 NULL 188 *-------------------------------------- 189 */ 190 int nullpo_chk_f(const char *file, int line, const char *func, const void *target, 191 const char *fmt, ...) 192 __attribute__((format(printf,5,6))); 193 194 195 /*====================================== 196 * nullpo_info 197 * nullpoo 198 * [] 199 * file __FILE__ 200 * line __LINE__ 201 * func __func__ () 202 * ɂ NLP_MARK gƂ悢 203 *-------------------------------------- 204 */ 205 void nullpo_info(const char *file, int line, const char *func); 206 207 208 /*====================================== 209 * nullpo_info_f 210 * nullpoڍo 211 * [] 212 * file __FILE__ 213 * line __LINE__ 214 * func __func__ () 215 * ɂ NLP_MARK gƂ悢 216 * fmt ... vprintfɓn 217 * lWϐ̏oȂǂ 218 *-------------------------------------- 219 */ 220 void nullpo_info_f(const char *file, int line, const char *func, 221 const char *fmt, ...) 222 __attribute__((format(printf,4,5))); 223 224 225 #endif /* _NULLPO_H_ */ this is what I got , when I open in notepad+ and what is nullpo.h work for ? because if I try to remove the unknow word , and compile , it not error but i don't know that the function still work or not. thanks. Edited November 22, 2014 by psvita Quote Link to comment Share on other sites More sharing options...
Antares Posted November 24, 2014 Group: Members Topic Count: 74 Topics Per Day: 0.02 Content Count: 420 Reputation: 89 Joined: 01/30/12 Last Seen: April 29, 2023 Share Posted November 24, 2014 Those are comments, not actual codes, so they don't affect the system. I suppose they are sidenotes or lists for referencing the official functions, or whatever. Simply ignore it or delete the comments, or as the message says: Save the file in Unicode format to prevent data loss Open in Notepad++ (or any text editor), Set encoding to: Unicode (without BOM), Save, Ok, Yes (In some editors like windows notepad you can change the encoding on the save dialog.) Quote Link to comment Share on other sites More sharing options...
Question
psvita
long time since I compiled rAthena , I still missing to compiled the nullpo.h
because it
everytime I compiled it , however it still compiled finish and useable.
and today I try to check inside nullpo.h and I found this , it's the problem that why my visual cannot read the code.
anyone please help me how to convert this code for visual can reading it.
or post your correct unicode of nullpo.h here.
thanks you
This is my problem
this is what I got , when I open in notepad+
and what is nullpo.h work for ?
because if I try to remove the unknow word , and compile , it not error
but i don't know that the function still work or not.
thanks.
Edited by psvitaLink to comment
Share on other sites
1 answer to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.