Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: =?UTF-8?Q?Arne_Vajh=C3=B8j?= Newsgroups: comp.os.vms Subject: Re: Can C #includes like this be made to work onVMS? Date: Wed, 16 Oct 2024 22:13:56 -0400 Organization: A noiseless patient Spider Lines: 46 Message-ID: References: <670eff59$0$705$14726298@news.sunsite.dk> <671041dd$0$716$14726298@news.sunsite.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Thu, 17 Oct 2024 04:13:57 +0200 (CEST) Injection-Info: dont-email.me; posting-host="5cbbbf2280be16c52b008897aa345113"; logging-data="2741231"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/21kyn90d3xjgMBst4tTsLmKKia6xT5ZE=" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:CNBKCjX75Kslmj71Q10aKl9FZO4= In-Reply-To: Content-Language: en-US Bytes: 2447 On 10/16/2024 9:34 PM, Craig A. Berry wrote: > On 10/16/24 5:44 PM, Arne Vajhøj wrote: >> 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. >> procedure eve_all_replace(fndstr,rplstr) > eve_all_replace may be custom, but as far as I know eve_global_replace > is standard. Yes - it is. I wonder why I have that eve_all_replace. >   Here's an example of using TPU as a poor man's Perl: > > $ edit/tpu/nodisplay/noinitialization - >     /section=sys$library:eve$section.tpu$section - >     /command=sys$input/output=myfile.txt myfile.txt > input_file := GET_INFO (COMMAND_LINE, "file_name"); > main_buffer:= CREATE_BUFFER ("main", input_file); > POSITION (BEGINNING_OF (main_buffer)); > eve_global_replace("foo","bar"); > out_file := GET_INFO (COMMAND_LINE, "output_file"); > WRITE_FILE (main_buffer, out_file); > quit; > ^Z > > But yeah, Perl is way easier: > > $ perl -pi -e "s/foo/bar/g;" myfile.txt Of course. :-) Arne