Rev 510 | Rev 515 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 510 | Rev 511 | ||
---|---|---|---|
Line 390... | Line 390... | ||
390 | Ptr newpipl = NULL, newaete = NULL; |
390 | Ptr newpipl = NULL, newaete = NULL; |
391 | LPVOID datap, aetep, manifestp; |
391 | LPVOID datap, aetep, manifestp; |
392 | char* manifestp_copy; |
392 | char* manifestp_copy; |
393 | PARM_T *pparm = NULL; |
393 | PARM_T *pparm = NULL; |
394 | size_t piplsize,aetesize,origsize; |
394 | size_t piplsize,aetesize,origsize; |
395 | char title[256]; |
395 | char title[256], category[256]; |
396 | LPCTSTR parm_type; |
396 | LPCTSTR parm_type; |
397 | LPCTSTR parm_id; |
397 | LPCTSTR parm_id; |
398 | Boolean discard = true; |
398 | Boolean discard = true; |
399 | uint64_t obfuscseed = 0, obfuscseed2 = 0; |
399 | uint64_t obfuscseed = 0, obfuscseed2 = 0; |
400 | long event_id; |
400 | long event_id = 0; |
401 | 401 | ||
402 | memset(&dummy_oper, 0, sizeof(operdef_t)); |
402 | memset(&dummy_oper, 0, sizeof(operdef_t)); |
403 | memset(&dummy_func, 0, sizeof(funcdef_t)); |
403 | memset(&dummy_func, 0, sizeof(funcdef_t)); |
404 | memset(&dummy_symn, 0, sizeof(symndef_t)); |
404 | memset(&dummy_symn, 0, sizeof(symndef_t)); |
405 | 405 | ||
Line 417... | Line 417... | ||
417 | char* newmanifest; |
417 | char* newmanifest; |
418 | int manifestsize = SizeofResource(hDllInstance, manifestsrc); |
418 | int manifestsize = SizeofResource(hDllInstance, manifestsrc); |
419 | 419 | ||
420 | newmanifest = (char*)malloc((size_t)manifestsize + 4096/*+4KiB for name,description,etc.*/); |
420 | newmanifest = (char*)malloc((size_t)manifestsize + 4096/*+4KiB for name,description,etc.*/); |
421 | 421 | ||
422 | strcpy(title,gdata->parm.szTitle); |
422 | strcpy_win_replace_ampersand(&title[0], &gdata->parm.szTitle[0]); |
423 | if(gdata->parm.popDialog) |
423 | if (gdata->parm.popDialog) |
424 | strcat(title,"..."); |
424 | strcat(title, "..."); |
425 | 425 | ||
- | 426 | strcpy_win_replace_ampersand(&category[0], &gdata->parm.szCategory[0]); |
|
- | 427 | ||
426 | origsize = SizeofResource(hDllInstance,datarsrc); |
428 | origsize = SizeofResource(hDllInstance,datarsrc); |
427 | 429 | ||
428 | if( (newpipl = (Ptr)malloc(origsize+0x300)) |
430 | if( (newpipl = (Ptr)malloc(origsize+0x300)) |
429 | && (newaete = (Ptr)malloc(4096)) |
431 | && (newaete = (Ptr)malloc(4096)) |
430 | && (pparm = (PARM_T*)malloc(sizeof(PARM_T))) ) |
432 | && (pparm = (PARM_T*)malloc(sizeof(PARM_T))) ) |
Line 433... | Line 435... | ||
433 | 435 | ||
434 | /* add user-specified title and category to new PiPL */ |
436 | /* add user-specified title and category to new PiPL */ |
435 | memcpy(newpipl,datap,origsize); |
437 | memcpy(newpipl,datap,origsize); |
436 | /* note that Windows PiPLs have 2 byte version datum in front |
438 | /* note that Windows PiPLs have 2 byte version datum in front |
437 | that isn't reflected in struct definition or Mac resource template: */ |
439 | that isn't reflected in struct definition or Mac resource template: */ |
438 | piplsize = fixpipl((PIPropertyList*)(newpipl+2),origsize-2,&title[0], &event_id) + 2; |
440 | piplsize = fixpipl((PIPropertyList*)(newpipl+2),origsize-2,&title[0],&category[0],&event_id) + 2; |
439 | 441 | ||
440 | /* set up the PARM resource with saved parameters */ |
442 | /* set up the PARM resource with saved parameters */ |
441 | memcpy(pparm,&gdata->parm,sizeof(PARM_T)); |
443 | memcpy(pparm,&gdata->parm,sizeof(PARM_T)); |
442 | 444 | ||
443 | /* Generate 'aete' resource (contains names of the parameters for the "Actions" tab in Photoshop) */ |
445 | /* Generate 'aete' resource (contains names of the parameters for the "Actions" tab in Photoshop) */ |