new macros actually work now
authorDavid Anderson <dvander@alliedmods.net>
Thu Apr 10 05:21:27 2008 +0000 (2008-04-10)
changeset 1980eb4c45360aaf
parent 1979 d36fac1a8203
child 1981 0a12326343ad
new macros actually work now
sourcepawn/compiler/sc1.c
     1.1 --- a/sourcepawn/compiler/sc1.c	Thu Apr 10 04:49:17 2008 +0000
     1.2 +++ b/sourcepawn/compiler/sc1.c	Thu Apr 10 05:21:27 2008 +0000
     1.3 @@ -403,6 +403,7 @@
     1.4    #if !defined NO_DEFINE
     1.5      delete_substtable();
     1.6      inst_datetime_defines();
     1.7 +    inst_binary_name(binfname);
     1.8    #endif
     1.9    resetglobals();
    1.10    sc_ctrlchar=sc_ctrlchar_org;
    1.11 @@ -567,6 +568,7 @@
    1.12  {
    1.13    size_t i, len;
    1.14    char *binptr;
    1.15 +  char newpath[512], newname[512];
    1.16  
    1.17    binptr = NULL;
    1.18    len = strlen(binfname);
    1.19 @@ -588,8 +590,11 @@
    1.20  	  binptr = binfname;
    1.21    }
    1.22  
    1.23 -  insert_subst("__BINARY_PATH__", binfname, 15);
    1.24 -  insert_subst("__BINARY_NAME__", binptr, 15);
    1.25 +  snprintf(newpath, sizeof(newpath), "\"%s\"", binfname);
    1.26 +  snprintf(newname, sizeof(newname), "\"%s\"", binptr);
    1.27 +
    1.28 +  insert_subst("__BINARY_PATH__", newpath, 15);
    1.29 +  insert_subst("__BINARY_NAME__", newname, 15);
    1.30  }
    1.31  
    1.32  static void inst_datetime_defines(void)