Difference for plugins/cfpython/cfpython.c from version 1.26 to 1.27


version 1.26 version 1.27
Line 752
 
Line 752
 CF_PLUGIN void* getPluginProperty(int* type, ...)  CF_PLUGIN void* getPluginProperty(int* type, ...)
 {  {
     va_list args;      va_list args;
     char* propname;      const char* propname;
     int i;      int i;
     static CommArray_s rtn_cmd;      static CommArray_s rtn_cmd;
   
     va_start(args, type);      va_start(args, type);
     propname = va_arg(args, char *);      propname = va_arg(args, const char *);
   
     if (!strcmp(propname, "command?")) {      if (!strcmp(propname, "command?")) {
         char* cmdname;          const char* cmdname;
         cmdname = va_arg(args, char *);          cmdname = va_arg(args, const char *);
         va_end(args);          va_end(args);
   
         for (i = 0; i < NR_CUSTOM_CMD; i++) {          for (i = 0; i < NR_CUSTOM_CMD; i++) {
Line 794
 
Line 794
   
     rv = 0;      rv = 0;
   
     if (current_command < -999) {      if (current_command < 0) {
         printf("Illegal call of runPluginCommand, call find_plugin_command first.\n");          printf("Illegal call of runPluginCommand, call find_plugin_command first.\n");
         return 1;          return 1;
     }      }
     snprintf(buf, sizeof(buf), "%s.py", cf_get_maps_directory(CustomCommand[current_command].name));      snprintf(buf, sizeof(buf), "%s.py", cf_get_maps_directory(CustomCommand[current_command].script));
   
     context = malloc(sizeof(CFPContext));      context = malloc(sizeof(CFPContext));
     context->message[0] = 0;      context->message[0] = 0;
Line 811
 
Line 811
     snprintf(context->options, sizeof(context->options), "%s", params);      snprintf(context->options, sizeof(context->options), "%s", params);
     context->returnvalue = 1; /* Default is "command successful" */      context->returnvalue = 1; /* Default is "command successful" */
   
       current_command = -999;
   
     if (!do_script(context, 0)) {      if (!do_script(context, 0)) {
         freeContext(context);          freeContext(context);
         return rv;          return rv;
Line 819
 
Line 821
     context = popContext();      context = popContext();
     rv = context->returnvalue;      rv = context->returnvalue;
     freeContext(context);      freeContext(context);
     printf("Execution complete");  /*    printf("Execution complete"); */
     return rv;      return rv;
 }  }
   


Legend:
line(s) removed in v.1.26 
line(s) changed
 line(s) added in v.1.27

File made using version 1.98 of cvs2html by leaf at 2011-07-21 16:59