source: rtems/contrib/mingw/strslash.nsi @ df16b8bf

4.104.114.95
Last change on this file since df16b8bf was 598aab1f, checked in by Chris Johns <chrisj@…>, on Aug 20, 2007 at 2:12:48 AM

2007-08-20 Chris Johns <chisj@…>

  • filewrite.nsi, getparameters.nsi, instance-check.nsi, mingw-path.nsi, sm-dummy.nsi, strslash.nsi, strstr.nsi, options.nsi: Added the shared between the 2 installer scripts.
  • msys-path.nsi: Fixed the last LF bug.
  • rtems-autotools.nsi, rtems-tools.nsi: Fixed the instance check, added a start menu, remove pages from target installers.
  • rtems.ini: Fixed the URL links. Added support link.
  • rtems_logo.bmp: Trimmed a little more to get a better image.
  • ba-wrap.sh: Stop on a error.
  • build-exes.sh: Use the option parameter variables. Change the order the section appear in the installer.
  • Property mode set to 100644
File size: 509 bytes
Line 
1; Push $filenamestring (e.g. 'c:\this\and\that\filename.htm')
2; Push '\\'
3; Pop $R0
4; Call StrSlash
5; Pop $R0
6; ;Now $R0 contains 'c:/this/and/that/filename.htm'
7Function StrSlash
8 Exch $R0
9 Push $R1
10 Push $R2
11 StrCpy $R1 0
12loop:
13  IntOp $R1 $R1 - 1
14  StrCpy $R2 $R0 1 $R1
15  StrCmp $R2 "" done
16 StrCmp $R2 "\" 0 loop  ; "
17  StrCpy $R2 $R0 $R1
18   Push $R1
19  IntOp $R1 $R1 + 1
20  StrCpy $R1 $R0 "" $R1
21 StrCpy $R0 "$R2/$R1"
22   Pop $R1
23  IntOp $R1 $R1 - 1
24 Goto loop
25done:
26 Pop $R2
27 Pop $R1
28 Exch $R0
29FunctionEnd
Note: See TracBrowser for help on using the repository browser.