| Deutsch English Français Italiano |
|
<671041dd$0$716$14726298@news.sunsite.dk> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!news.mixmin.net!weretis.net!feeder8.news.weretis.net!usenet.goja.nl.eu.org!dotsrc.org!filter.dotsrc.org!news.dotsrc.org!not-for-mail
Date: Wed, 16 Oct 2024 18:44:44 -0400
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: Can C #includes like this be made to work onVMS?
Newsgroups: comp.os.vms
References: <vemd23$1qdt1$1@dont-email.me>
<memo.20241015201538.19028q@jgd.cix.co.uk> <vemfc9$1qphf$1@dont-email.me>
<vemh9n$1qq0t$1@dont-email.me> <670eff59$0$705$14726298@news.sunsite.dk>
Content-Language: en-US
From: =?UTF-8?Q?Arne_Vajh=C3=B8j?= <arne@vajhoej.dk>
In-Reply-To: <670eff59$0$705$14726298@news.sunsite.dk>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Lines: 60
Message-ID: <671041dd$0$716$14726298@news.sunsite.dk>
Organization: SunSITE.dk - Supporting Open source
NNTP-Posting-Host: f8d1e4b2.news.sunsite.dk
X-Trace: 1729118685 news.sunsite.dk 716 arne@vajhoej.dk/68.14.27.188:57577
X-Complaints-To: staff@sunsite.dk
Bytes: 2522
On 10/15/2024 7:48 PM, Arne Vajhøj wrote:
> $ type bc.eve
> all replace "#include ""b/" "#include ""c/"
> exit
> $ type cd.tpu
> eve_all_replace("#include ""c/", "#include ""d/");
> eve_exit();
Just realized that one is custom not standard.
!
! Replace all occurences of string with another string (without
! confirm).
!
! High-level.
!
procedure eve_all_replace(fndstr,rplstr)
local fnd_string,
rpl_string,
pos_mark,
count_integer;
if not (eve$prompt_string(fndstr,fnd_string,"Old string: ",
"No old string given")) then
return;
endif;
if not (eve$prompt_string(rplstr,rpl_string,"New string ",
"No new string given")) then
return;
endif;
pos_mark:=mark(none);
set (screen_update, off);
eve$all_replace(fnd_string,rpl_string,count_integer);
position (pos_mark);
set (screen_update, on);
delete (pos_mark);
message("Total of "+str(count_integer)+" replaces");
endprocedure;
!
! Replace all occurences of string with another string (without
! confirm).
!
! Low-level.
!
procedure eve$all_replace(fndstr,rplstr,count)
local find_mark;
position (beginning_of(current_buffer));
count:=0;
loop
find_mark:=search_quietly(fndstr, forward);
exitif find_mark = 0;
count:=count+1;
position (find_mark);
copy_text (rplstr);
erase_character (length(fndstr));
endloop;
endprocedure;
Arne