View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000674 | Far Manager | _Common | public | 2008-12-19 05:27 | 2009-03-29 18:14 |
Reporter | alexmitin | Assigned To | DrKnS | ||
Priority | normal | Severity | minor | Reproducibility | have not tried |
Status | closed | Resolution | fixed | ||
Fixed in Version | 2.0 | ||||
Summary | 0000674: Some errors: Missing L, incorrect types | ||||
Description | File: copy.cpp Error: Missing L for string and character constants Function: ShellCopy::ShellCopyOneFile() Context: if (strDestPath.At(0)=='\\' && strDestPath.At(1)=='\\') ... if (strRoot.GetLength()>0 && strRoot.At(strRoot.GetLength()-1)=='\\') ------------------------ File: copy.cpp Function: ShellCopy::ShellCopyFile() Error: Missing L for string and character constants Context: DestName[0]!=0 && DestName[1]==':') ------------------------- File: copy.cpp Function: ShellCopy::CmpFullPath() Error: Missing L for string and character constants Context: for (I=strDestFullName.GetLength()-1; I>0 && lpwszDest[I]=='.'; I--) ------------------------- File: findfile.cpp Error: Missing L for string and character constants Function: FindFiles::ArchiveSearch Context: _ALGO(SysLog(L"ArcName='%s'",(ArcName?ArcName:"NULL"))); ------------------------- File: fnparce.cpp Error: Missing L for string and character constants Function: _SubstFileName Context: if (*CurStr=='!') ------------------------- File: interf.cpp Error: Missing L for string and character constants Function: InitRecodeOutTable(); Context: BoxSymbols[I]='+'; BoxSymbols[BS_V1]=BoxSymbols[BS_V2]='|'; BoxSymbols[BS_H1]='-'; BoxSymbols[BS_H2]='='; -------------------------- File: cvtname.cpp Function: ConvertNameToReal() Error: Should use %s instead of %S Context: _SVS(SysLog(L"ConvertNameToFull('%S') -> '%S'",Src,(const wchar_t*)strTempDest)); -------------------------- File: fn.hpp Function: SetVidChar Error: the type of Chr parameter should be wchar_t or WCHAR, not WORD. inline void SetVidChar(CHAR_INFO& CI,WORD Chr) { CI.Char.UnicodeChar = Chr; } -------------------------- File: interf.cpp Function: SetScreen() Error: the type of Ch parameter should be wchar_t or WCHAR, not int. Context: void SetScreen(int X1,int Y1,int X2,int Y2,int Ch,int Color) -------------------------- File: scrbuf.cpp Function: ScreenBuf::FillRect() Error: the type of Ch parameter should be wchar_t or WCHAR, not int. Context: void ScreenBuf::FillRect(int X1,int Y1,int X2,int Y2,int Ch,int Color) -------------------------- File: interf.cpp Function: ClearScreen() Error: Missing L for the 5 parameter Context: ScrBuf.FillRect(0,0,ScrX,ScrY,' ',Color); -------------------------- File: interf.cpp Function: ScrollScreen() Error: Missing L for the 5 parameter Context: ScrBuf.FillRect(0,ScrY+1-Count,ScrX,ScrY,' ', FarColorToReal(COL_COMMANDLINEUSERSCREEN)); -------------------------- File: keyboard.cpp Function: CalcKeyCode() Error: Missing L for string and character constants Context: Char.UnicodeChar=','; Char.UnicodeChar='.'; Char.UnicodeChar='['; Char.UnicodeChar='\\'; Char.UnicodeChar=']'; Char.UnicodeChar='\"'; -------------------------- File: keyboard.cpp Error: Type mismatch between function CalcKeyCode and InputRecordToKey CalcKeyCode returns DWORD. InputRecordToKey returns int. Context: int WINAPI InputRecordToKey(const INPUT_RECORD *r) { if(r) { INPUT_RECORD Rec=*r; // НАДО!, т.к. внутри CalcKeyCode // структура INPUT_RECORD модифицируется! return CalcKeyCode(&Rec,TRUE); } return KEY_NONE; } -------------------------- File: mkdir.cpp Function: ShellMakeDir Error: Missing L for string and character constants Context: while (Length>0 && lpwszDirName[Length-1]==' ') Length--; -------------------------- File: strftime.cpp Function: StrFTime Error: Missing L for string and character constants Context: // Полное имя месяца // full month name case 'B': strBuf=Month[CurLang][t->tm_mon]; break; ... // day of month, blank padded case L'e': // Две цифры дня месяца (01 - 31) // day of the month, 01 - 31 case 'd': <==[bug]== strBuf.Format(*Format==L'e'?L"%2d":L"%02d",t->tm_mday); break; ... case L'k': // Две цифры часа (00 - 23) // hour, 24-hour clock, 00 - 23 case 'H': strBuf.Format(*Format==L'k'?L"%2d":L"%02d",t->tm_hour); break; -------------------------- File: strmix.cpp Function: GetCommaWord Error: Missing L for string and character constants Context: if (*Src=='[' && wcschr(Src+1,']')!=NULL) SkipBrackets=TRUE; if (*Src==']') SkipBrackets=FALSE; -------------------------- File: viewer.cpp Function: Up() Error: Missing L for string and character constants Context: if (Buf[J]=='\t') StrPos+=ViOpt.TabSize-(StrPos % ViOpt.TabSize); else if (Buf[J]!=13) StrPos++; -------------------------- File: viewer.cpp Function: GoTo Error: Missing L for string and character constants Context: else if (GoToDlg[1].strData.At(0)=='$') GoToDlg[1].strData.LShift(1); -------------------------- File: vmenu.cpp Function: ShowMenu() Error: Missing L for string and character constants Context: TmpStrW[AmpPos]='&'; | ||||
Tags | No tags attached. | ||||
Build | 712 | ||||
|
671 |
|
Several other places: -------------------------- File: copy.cpp Error: Missing L for string and character constants Function: ShellCopy::ShellCopyOneFile() Context: if (strRoot.GetLength()>0 && strRoot.At(strRoot.GetLength()-1)=='\\') strRoot.SetLength(strRoot.GetLength()-1); -------------------------- File: edit.cpp Error: Missing L for string and character constants Function: Edit::ProcessKey() Context: case KEY_DEL: { ... if (Mask && *Mask) { ... Str[j]=' '; -------------------------- File: farrtl.cpp Error: Missing L for string and character constants Defines: _wchartodigit() and __ascii_iswalpha() Context: #define _wchartodigit(c) ((c) >= '0' && (c) <= '9' ? (c) - '0' : -1) #define __ascii_iswalpha(c) ( ('A' <= (c) && (c) <= 'Z') || ( 'a' <= (c) && (c) <= 'z')) -------------------------- File: farrtl.cpp Error: Missing L for string and character constants Function: wcstoxq() Context: All character constants in the wcstoxq() should be defined with L prefix. -------------------------- File: scantree.cpp Function: ScanTree::GetNextName() Error: Should use %s instead of %S Context: _SVS(SysLog(L"1. FullName='%S'",(const wchar_t*)strFullName)); -------------------------- File: help.cpp Function: CallBackStack::PrintStack() Error: Should use %s instead of %S Context: SysLog(L"%03d HelpTopic='%S' HelpPath='%S' HelpMask='%S'",I++,(const wchar_t*)Ptr->strHelpTopic,(const wchar_t*)Ptr->strHelpPath,(const wchar_t*)Ptr->strHelpMask); -------------------------- File: fileedit.cpp Function: FileEditor::GetFileAttributes() Warning: Missing L for string and character constants Context: if(FileAttributes&FILE_ATTRIBUTE_READONLY) AttrStr[ind++]='R'; if(FileAttributes&FILE_ATTRIBUTE_SYSTEM) AttrStr[ind++]='S'; if(FileAttributes&FILE_ATTRIBUTE_HIDDEN) AttrStr[ind++]='H'; Solution: 1) Change the type of "AttrStr" to wchar_t[4] 2) Add prefix L to all character contants (see above) 3) Replace: strAttr.SetData (AttrStr, GetOEMCP()); with strAttr.SetData (AttrStr); in the FileEditor::ShowStatus() function. -------------------------- File: filepanels.cpp Error: Missing L for string and character constants Function: FilePanels::GoToFile() Context: if(wcschr(FileName,'\\') || wcschr(FileName,'/')) -------------------------- File: findfile.cpp Error: Missing L for string and character constants Function: FindFiles::FindFilesProcess() Context: if ((Length) && (pi->FindData.lpwszFileName[Length-1]=='\\')) -------------------------- File: findfile.cpp Error: Missing L for string and character constants Function: FindFiles::AddMenuRecord() Context: AttrStr[6]=(FileAttr & FILE_ATTRIBUTE_TEMPORARY) ? L'T':' '; -------------------------- File: help.cpp Error: Missing L for string and character constants Function: Help::ReadHelp() Context: if (*ReadStr=='$' && NearTopicFound && (PrevSymbol == L'$' || PrevSymbol == L'@')) -------------------------- File: keyboard.cpp Function: CalcKeyCode() Error: Missing L for string and character constants Context: case VK_SPACE: if(Char.UnicodeChar == ' ' || !Char.UnicodeChar) return(Modif|KEY_SPACE); -------------------------- File: RegEx.cpp Define: ISWORD Error: Missing L for string and character constants Context: #define ISWORD(c) (IsCharAlphaNumeric(c) || c=='_') -------------------------- File: RegEx.cpp Function: RegExp::CalcLength() Error: Missing L for string and character constants Context: if(inquote && src[i]!=backslashChar && src[i+1]!='E') Note: All other places that use "src" variable in all functions of RegEx.cpp file should be corrected too. -------------------------- File: syslog.cpp Error: Missing L for string and character constants Function: SysLogDump() Context: TmpBuf[X]=I?(Buf[Y*16+X] < 32?'.':Buf[Y*16+X]):' '; |
|
Всё вышеизложенное вошло в 712, кроме RegExp - там отдельный разговор. |
Date Modified | Username | Field | Change |
---|---|---|---|
2008-12-19 05:27 | alexmitin | New Issue | |
2008-12-19 18:11 | DrKnS | Status | new => assigned |
2008-12-19 18:11 | DrKnS | Assigned To | => DrKnS |
2008-12-19 19:04 | DrKnS | Note Added: 0002220 | |
2008-12-19 19:04 | DrKnS | Status | assigned => feedback |
2008-12-29 00:22 | alexmitin | Note Added: 0002269 | |
2008-12-29 17:39 | DrKnS | Note Added: 0002272 | |
2009-03-29 18:14 | alexy | Build | => 712 |
2009-03-29 18:14 | alexy | Status | feedback => closed |
2009-03-29 18:14 | alexy | Resolution | open => fixed |
2009-03-29 18:14 | alexy | Fixed in Version | => 2.0 |