sysansi.inc 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. {
  2. *********************************************************************
  3. $Id$
  4. Copyright (C) 2002 by Florian Klaempfl
  5. This program is free software; you can redistribute it and/or modify
  6. it under the terms of the GNU General Public License as published by
  7. the Free Software Foundation; either version 2 of the License, or
  8. (at your option) any later version.
  9. This program is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. GNU General Public License for more details.
  13. You should have received a copy of the GNU General Public License
  14. along with this program; if not, write to the Free Software
  15. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  16. *********************************************************************
  17. }
  18. Function AnsiCompareFileName(const S1, S2: string): Integer;
  19. begin
  20. If FileNameCaseSensitive then
  21. Result:=AnsiCompareStr(S1,S2) // Compare case sensitive
  22. else
  23. Result:=AnsiCompareText(S1,S2); // Compare case insensitive. No MBCS yet.
  24. end;
  25. Function SameFileName(const S1, S2: string): Boolean;
  26. begin
  27. Result:=AnsiCompareFileName(S1,S2)=0;
  28. end;
  29. Function AnsiLowerCaseFileName(const S: string): string;
  30. begin
  31. Result:=AnsiLowerCase(S); // No locale support or MBCS yet.
  32. end;
  33. Function AnsiUpperCaseFileName(const S: string): string;
  34. begin
  35. Result:=AnsiUpperCase(S); // No locale support or MBCS yet.
  36. end;
  37. Function AnsiPos(const Substr, S: string): Integer;
  38. begin
  39. Result:=Pos(Substr,S); // No MBCS yet.
  40. end;
  41. Function AnsiStrPos(Str, SubStr: PChar): PChar;
  42. begin
  43. Result:=StrPos(Str,Substr);
  44. end;
  45. Function AnsiStrRScan(Str: PChar; Chr: Char): PChar;
  46. begin
  47. Result:=StrRScan(Str,Chr);
  48. end;
  49. Function AnsiStrScan(Str: PChar; Chr: Char): PChar;
  50. begin
  51. Result:=StrScan(Str,Chr);
  52. end;
  53. {
  54. $Log$
  55. Revision 1.2 2003-11-26 22:17:42 michael
  56. + Merged fixbranch fixes, missing in main branch
  57. Revision 1.1 2003/10/06 21:01:06 peter
  58. * moved classes unit to rtl
  59. Revision 1.1 2002/10/07 19:43:24 florian
  60. + empty prototypes for the AnsiStr* multi byte functions added
  61. }