[Info-vax] The (now lost) future of Alpha.
Johnny Billquist
bqt at softjar.se
Tue Aug 7 15:38:56 EDT 2018
On 2018-08-07 13:13, Bill Gunshannon wrote:
> On 08/06/2018 02:23 PM, Johnny Billquist wrote:
>> On 2018-08-06 17:21, Bob Koehler wrote:
>>> In article <pk7pe6$c30$1 at gioia.aioe.org>, Chris
>>> <xxx.syseng.yyy at gfsys.co.uk> writes:
>>>>
>>>> One of the reasons why unix and C became so popular in the early days
>>>> is because the C library provides platform independent access to i/o,
>>>> storage and a shed load of other functions. If I write a c program for
>>>> any flavour of unix, or linux and don't try to be too clever, it will
>>>> almost always compile and run on anything else.
>>>
>>> You obvioulsy haven't done enough with ioctl(). Or am I being "too
>>> clever"?
>>>
>>> Years ago, I found I had to get into ioctl() just to identify the
>>> contents
>>> of a magtape.
>>
>> You needs ioctl() for two specific things when dealing with magtapes.
>> 1) When moving over the tape, either rewinding, skipping files or
>> records forward or backward.
>> 2) When you want to write tape marks.
>>
>> There are no other situation when you use ioctl() for the tape. If you
>> want to figure out what is on the tape, you read() from it.
>>
>> But I agree that just using the C library when dealing with tapes will
>> make you so utterly miserable that you want to shoot yourself in the
>> head.
>>
>> The C library is good when you want to do basic, simple things. Tapes
>> are not among the basic, simple things under Unix.
>>
>
> Not just tapes. Terminals, networks, screen handling. There hasn't
> been a time when Unix was just Unix since Version 7 went away.
Sure. ioctl() is not only for tapes. It's a jack of all trades for all
devices, as soon as you want to do anything beyond reading and writing.
However, screen handling isn't one of the things. Screen handling is
just reads and writes. :-)
Johnny
--
Johnny Billquist || "I'm on a bus
|| on a psychedelic trip
email: bqt at softjar.se || Reading murder books
pdp is alive! || tryin' to stay hip" - B. Idol
More information about the Info-vax
mailing list