// todo support %var% variables for windows and $var for linux?
public char * PassArg(char * output, const char * input)
{
-#ifdef __WIN32__
-//define windowsFileNameCharsNeedEscaping = " !%&'()+,;=[]^`{}~"; // "#$-.@_" are ok
- const char * escChars = " !\"%&'()+,;=[]^`{}~"; // windowsFileNameCharsNeedEscaping;
- const char * escCharsQuoted = "\"";
-#else
-//define linuxFileNameCharsNeedEscaping = " !\"$&'()*:;<=>?[\\`{|"; // "#%+,-.@]^_}~" are ok
- const char * escChars = " !\"$&'()*:;<=>?[\\`{|"; // linuxFileNameCharsNeedEscaping;
- const char * escCharsQuoted = "\"()$";
-#endif
+ const char * escChars, * escCharsQuoted;
bool quoting = false;
char *o = output;
const char *i = input, *l = input;
-#ifdef __WIN32__
- while(*l && !strchr(escChars, *l)) l++;
- if(*l) quoting = true;
-#else
- if(*i == '-')
+ if(__runtimePlatform == win32)
{
- l++;
+//define windowsFileNameCharsNeedEscaping = " !%&'()+,;=[]^`{}~"; // "#$-.@_" are ok
+ escChars = " !\"%&'()+,;=[]^`{}~"; // windowsFileNameCharsNeedEscaping;
+ escCharsQuoted = "\"";
while(*l && !strchr(escChars, *l)) l++;
if(*l) quoting = true;
- *o++ = *i++;
}
-#endif
+//define linuxFileNameCharsNeedEscaping = " !\"$&'()*:;<=>?[\\`{|"; // "#%+,-.@]^_}~" are ok
+ else
+ {
+ escChars = " !\"$&'()*:;<=>?[\\`{|"; // linuxFileNameCharsNeedEscaping;
+ escCharsQuoted = "\"()$";
+ if(*i == '-')
+ {
+ l++;
+ while(*l && !strchr(escChars, *l)) l++;
+ if(*l) quoting = true;
+ *o++ = *i++;
+ }
+ }
if(quoting)
*o++ = '\"';
while(*i)
char * name;
Symbol symbol;
OldList/*<TemplateArgument>*/ * templateArgs;
+ Specifier nsSpec;
};
struct
{
Context ctx;
int isIterator;
Expression propCategory;
+ bool mustRegister; // Must register the class within the RegisterClass (also used to check whether this class is declared in this module)
};
// For the .imp file:
bool typedByReference:1; // Originally typed by reference, regardless of class type
bool casted:1;
bool pointerAlignment:1; // true if the alignment is the pointer size
+ bool isLong:1; // true if this is truly a long set as a int/int64 (need to improve long support)
// bool wasThisClass:1;
// TODO: Add _Complex & _Imaginary support
// bool complex:1, imaginary:1;