HDTenEightyP/NetNews huggingface dataset:
From: malcolm@Apple.COM (Malcolm Slaney)
Newsgroups: comp.unix.cray,comp.sys.super
Subject: Re: Are there specific tools to assist in porting C to CRAY
Summary: Use GREP
Date: 18 Aug 92 04:45:38 GMT
Organization: Apple Computer Inc, Cupertino, CA

In article <1992Aug17.234228.16195@leland.Stanford.EDU> buc@leland.stanford.edu (Robert Richards) writes:
>
>I am trying to port a C program to the Cray under UNICOS.  The slowest
>part of the port is the 32-bit references that I have to convert to
>CRAY's 64-bit world.  Are there any tools that help one find where
>code is not 64-bit world compatible?

I've lost count of how many codes I've ported to the Cray.  It's not always
hard, but then people are always doing things to screw you up.  I don't know
of any specific tools, but I usually run a lot of greps.

First step, get the code to compile and run correctly with an ANSI C compiler
on a 32 bit machine (or wherever the code is known to work correctly.)
Most 64 bit portability problems won't be caught by the compiler but you
really should start with a clean program.

Step two, look for all references (grep) to read and/or write.  Quite often
this indicates that the program is doing binary IO...there is nothing wrong
with this but it can indicate a problem with moving files to other machines.
Redefine all binary IO in terms of a stream of bytes.

Look for unions (this one just got me).....these could be indications of 
somebody trying to mess with the bits (overlaying a float and an integer,
for example.)  Since you are doing ME and not EE I suspect you won't  see
too much bit twiddling, either.

Finally, run the program and see where it stops.  

It's really not hard to write portable 64/32 bit code.....keep your fingers
crossed.  Going the other way is even harder.

							Malcolm Slaney
							Apple ATG
Newsgroups: comp.unix.cray,comp.sys.super
From: buc@leland.stanford.edu (Robert Richards)
Subject: Are there specific tools to assist in porting C to CRAY
Organization: Stanford University
Date: Mon, 17 Aug 92 23:42:28 GMT


I am trying to port a C program to the Cray under UNICOS.  The slowest
part of the port is the 32-bit references that I have to convert to
CRAY's 64-bit world.  Are there any tools that help one find where
code is not 64-bit world compatible?

Thanks.

 Cray Y-MP**ETA 10-E**Cray X-MP**NEC SX-2**Hitachi S-820/80**Cray 2S**NAS AS/XL
-------------------------------------------------------------------------------
Rob Richards			 Internet: buc@jessica.Stanford.Edu
Mechanical Engineering Dept.     Bitnet:   buc%jessica.Stanford.Edu@Stanford
Supercomputing Support Staff     
Stanford University           	 FAX:      (415) 725-8240
-------------------------------------------------------------------------------
 Fujitsu VP-400**Amdahl 1400**E & S - 1**Ardent Titan**IBM 3090**Siemens H120F
From: mccabe@gdls.UUCP (Harold McCabe)
Newsgroups: comp.unix.questions
Subject: NDBM:  what is it?
Keywords: NDBM, Sun, more info.
Date: 17 Aug 92 20:08:35 GMT
Distribution: usa
Organization: General Dynamics Land Systems, Sterling Heights, MI

I need to get some info. on ndbm for Sun 4.1.  I have read the
man pages on dbm_open, dbm_close, etc. but cannot find any more
info on how to initially setup the database, what are the limitations
on keys, etc.  Can someone point me in the right direction?

Thanks,

Harold McCabe
Newsgroups: comp.unix.questions
From: jacobsen@itexjct.jct.ac.il (Joel Jacobsen)
Subject: Activate tin from a execl system call
Organization: ITEX, Jerusalem, Israel
Date: 18 Aug 92 12:28:13 GMT

I wan to activate 'tin' (or other news reader) from a C program
in such a way that I could pass commands to the news reader and read
it's output within the program.

 How to do it?

       Joel



Newsgroups: comp.unix.questions
From: djr48312@uxa.cso.uiuc.edu (X X)
Subject: bad crc when download to pc
Organization: University of Illinois at Urbana
Date: Thu, 13 Aug 1992 07:57:04 GMT

I keep getting a bad crc when I download to my pc.  It happens at 4096
bytes.  What is wrong?  It does not always do this, and is really driving
me up a wall.  Please reply if any helpful hints

.


Dennnis
From: ganapath@plains.NoDak.edu (Prabhukumar Ganapathy)
Newsgroups: comp.unix.questions
Subject: HELP WITH PRINTING OF GRAPHICS AND TEXT
Date: 21 Aug 92 05:33:00 GMT
Article-I.D.: plains.19825
Organization: North Dakota Higher Education Computing Network


I am using pic(1) and groff(1) to draw map and text. I was
wondering if I could print the text in different orientations.
As far as I know pic(1) allows only horizontal orientation of
text. I would appreciate if someone could suggest a way out.

Please e-mail your reply.

Thanx in advance.

PK
From: osycs@giac1.oscs.montana.edu (Craig Spannring)
Newsgroups: comp.unix.questions
Subject: Re: reliable write()
Keywords: n
Date: 14 Aug 92 23:32:56 GMT
Organization: Geographic Information & Analysis Center Montana State University

In article <9208141294@umunk.GUN.de> udo@umunk.GUN.de (Udo Munk) writes:
>
>What about calling system("sync"); after a flush of the buffers for
>systems which have neighter?

The Ultrix man page for sync(2) says the system call only schedules
all pending disk output.  It may return before the writes actually 
occur.  I assume that /bin/sync relies on sync(2) to perform the actual
work.

-- 
====================================================================
 Six of one, 110 (base 2) of       | Craig Spannring
 another.                          | osycs@giac1.oscs.montana.edu
 ----------------------------------+--------------------------------
Xref: sparky comp.unix.questions:10197 comp.sys.sun.admin:5681 comp.sys.sun.misc:3796 alt.sys.sun:3052
From: peterj@uwa.oz.au (Peter E. Jones)
Newsgroups: comp.unix.questions,comp.sys.sun.admin,comp.sys.sun.misc,alt.sys.sun
Subject: Re: Swap space usage..??
Date: 20 Aug 92 04:33:19 GMT
Organization: Elec Eng, Univ of Western Australia

limes@ouroborous.Eng.Sun.COM (Greg Limes) writes:

>In article <1992Aug13.204756.12770@mdd.comm.mot.com> pchan@mdd.comm.mot.com (Pat Chan) writes:
>| When I do "pstat -T", I get the swap space size, say X.
>| When I do "/etc/dmesg", I find the swap space is only half of X.
>| The other half is for dump space.
 .... lots of other stuff ...

 Is this not just that disk sizes are in terms of blocks which are
 only 512 bytes, i.e. 1/2 a Kbyte?  You get the same thing happening
 when you buy a 660Mbyte disc - they mean M==million and not mega
 as is usually the case for RAM say.  Makes a little difference
 and also gives rise to just this type of query.

--
Peter Jones                             .-_!\   Phone: +61 9 380 3100
Electrical & Electronic Eng            /     \  Fax:   +61 9 380 1065
University of Western Australia --->>  P_.-._/
NEDLANDS, Western Australia 6009            o   E-mail: peterj@swanee.uwa.oz.au
Newsgroups: comp.unix.questions
From: levin@world.std.com (Levin F Magruder)
Subject: mm mail reader - how do I save addresses to file
Organization: The World Public Access UNIX, Brookline, MA
Date: Sun, 16 Aug 1992 15:03:37 GMT

I use a mail reader called "mm".  Version 0.90.2(1).

1.  Is this the right group to ask questions about it.

2.  Say I get 20 pieces of mail.  10 are requests for a file,
and all ten mention the file name in the subject.  Is there
a way I can save the addresses of the ones that mention the
file name to a file called request, so I can later send them
the file using @request as my address.  I want to overwrite
any file name request that's in the way.  The addresses have
to have commas between them.

3.  Is there a way (using mm and standard utilities), to send
mail to all addresses that are in one file that aren't in another
file?  What I am getting at is distributing diffs and updates.

If the answer to these questions is "no", could you e-mail
me so I'll know?  If it is possible, posting here (or whatever
you think the appropriate group is) is fine.

Thank you

levin@world.std.com
Newsgroups: comp.unix.questions
From: jmarten@cix.compulink.co.uk (Jonathan Marten)
Subject: Re: Resilient Unix systems
Reply-To: jmarten@cix.compulink.co.uk
Date: Fri, 21 Aug 1992 20:23:03 +0000


Thanks to all of those who replied (via posts and e-mail) to my question 
regarding resilient systems.  Unfortunately, in this application a UPS is 
not the answer, but I have received a number of helpful suggestions.
 
+-------------------------------+------------------------------+
|  Jonathan Marten              |     .                        |
|                               |    /|                        |
|  jmarten@cix.uucp             |   /_|                        |
|  jmarten@cix.compulink.co.uk  |  /  |corn - The choice of    |
|  ...!ukc!slxsys!cix!jmarten   |      suckers for punishment  |
+-------------------------------+------------------------------+

Newsgroups: comp.unix.questions
From: kuo_wy@jhunix.hcf.jhu.edu (Wilbur Y Kuo)
Subject: vt100 escape codes
Organization: HAC - Johns Hopkins University, Baltimore
Date: Wed, 12 Aug 1992 21:47:15 GMT

Hi.  I was wondering if anyone could e-mail me a list of the escape codes
that a vt100 terminal interprets, or tell me what I should man.  For
instance, what control code/escape code do I place in a file to cause the
cursor to go up a line when I display the file?

Please e-mail any responses.  I'll post a summary of the results.

Thanks in advance.

Wilbur

Newsgroups: comp.unix.questions
From: Tom Christiansen <tchrist@convex.COM>
Subject: Re: Changing file names
Originator: tchrist@pixel.convex.com
Date: Thu, 20 Aug 1992 13:32:35 GMT
Reply-To: tchrist@convex.COM (Tom Christiansen)
Organization: Convex Computer Corporation, Colorado Springs, CO
X-Disclaimer: This message was written by a user at CONVEX Computer
              Corp. The opinions expressed are those of the user and
              not necessarily those of CONVEX.

From the keyboard of ecmtwhk@ccu1.aukuni.ac.nz (Thomas Koenig):
:jf41+@andrew.cmu.edu (Jonathan R. Ferro) writes:
:
:>bosak@netcom.com (Jon Bosak) writes:
:>> [ file name conversion: xyz920815a ==> 920815a ]
:>>
:>> Who can provide the most elegant solution using just the basic Unix
:>> tools (cp, mv, sed, awk, sh, csh)?
:
:[perl script deleted]
:
:>Unless, of course, you don't consider perl to be a "basic" Unix tool, in
:>which case you're hopelessly behind the times.  :-)
:
:On the day when all the systems I use run perl, I'll be happy to use
:that script, but I lack the disk space and the time to install perl
:myself. And no, I get to see the new day earlier than most people at the
:moment :-)
:
:Until then, I will use my own home - cooked script, which follows. It
:will break on file names containing newlines and whitespace, but my
:filenames don't contain these :-).
:
:#! /bin/sh
:if test $# -eq 0 -o $# -eq 1 -o $# -eq 2
:then
:	echo "usage: $0 regexp newexp files" 
:	exit 1
:fi
:re=$1
:ne=$2
:shift 2
:ls $* |
:nawk \
:'$0 ~ re { var=$0
:	sub(re,ne,var)
:	print "ls",var " >/dev/null 2>&1 && echo",var,
:	"not clobbered 1>&2 || mv",
:	$0,var
:    } ' re=$re ne=$ne 

On the day when all the systems I use run nawk, I'll be happy to use that
script, but I lack the disk space and the time to install nawk myself.
Until then, all systems from any vendor used at Convex run perl by
imperial fiat, so Larry Wall's rename script works quite fine, and is in
fact installed everywhere actually, it's in a globally mounted scripts
directory, and is a version that does more error checking, understands -i,
is its own man page, etc.

Actually, I do suppose that I could run the nawk script everywhere by
running it thru the a2p translator, but since that presupposes perl
already, why bother?

--tom
-- 
    Tom Christiansen      tchrist@convex.com      convex!tchrist

God made the integers; all else is the work of Man.
                -- Kronecker
Newsgroups: comp.unix.questions
From: holger@zelator.in-berlin.de (Holger Lesch)
Subject: XOpen gencat, catopen... for sgi IRIS Indigo
Organization: Puplic-Access-Xenix-System
Date: Sun, 23 Aug 92 11:19:55 GMT


Hi there!

I'm looking for the XOpen nls-package (language independent message
catalogs) including gencat, catopen, ... for the sgi IRIS Indigo with
IRIX 4.0.1. May this be avialable as source or from sgi ?

thanx in anticipation

Holger
-- 
#############################################################
# Holger Lesch              email (privat) :                #
# Sybelstrasse 23               holger@zelator.in-berlin.de #
# W-1000 Berlin             email (non-privat):             #
# Tel. (030) 3243615                   holger@kom.sietec.de #
#############################################################
From: bosak@netcom.com (Jon Bosak)
Newsgroups: comp.unix.questions
Subject: Changing file names
Date: 20 Aug 92 06:18:14 GMT
Organization: Netcom, a Commercial Internet Service in San Jose


Here's a problem that must be very common but doesn't seem to get
discussed in books for Unix novices.

Suppose I have a directory containing files named, for example,

      xyz920815a
      xyz920815b
      xyz920816
      xyz920817
      xyz920818a
      xyz920818b

...and so on.  I want to change the names of these files to

      920815a
      920815b
      920816
      920817
      920818a
      920818b

...and so on.  Simple, right?  Just chop off the first three
characters and there you are.  But how is it done?  It's easy if you
happen to have had the foresight to use dots:

      xyz.920815a
      xyz.928815b
      &c.

Then (in csh) you could just use :r and its friends -- but if you had
that much foresight, you probably wouldn't have gotten into this mess
in the first place.  What's the answer in the general case (including
instances where the string to be modified appears in the middle of the
name)?  I have a strong intuition that it could be done using awk, but
without learning that language, I have no idea how.  Who can provide
the most elegant solution using just the basic Unix tools (cp, mv,
sed, awk, sh, csh)?

+----------------------------------------------------------------------+
 Jon Bosak  Sunnyvale, California : bosak@netcom.com  jbosak@novell.com
+----------------------------------------------------------------------+
Newsgroups: comp.unix.questions
From: zzang@whale.stat.ufl.edu (Zhuo Zang)
Subject: How to stty cbreak ?
Keywords: terminal, tty,
Organization: University of Florida
Distribution: usa
Date: Thu, 13 Aug 92 00:07:28 GMT

I tried :
>stty cbreak

but it doesn't seem work.

I can't tell whether the cbreak
mode is on or not.
(I used: stty all, stty -a.
nothing appropriate shows.)

Any help will be very much appreciated.

Thanks in advance!

zhuo
From: shah@fnsony.fnal.gov (Hemant Shah)
Newsgroups: comp.unix.questions
Subject: Re: problem with vi..
Date: 17 Aug 92 17:38:57 GMT
Reply-To: shah@fnalb.fnal.gov
Organization: Fermi National Accelerator Laboratory, Batavia, IL

In article <1992Aug17.155121.21926@njitgw.njit.edu>, cxk6819@hertz.njit.edu (K. Chandrakanth) writes:
|> Dear netters,
|> 	 I have a sparc workstation 2.
|> I mounted the floppy drive and copied few files from the floppy. But
|> when I viewed through vi I happened to see ^M at the end of each line.
|> When I cat the file it looks normal. Will some one tell me the reason
|> for this. If possible please send me a shell script or small c program
|> to remove this. I am enclosing a sample of the file.
|> 
|> 	But when I compile the file it works fine. The control characters
|> are really irritating. So help me.
|> 
|> struct employee {^M
|>     e_type typer;^M
|>     employee *next;^M
|>     char name[20];^M
|>     short department;^M
|> };^M
|> ^M
|> struct manager:employee {^M
|>         employee* group;^M
|>         short level;^M
|> };^M
|> void print_emp(employee *);^M
|> void f(employee *);^M
|> void print_emp(employee *e)^M
|> {^M
|> 
|> Please email to me. Thanks in advance...
|> 
|> cxk6819@hertz.njit.edu
|> 
|> -- 
|> god's theorem:
|> 		those who sow in tears will reap in joy.

vi the file and type following vi command:

:%s/^VM//g


where '^V' is one character <Ctrl>V
-- 
-------------------------------------------------------------------------------
Hemant Shah                            | All the opinions expressed are my own
Fermi National Accelerator Laboratory  | and does not necessarily reflect
Systems Integration Group              | those of Fermilab.
E-mail :shah@fnal.fnal.gov             |
 Voice : (708) 840-8071	               | I haven't lost my mind
   Fax : (708) 840-2783                | it's backed on tape somewhere.
-------------------------------------------------------------------------------
Newsgroups: comp.unix.questions
From: Tom Christiansen <tchrist@convex.COM>
Subject: Re: Changing file names
Originator: tchrist@pixel.convex.com
Date: Thu, 20 Aug 1992 16:10:01 GMT
Reply-To: tchrist@convex.COM (Tom Christiansen)
Organization: Convex Computer Corporation, Colorado Springs, CO
X-Disclaimer: This message was written by a user at CONVEX Computer
              Corp. The opinions expressed are those of the user and
              not necessarily those of CONVEX.

From the keyboard of nickel@cs.tu-berlin.de:
:There have some solutions been posted, which are undoubtedly suited
:for this task, but all of them used non-standard tools -- nawk, perl, ...

As Mark Bush said, I sincerely hope that the future does not mean we
must forever restrict ourselves to the tools that were available ten
years ago.  

--tom

-- 
    Tom Christiansen      tchrist@convex.com      convex!tchrist

Lawyer: n.  One skilled in circumventing the law.
		- Ambrose Bierce
From: dwatney@pine.circa.ufl.edu (Marshall Sutherland)
Newsgroups: comp.unix.questions
Subject: Followup to PC -> NCR query
Date: 18 Aug 92 14:49:53 GMT
Reply-To: dwatney@pine.circa.ufl.edu
Organization: University of Florida  (ufl.edu)
News-Software: VAX/VMS VNEWS 1.3-4

It has been correctly pointed out to me that my previous questions were
somewhat vague.  I apologize for that.  I'm sort of stuck in the awkward
position of being pressured into finding the answer when I don't know
the question and having at least 2 (and perhaps more) people in the
chain of communication between me and the people who know the missing
information.

For now all I can add is that the NCR Towers are running on a Motorola
chip (for all I know, they all do) and that its running "Unix 5.3"
(which I assume would be Sys V r3)

-----
Marshall Sutherland, Digital Magic Software Development, Inc.
dwatney@pine.circa.ufl.edu, dwatney@ufpine.bitnet, 0@arms.uucp, arms!0
Sysop, Farthinghale Arms BBS, +1 904 378 4861
Newsgroups: comp.unix.questions
From: ianh@nmpd.oz.au (Ian Holland)
Subject: Re: vi (cut and paste)
Keywords: vi
Reply-To: ianh@nmpd.oz.au
Organization: NMPD Telecom
Date: 20 Aug 92 03:04:48 GMT

sgr@alden.UUCP (Stan Ryckman) writes:

>In article <1992Aug17.200149.7817@s912%bnf.com> bibb@s912%bnf.com (Ken Bibb) writes:
>>In <3815@keele.keele.ac.uk> phd85@seq1.keele.ac.uk (D.H. Holden) writes:
>>> hi, 
>>>    Does anyone know how you cut a range of text to one
>>>    of the named buffers, where the range does not cover
>>>   an integer number of lines, i.e., 
>>>  How do i cut from here > text  text text ..........
>>>  ............... n number of lines .....
>>> ...... to here <  into the named buffer "a for example?
>>>    Cheers,
>>>              Dave.
>>In the following texT:
>>aaabbbbbb
>>bbbbbbbbb
>>bbbbccccc
>>
>>I'll assume you want to cut the b's out and save them into buffer a.
>>1) position the cursor at the beginning of the range to be cut (1Gfb will work
>>   in this example).
>>2) ma (mark the location with marker a)
>>3) move to the end of the range (Gfc will work in this example)
>>4) "ad`a will cut the range and put it into buffer a

>NOT!

I think I have worked out the English translation for this exclamation :-)

>This grabs all three full lines.  (I tried it!  Did you?)

The given example works with SunOS's vi.  Perhaps you have an inferior
version (though this makes me sick in the stomack when I think about it),
or maybe (just maybe) you used ' instead of `.

	.
	.
	.

>"Mark" (the "m" command) only marks the line, NOT the cursor
>position within the line.

This is totally incorrect.

>Am cross-posting to comp.editors, since someone there may know
>for sure whether there _is_ a way to do this, and if I'm wrong I'd
>like to know.  But please, _TRY_ it before posting!

Yes I did try the original (valid) suggestion before you read this.

best of luck,
--

- ian...

Ian Holland. NMPD, Telecom. % Ph:  +61 7 837 5075 % Explicit hoc totum,
E-Mail: ianh@nmpd.oz.au     % Fax: +61 7 837 5253 % Pro Christo da mihi potum!
From: rpinder@phad.hsc.usc.edu (Rich Pinder)
Newsgroups: comp.unix.questions
Subject: Simple AWK question.....
Date: 19 Aug 1992 23:45:08 -0700
Organization: University of Southern California, Los Angeles, CA
Distribution: world
NNTP-Posting-Host: phad.hsc.usc.edu

I'd like to reference the environment variable PWD inside an awk script.  I
wrote the following simple script to sum bytes in any given directory, and
would like the output to say:  Total Bytes in /usr/lib: 1024000 (1 MB).

Thanks for you help


......................

#	sums directory bytes (BSD)

ls -l | awk  '

		{sum += $4}

	END	{printf "Total Bytes in Directory:  %10d   (%7.1f  MB)\n", sum, sum/1024000}

-- 


Rich
From: zzang@whale.stat.ufl.edu (Zhuo Zang)
Newsgroups: comp.unix.questions
Subject: Re: Zmodem installation problem
Date: 13 Aug 92 22:36:17 GMT
Organization: University of Florida

Hello, 
Thanks for the responses !

In article <1992Aug13.183019.4034@fripp.ri.cadre.com> jh@cadre.com writes:
>In article 22845@eng.ufl.edu, zzang@whale.stat.ufl.edu (Zhuo Zang) writes:
>>Hello,
>>I try to install the Zmodem on the DECstation
>>with Ultrix 4.2 .
>>After I compiled all the programs, rz ,sz ,....
>>I ran the programs. And it doesn't work.
>>The problem seems that the Zmodem didn't 
>>direct the data flow to the serial port
>>correct, I need to set the tty somehow,
>>but I don't know how.
>
>You may be confused about how ZModem works.  It actually sends its output
>to stdout (on UNIX).  For example, when I dial into my UNIX box, I'll

I really don't have any idea how those modems work.
I thought the Kermit , Xmodem , Ymodem and Zmodem all worked
the same way. They would send the data flow to the serial port
at one end the comm line, and receive the data at the serial
port at the other end.

>type sz <filename> to initiate the download to my machine at home.  My 
>comm program then actually understands that a Zmodem transfer has started,
>and begins receiving automatically, although if yours doesn't, it can
>certainly be started manually.
>   I'm not exazctly sure what you mean by "direct the data flow to the serial
>port," though.  If you gave a little more detail as to how you're doing things,
>we might be of a little more help.
>

I use the Procomm2.4.2, which doesn't have the Zmodem. But it does
have the Kermit, Xmodem and Ymodem. and I use the Xmodem and Ymodem 
when I connect to the BBS. on Unix I am using Kermit now,
but it is slow. The Zmodem package says it also supports
the Ymodem and Xmodem. So I use sz <file> on Unix to start
downloading, and use the Ymodem in ProComm to receive <file>.
According to the Zmodem manual, the Zmodem will auto down shift
to Ymodem, if it finds the other end doesn't support the Zmodem.
However, nothing is transmitted in this way.

Since all the data flow should be transmitted thru the serial port
when we use the modem to connect to the Unix, I doubt that
the Zmodem had sent the data to somewhere else, not the serial port.

>---
>Joe Hartley          | jh@cadre.com  -  Whenever you find that you are on the


zhuo
Newsgroups: comp.unix.questions