<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://nsis.sourceforge.io/mediawiki/index.php?action=history&amp;feed=atom&amp;title=Talk%3AReplaceInFile</id>
	<title>Talk:ReplaceInFile - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://nsis.sourceforge.io/mediawiki/index.php?action=history&amp;feed=atom&amp;title=Talk%3AReplaceInFile"/>
	<link rel="alternate" type="text/html" href="https://nsis.sourceforge.io/mediawiki/index.php?title=Talk:ReplaceInFile&amp;action=history"/>
	<updated>2026-04-22T21:27:52Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.17</generator>
	<entry>
		<id>https://nsis.sourceforge.io/mediawiki/index.php?title=Talk:ReplaceInFile&amp;diff=9992&amp;oldid=prev</id>
		<title>145.116.9.174 at 07:59, 3 April 2006</title>
		<link rel="alternate" type="text/html" href="https://nsis.sourceforge.io/mediawiki/index.php?title=Talk:ReplaceInFile&amp;diff=9992&amp;oldid=prev"/>
		<updated>2006-04-03T07:59:01Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;â† Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 07:59, 3 April 2006&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l33&quot;&gt;Line 33:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 33:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;       Push &amp;quot;$1&amp;quot;                     ; needle&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;       Push &amp;quot;$1&amp;quot;                     ; needle&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;       Push &amp;quot;$R3&amp;quot;                    ; (hair)stack&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;       Push &amp;quot;$R3&amp;quot;                    ; (hair)stack&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;       Call &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;StrRep                   &lt;/del&gt;; do the bartwalk&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;       Call &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;StrReplace               &lt;/ins&gt;; do the bartwalk&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;       StrCpy $R4 &amp;quot;$R3&amp;quot;              ; remember previous state&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;       StrCpy $R4 &amp;quot;$R3&amp;quot;              ; remember previous state&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;       Pop $R3                       ; gimme s.th. back in return!&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;       Pop $R3                       ; gimme s.th. back in return!&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key n22049_wiki-wiki_:diff::1.12:old-7075:rev-9992 --&gt;
&lt;/table&gt;</summary>
		<author><name>145.116.9.174</name></author>
	</entry>
	<entry>
		<id>https://nsis.sourceforge.io/mediawiki/index.php?title=Talk:ReplaceInFile&amp;diff=7075&amp;oldid=prev</id>
		<title>Deguix: Put a new version to be tested later.</title>
		<link rel="alternate" type="text/html" href="https://nsis.sourceforge.io/mediawiki/index.php?title=Talk:ReplaceInFile&amp;diff=7075&amp;oldid=prev"/>
		<updated>2005-09-02T21:30:46Z</updated>

		<summary type="html">&lt;p&gt;Put a new version to be tested later.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== New Version Using the Current Version of StrRep ==&lt;br /&gt;
&lt;br /&gt;
New version using the current [[StrRep]] (uses LogicLib). This is not tested: that&amp;#039;s why it&amp;#039;s on the talk page. This function also needs to be adapted to LogicLib.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;highlight-nsis&amp;gt;&lt;br /&gt;
Function RIF&lt;br /&gt;
&lt;br /&gt;
  ClearErrors  ; want to be a newborn&lt;br /&gt;
&lt;br /&gt;
  Exch $0      ; REPLACEMENT&lt;br /&gt;
  Exch&lt;br /&gt;
  Exch $1      ; SEARCH_TEXT&lt;br /&gt;
  Exch 2&lt;br /&gt;
  Exch $2      ; SOURCE_FILE&lt;br /&gt;
&lt;br /&gt;
  Push $R0     ; SOURCE_FILE file handle&lt;br /&gt;
  Push $R1     ; temporary file handle&lt;br /&gt;
  Push $R2     ; unique temporary file name&lt;br /&gt;
  Push $R3     ; a line to sar/save&lt;br /&gt;
  Push $R4     ; shift puffer&lt;br /&gt;
&lt;br /&gt;
  IfFileExists $2 +1 RIF_error      ; knock-knock&lt;br /&gt;
  FileOpen $R0 $2 &amp;quot;r&amp;quot;               ; open the door&lt;br /&gt;
&lt;br /&gt;
  GetTempFileName $R2               ; who&amp;#039;s new?&lt;br /&gt;
  FileOpen $R1 $R2 &amp;quot;w&amp;quot;              ; the escape, please!&lt;br /&gt;
&lt;br /&gt;
  RIF_loop:                         ; round&amp;#039;n&amp;#039;round we go&lt;br /&gt;
    FileRead $R0 $R3                ; read one line&lt;br /&gt;
    IfErrors RIF_leaveloop          ; enough is enough&lt;br /&gt;
    RIF_sar:                        ; sar - search and replace&lt;br /&gt;
      Push &amp;quot;$0&amp;quot;                     ; blood&lt;br /&gt;
      Push &amp;quot;$1&amp;quot;                     ; needle&lt;br /&gt;
      Push &amp;quot;$R3&amp;quot;                    ; (hair)stack&lt;br /&gt;
      Call StrRep                   ; do the bartwalk&lt;br /&gt;
      StrCpy $R4 &amp;quot;$R3&amp;quot;              ; remember previous state&lt;br /&gt;
      Pop $R3                       ; gimme s.th. back in return!&lt;br /&gt;
      StrCmp &amp;quot;$R3&amp;quot; &amp;quot;$R4&amp;quot; +1 RIF_sar ; loop, might change again!&lt;br /&gt;
    FileWrite $R1 &amp;quot;$R3&amp;quot;             ; save the newbie&lt;br /&gt;
  Goto RIF_loop                     ; gimme more&lt;br /&gt;
&lt;br /&gt;
  RIF_leaveloop:                    ; over&amp;#039;n&amp;#039;out, Sir!&lt;br /&gt;
    FileClose $R1                   ; S&amp;#039;rry, Ma&amp;#039;am - clos&amp;#039;n now&lt;br /&gt;
    FileClose $R0                   ; me 2&lt;br /&gt;
&lt;br /&gt;
    Delete &amp;quot;$2.old&amp;quot;                 ; go away, Sire&lt;br /&gt;
    Rename &amp;quot;$2&amp;quot; &amp;quot;$2.old&amp;quot;            ; step aside, Ma&amp;#039;am&lt;br /&gt;
    Rename &amp;quot;$R2&amp;quot; &amp;quot;$2&amp;quot;               ; hi, baby!&lt;br /&gt;
&lt;br /&gt;
    ClearErrors                     ; now i AM a newborn&lt;br /&gt;
    Goto RIF_out                    ; out&amp;#039;n&amp;#039;away&lt;br /&gt;
&lt;br /&gt;
  RIF_error:                        ; ups - s.th. went wrong...&lt;br /&gt;
    SetErrors                       ; ...so cry, boy!&lt;br /&gt;
&lt;br /&gt;
  RIF_out:                          ; your wardrobe?&lt;br /&gt;
  Pop $R4&lt;br /&gt;
  Pop $R3&lt;br /&gt;
  Pop $R2&lt;br /&gt;
  Pop $R1&lt;br /&gt;
  Pop $R0&lt;br /&gt;
  Pop $2&lt;br /&gt;
  Pop $0&lt;br /&gt;
  Pop $1&lt;br /&gt;
&lt;br /&gt;
FunctionEnd&lt;br /&gt;
&amp;lt;/highlight-nsis&amp;gt;&lt;/div&gt;</summary>
		<author><name>Deguix</name></author>
	</entry>
</feed>