- Timestamp:
- May 21, 2024, 8:09:05 PM (15 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/mediafolder/c/m3ufolder/m3ufolderoverriddenwpmethods.cpp
r133 r178 21 21 #include "sys_funcs.h" 22 22 #include "menu_funcs.h" 23 24 #if 0 25 #define _PMPRINTF_ 26 #include "PMPRINTF.H" 27 #endif 23 28 24 29 extern BOOL g_fRegisteredWindowClass; … … 57 62 58 63 //void HlpWriteToTrapLog(const char* chrFormat, ...); 64 65 void writeLog(const char* chrFormat, ...) 66 { 67 char logNameLocal[CCHMAXPATH]; 68 FILE *fHandle; 69 70 sprintf(logNameLocal,"d:\\cwmm.log"); 71 fHandle=fopen(logNameLocal,"a"); 72 if(fHandle) { 73 va_list arg_ptr; 74 void *tb; 75 76 va_start (arg_ptr, chrFormat); 77 vfprintf(fHandle, chrFormat, arg_ptr); 78 va_end (arg_ptr); 79 // fprintf(fHandle,logText); 80 fclose(fHandle); 81 } 82 } 59 83 60 84 /*****************************************************/ … … 265 289 switch(thisPtr->usLastSelMenuItem) 266 290 { 267 #ifndef ECS291 //#ifndef ECS 268 292 case 0x2d3:/* Help menu */ 269 293 { 270 294 if(hResource) { 271 295 /* insert separator */ 296 getMessage(text, IDSTR_M3ULISTHELP ,sizeof(text), hResource, hwnd); 297 menuInsertMenuItem(HWNDFROMMP(mp2), NULL, 0, ID_M3ULISTHELP, text); 272 298 menuInsertMenuSeparator(HWNDFROMMP(mp2), NULL, MIT_END); 273 299 /* Insert 'About' item */ … … 278 304 break; 279 305 } 280 #endif306 //#endif 281 307 case 0x2d1: /* View menu */ 282 308 /* Remove change to Tree from menubar menu */ … … 701 727 M3UTHREADPARMS *parms=(M3UTHREADPARMS*)arg; 702 728 703 704 if(!parms) 729 writeLog("Thread"); 730 if(!parms) { 731 writeLog("!parms"); 705 732 return; 733 } 706 734 707 735 thisPtr=(CWM3UFolder*)parms->thisPtr; 708 if(!somIsObj(thisPtr)) 736 if(!somIsObj(thisPtr)) { 737 writeLog("!thisPtr"); 709 738 return; 710 711 if(!somIsObj(thisPtr->wpObjM3UFile)) 739 } 740 741 if(!somIsObj(thisPtr->wpObjM3UFile)){ 742 writeLog("!thisPtr->wpObjM3UFile"); 712 743 return; 744 } 713 745 714 746 ulSize=sizeof(chrFileName); 715 if(!((WPFileSystem*)thisPtr->wpObjM3UFile)->wpQueryRealName(chrFileName, &ulSize, TRUE)) 747 if(!((WPFileSystem*)thisPtr->wpObjM3UFile)->wpQueryRealName(chrFileName, &ulSize, TRUE)) { 748 writeLog("!chrFileName"); 716 749 return; 717 750 } 751 writeLog("chrFileName %s", chrFileName); 718 752 hab=WinInitialize(0); 719 753 if(hab) { … … 736 770 mrc=(PMINIRECORDCORE)WinSendMsg(hwndContainer,CM_QUERYRECORD, MPFROMSHORT(CMA_FIRST), 737 771 MPFROM2SHORT(CMA_FIRST,CMA_ITEMORDER)); 738 if(!mrc || (int)mrc==-1) 739 break; 772 if(!mrc || (int)mrc==-1) { 773 writeLog("No mrc"); 774 #ifdef _PMPRINTF_ 775 Pmpf(("No mrc")); 776 #endif 777 break; 778 } 740 779 741 780 do { … … 750 789 } 751 790 } 752 else 753 break;/* Error */ 791 else { 792 writeLog("No contentobj"); 793 #ifdef _PMPRINTF_ 794 Pmpf(("No contentobj")); 795 #endif 796 break;/* Error */ 797 } 754 798 755 799 /* Get the name of the audio file */ 756 800 ulSize=sizeof(chrFileName); 757 801 ((WPFileSystem*)contentObject)->wpQueryRealName(chrFileName,&ulSize,TRUE); 758 /* Try next object */ 802 /* Try next object */ 803 writeLog("chrFileName %s", chrFileName); 804 #ifdef _PMPRINTF_ 805 Pmpf(("chrFileName %s", chrFileName)); 806 #endif 759 807 fputs(chrFileName,fStream); 760 808 fputs("\n",fStream); … … 774 822 thisPtr->fContentsChanged=FALSE; 775 823 if(!parms->fSaveOnly) { 824 writeLog("Not Saveonly"); 825 #ifdef _PMPRINTF_ 826 Pmpf(("Not Saveonly ")); 827 #endif 776 828 /* Close and destroy the folder if requested */ 777 829 WinPostMsg(parms->hwndFrame, WM_CLOSE, 0, 0);
Note:
See TracChangeset
for help on using the changeset viewer.