Changeset 1345 for trunk/dll/command.c
- Timestamp:
- Dec 19, 2008, 8:23:07 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dll/command.c
r1337 r1345 66 66 PSZ pszCmdLine; 67 67 INT flags; 68 CHAR title[ 34];68 CHAR title[100]; 69 69 } 70 70 COMMAND; … … 345 345 PSZ pszCmdLine; 346 346 CHAR title[100]; 347 CHAR flags[ 72];347 CHAR flags[34]; 348 348 349 349 if (cmdhead) … … 358 358 if (!xfgets_bstripcr(title, sizeof(title), fp, pszSrcFile, __LINE__)) 359 359 break; 360 title[34] = 0; // fixme to know why chopped this way? 361 bstripcr(title); 360 title[strlen(title)] = 0; // Match size to entry file max 362 361 if (!*title || *title == ';') 363 362 continue; 364 if (!xfgets (pszCmdLine, MaxComLineStrg, fp, pszSrcFile, __LINE__))363 if (!xfgets_bstripcr(pszCmdLine, MaxComLineStrg, fp, pszSrcFile, __LINE__)) 365 364 break; /* error! */ 366 if (!xfgets (flags, 72, fp, pszSrcFile, __LINE__))365 if (!xfgets_bstripcr(flags, sizeof(flags), fp, pszSrcFile, __LINE__)) 367 366 break; /* error! */ 368 pszCmdLine[ MaxComLineStrg - 1] = 0; // fixme to know why chopped this way?369 bstripcr(pszCmdLine);367 pszCmdLine[strlen(pszCmdLine)] = 0; // fixme to know why chopped this way? 368 //bstripcr(pszCmdLine); 370 369 flags[34] = 0; 371 bstripcr(flags);370 //bstripcr(flags); 372 371 if (!pszCmdLine) 373 372 continue; … … 426 425 while (info) { 427 426 fprintf(fp, 428 ";\n%0. 34s\n%0.*s\n%lu\n",427 ";\n%0.99s\n%0.*s\n%lu\n", 429 428 info->title, MaxComLineStrg, info->pszCmdLine, info->flags); 430 429 info = info->next; … … 513 512 WinSendDlgItemMsg(hwnd, CMD_LISTBOX, LM_DELETEALL, MPVOID, MPVOID); 514 513 WinSendDlgItemMsg(hwnd, CMD_CL, EM_SETTEXTLIMIT, 515 MPFROM2SHORT( 1000, 0), MPVOID);514 MPFROM2SHORT(MaxComLineStrg - 1, 0), MPVOID); 516 515 WinSendDlgItemMsg(hwnd, CMD_TITLE, EM_SETTEXTLIMIT, 517 MPFROM2SHORT( 33, 0), MPVOID);516 MPFROM2SHORT(99, 0), MPVOID); 518 517 WinSetDlgItemText(hwnd, CMD_CL, NullStr); 519 518 WinSetDlgItemText(hwnd, CMD_TITLE, NullStr); … … 844 843 case CMD_DELETE: 845 844 { 846 CHAR temp[ 34];847 848 WinQueryDlgItemText(hwnd, CMD_TITLE, 34, temp);845 CHAR temp[100]; 846 847 WinQueryDlgItemText(hwnd, CMD_TITLE, 100, temp); 849 848 bstrip(temp); 850 849 if (!kill_command(temp))
Note:
See TracChangeset
for help on using the changeset viewer.