delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/11/09/20:32:52

Message-ID: <3A0B4CDB.F0708313@home.com>
From: Robin Johnson <robbat2 AT home DOT com>
Organization: Orbis-Terrarum.Net
X-Mailer: Mozilla 4.7 [en] (Win98; U)
X-Accept-Language: en,af,es
MIME-Version: 1.0
Newsgroups: comp.os.msdos.djgpp
Subject: DTOU & UTOD WIP
Lines: 51
Date: Fri, 10 Nov 2000 01:18:06 GMT
NNTP-Posting-Host: 24.113.36.103
X-Complaints-To: abuse AT home DOT net
X-Trace: news1.rdc1.bc.home.com 973819086 24.113.36.103 (Thu, 09 Nov 2000 17:18:06 PST)
NNTP-Posting-Date: Thu, 09 Nov 2000 17:18:06 PST
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Ok, I'm seriously working on proper *nix versions of these now
But I have a few questions... (amongst my code)
Here is a puesdo code/flow diagram

with each input file
begin
	open input file for reading 
 	(what file open mode should it be in *nix,)
	(as binary doesn't really exist?)
	
	open temporary file for output (again, mode question)

	with each line
	begin
		read input
		convert all lines as needed
		(what do we do about loose CR's or LF's that are 'out' of 
		(place for the expected file?)
		write output
	end

	close both files

	get permissions and file time from old file
	set permissions and file time on new file
	(what about the 'owner' of the file?)

	erase old file
	rename new file to old file name
end

-- 
Robin Hugh Johnson
"Robbat2"
QTOD: "I used to be an idealist, but I got mugged by reality."
E-Mail     : robbat2 AT orbis-terrarum DOT net
ICQ#       : 30269588 or 41961639
Home Page  : http://www.orbis-terrarum.net
Time Zone  : Pacific Daylight (GMT - 8)
-----GEEK CODE-{---
Version: 3.12
GU/CS d a--- C++++ L++++ U*+++ E---- 
e* h! tv-- X+ W+++ N+++ w--- M- P+ R 
D++ V-- PS+ PE-- Y+ PGP++ r !y t-- 5 
s+:- b+++
---}-GEEK CODE-----
-----PGP INFO-{---
Key ID:0x7E20DFA1
FingerPrint:
5447C73A 30FB144C 89521B69 2D6A615E 7E20DFA1
---}-PGP INFO-----

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019