Subject: Linux-Misc Digest #721
From: Digestifier <[email-masked]>
To: [email-masked]
Date: Wed, 7 Sep 94 10:13:20 EDT

Linux-Misc Digest #721, Volume #2                 Wed, 7 Sep 94 10:13:20 EDT

Contents:
  Why Linux can't do that? (Thomas Papanikolaou)
  How to find out available memory? (Ivica Rogina)
  jlisp under linux? (Maurycy Szmurlo)
  Linux 1.1.8 vs 1.0.8 (Terence Tan)
  Re: Unix programming question (Erik Corry)
  Exercise for Experts (David Anderson)
  Re: Required: Prolog (Eelco H. Essenberg)
  Re: OS/2 vs. Unix Which one is better and why??? (Owen Lynn)
  lpr and hp520 (Timothy Cullip)
  Re: 1.7MB+ format help wanted... (David C. Niemi)
  Re: FTAPE...Im' soo close, yet so far???? (Abhinandan Jain)
  Re: gcc 2.5.8 / g++ with -g does fail on XOpenDisplay( ) ?! (Mitchum DSouza)

----------------------------------------------------------------------------

From: [email-masked] (Thomas Papanikolaou)
Crossposted-To: comp.lang.c,comp.os.linux.help,comp.lang.c++
Subject: Why Linux can't do that?
Date: 7 Sep 1994 07:58:41 GMT

Hello everybody

I have a C++ class called bigint which has some I/O member functions like

/**
  ** using fread/fwrite
  **/

  void read_from_file(FILE * fp);
  void write_to_file(FILE * fp);

  /**
  ** using fscanf/fprintf
  **/

  void scan_from_file(FILE * fp);
  void print_to_file(FILE * fp);

I tried to port this to an Intel 468 running Linux; well the compilation
is done without warnings but at linking in a program like 

  ...
  bigint I;
  I.scan_from_file(stdin);
  ...

I get the error message

bigint_appl.c:187: cannot lookup method in incomplete type `_fake_filebuf'

I looked in the stdlib.h an I have seen that stdin, stdout, stderr are
typedef'ined to this struct.

Question
========

Is there a library I have to link explicitly or another include file (I include
only stdlib.h stdio.h)

I would appreciate it if you would answer by email 
([email-masked])

Thank you in advance for any suggestions,

Thomas

-- 

Thomas  Papanikolaou             +49  681 302-4166       (office)
Max   -   Braun    1             +49  681   684430         (home)
D-66123 Saarbruecken             [email-masked]

-- 

Thomas  Papanikolaou             +49  681 302-4166       (office)
Max   -   Braun    1             +49  681   684430         (home)

------------------------------

From: [email-masked] (Ivica Rogina)
Subject: How to find out available memory?
Date: 7 Sep 1994 10:55:34 GMT
Reply-To: [email-masked] (Ivica Rogina)

How can I find out how much physical memory is left for some process to use.
Depending on the shell under which a program is running, it can allocate up to
3 gigs of memory. Trying to access them just makes the process eat up 
swap pages and almost stop the entire system. Is there a way how malloc() will
return no more then RAM + SWAP - ALREADY_USED_BY_OTHER_PROCESSES ?
When fooling around with malloc(), I can even cause segmentation faults and
similar errors without ever doing anything illegal. This behaviour of the
system is really annoying, since I'd like run quite big processes without
paralizing my entire machine.

Ivica                                                   [email-masked]

------------------------------

From: [email-masked] (Maurycy Szmurlo)
Subject: jlisp under linux?
Date: 7 Sep 1994 13:11:20 +0200

Anybody around here compiled jlisp under linux?
I tried but gcc reports some errors and I don't have
the time to look in the sources.

If anybody did modify the sources for linux and/or
has allready compiled version I would be
thankfull to send me mail

thanks in advance
--------------------------------------
Maurice Szmurlo                           
[email-masked]
=======================================

------------------------------

From: [email-masked] (Terence Tan)
Subject: Linux 1.1.8 vs 1.0.8
Date: Tue, 6 Sep 1994 03:16:38 GMT

Just a word of caution for all Linux users out there using v1.0.8 and
are going to upgrade to v1.1.8.. The SLIP support seems to be broken..
I upgraded and every 5 minutes the modems and dip will just hangup on
each other... I am going to try v1.1.45 and if it doesn't work does
anybody know where to report this bug too.

------------------------------

From: [email-masked] (Erik Corry)
Subject: Re: Unix programming question
Date: Wed, 7 Sep 1994 03:29:36 GMT

Al Longyear ([email-masked]) wrote:
: [email-masked] (Van Dao Mai) writes:

: >I have programmed UNIX for a long time and feel frustrated with the way
: >software is installed on the system. Under UNIX people often have to 
: >hardwire the paths and settings into the executable at compile time.
: >This is in contrast with DOS that passes the full path name of the execuatble
: >as argv[0] so that you can search for library + data files. 

: >This is why DOS programmers can install all needed files into one
: >directory making it easier to maintain and backup. In UNIX after a while
: >you have no idea where to find the files. You also have binary
: >distribution problem where you have to make so many links and forget about
: >them. 

: Just because your program is running does not mean that the code file
: is still addressable under the name that you have in argv[0]. The argv
: vector is simply that -- arguments. There is absolutely no requirement
: that argv[0] even contain the name of the program. Several programs
: even use it for an additional argument.

: Let's face facts. UNIX is not MSDOS. You are not alone in the computer. An
: other program running in the system may change the configuration information
: which will make the data in argv[0] meaningless.

Despite this, Lucid Emacs is able to do just what the original poster wanted,
and it seems to work. Since source is available, there's nothing to
stop anyone looking how it was done.

-- 
Erik Corry, Skagerrakstr. 2, 79100 Freiburg, Germany, +49 761 406637
[email-masked]

------------------------------

From: davida@PROBLEM_WITH_INEWS_GATEWAY_FILE (David Anderson)
Subject: Exercise for Experts
Date: Wed, 7 Sep 1994 11:53:30 GMT

Like many others, I'm looking to buy a PC to put Linux on. I'm reading
all the FAQs HOWTOS etc, and getting a lot of information. However,
I'm still finding it difficult to make a decision about what to buy,
especially in the area of Bus/Graphics/SCSI etc.

It would be *really* useful to me, and I suspect to quite a few
others, if a few experts would be kind enough to give their definitive
opinion on final configuration for a system. What I'm thinking of, is
describing three different configurations, one for beginner, one for
intermediate and one for advanced, all giving the best performance for
that level.

The criteria being that the beginner system should be : buy it,
install Linux (pref from CD) and start using straight away with the
minumum of problems. The advanced system might include things which
are semi or nearly supported (MACH64 ??), which need a bit of messing
about, but probably give you better performance.

I would be really grateful for opinions on this. As a starting point,
the system I would really like to buy right now (but am a bit worried
about problems) is:

Pentium 90MHz (P54c) PCI
16 MB
ATI MACH64 graphics card
Adaptec 2942 PCI SCSI or BUS LOGIC BT-946C controller
Disk > 1.0GB SCSI
17 inch Monitor
Twin speed Panasonic CDROM
Galaxy Pro 16 soundcard

I'm not really interested about windows or Dos performance (I will use
them but Linux is the most important)

Thanks a lot in advance.
Dave

*My views not Compaqs

------------------------------

From: [email-masked] (Eelco H. Essenberg)
Subject: Re: Required: Prolog
Date: Wed, 7 Sep 1994 11:45:20 GMT

In article <[email-masked]>,
Paul J. Nolan, Dept. of Mech. Eng., University College Galway, Ireland <[email-masked]> wrote:
>Hi,
>
>I am having great difficulty getting a version of Prolog to build on my 
>linux machine.  I've tried five of six different versions, all to no avail.
>The build problems were sticky ones which I couldn't simply resolve either.
>I even had one which offered a `linux specific' configuration but that was for
>a v0.99 kernel and wouldn't build either.
>
>To summarise: I am running Linux 1.08 and if you have a version of Prolog
>              which will run on my system, contact me by e-mail and I will
>              tell you how best to send it to me.
>
>Thanks a lot in advance, this is really driving me crazy.
>
If you haven't tried it already I would advise SWI-Prolog. It is a fairly nice
Prolog environment, and it compiled under different versions of Linux for me
(at least 0.99.14 and 1.0; the version I compiled with Linux 1.0 also runs
under Linux 1.1.19).

SWI-Prolog is available from ftp.swi.psy.uva.nl, can't remember the directory.
They also store a readline library for Linux somewhere, get it as well.

>Kieran.

Good luck!
Eelco.
>
>Kieran Coughlan
>Department of Mechanical Emgineering
>University College Galway
>Ireland
>[email-masked] or [email-masked]

-- 
==========================< Eelco Essenberg >===============================
[email-masked]                            [email-masked]
                      FTP Manager: ftp.twi.tudelft.nl
   <a href=http://www.twi.tudelft.nl/People/E.Essenberg.html>Click me!</a>

------------------------------

Crossposted-To: comp.os.os2.advocacy
From: [email-masked] (Owen Lynn)
Subject: Re: OS/2 vs. Unix Which one is better and why???
Date: Wed, 7 Sep 1994 04:08:49 GMT

In article <[email-masked]>,  <[email-masked]> wrote:
>       I'm having an argument with my friend here at Virginia Tech, and I
>need some expert opinions. Please read and reply.
>
>Here's the scenario:
>
>My friend (let's call him Bob) has a computer (486-33) with 8 MB of RAM and
>a 200 meg HD.  I on the other hand, have a 486-66 w/16 mb of RAM.
>
>I run OS/2 on my machine.  Up until recently, he ran DOS/Windows.  He recently
>installed Linux on his machine.

Linux isn't exactly U*IX, but it's pretty damn close. It's a full
implemetation of the POSIX spec, with SysV and BSD extensions.

>He's doing this because he "wants to learn more about his computer."
>He says that by using Unix, he's learning things about his computer that he
>wouldn't learn otherwise.  This is partially true, IMO, because by running
>into all the problems of getting Unix off the ground, he's learning a lot
>about his computer (i.e. the hardware specs).
>
>My major pet peeve is when someone comes up to me and says "hey I have Unix
>so I'm better than you and so is my computer."  Well maybe, but hey he
>can't run Microsoft Office, or use multimedia or even run the DOS apps
>required for engineering classes here.  No Xwindows, no graphics, right?
>In the mean time, I'm running all my Windows and DOS apps, and getting the
>benefit of crash protection and true multitasking (and all other good
>stuff with OS/2).

Linux has DOSEMU and wine, but neither are out of the beta stage yet.
You can make a good point for DOS/Win compatibility for OS/2, and a
point about better multimedia support, but Linux 1.0.x is just as stable,
has better memory protection (granted, you can get the same protection
in OS/2 if you set IOPL=no, but some sound drivers may not work).
There's a package for Linux that will let you run SCO binaries, if you're
concerned about having shrinkwrap apps. 

>Bob has a friend who has a 486 and Linux.  What is it that he can "do" with
>a Linux machine that is really productive?  Bob says that his friend does
>"all sorts of things" with his machine.

Where Linux really shines is in its *free* TCP/IP package. You can do
Mosaic native, telnet, ftp, nn, tin, trn, sendmail, cnews, pine, etc.
Running remote X clients is *way* faster under Linux than under OS/2.

>What I want to know is:
>1) Why do CS majors here use Unix?  What is it that is so great about Unix
>   that can't be done with OS/2?  No flames on this one.

Unkludged security. Multiuser capability. POSIX compliance (linux).
Source code free and clear (linux and FSF GPL). It boots! (OS/2 since
v2.11 has required me to hack the install procedure to get OS/2 to
boot - it's the broken aha152x.add problem, and it doesn't look like
IBM is ever going to fix it)

>2) Isn't the lack of "killer" apps a good reason not to use Unix?

Use the tools that get your work done. I liked OS/2, when I didn't 
have a net connection. I got a net connection, and my needs/desires 
started changing - Linux has more power and flexibility when it comes
to talking with the net. And it's light on the wallet, which is a big
plus for me. 

[snip]

>My reasoning is that he should just stick to learning about computers in a
>conventional way (reading mags and books and online literature, and taking
>classes) rather than wasting his time by fooling around with Unix.

I think learning about how OSes work is a worthy pursuit, and not a
waste of time. In the docs that come with the _Linux Kernel Hacker's
Guide_ they mention several books which you should read first, but
after that, the only way to learn is to fool around :).

>I know for a fact that you can't learn Unix (I mean learn it really well)just
>by fooling around with it.  So what's the point?

That's not a fact, it's an opinion.

-- 
Owen fnord Lynn          | Hi Bill, Have you met Linus Torvalds? He's the
[email-masked]  | man who can write a *true* POSIX compliant, secure
[email-masked]   | *multiuser*, multithreaded/multitasking OS that runs
Ask me for my PGP23a Key | in 2Mb. Linux - an open system for free minds. 

------------------------------

From: [email-masked] (Timothy Cullip)
Subject: lpr and hp520
Date: 7 Sep 1994 12:40:29 GMT

I almost hate to ask this question since my linux version is ancient (0.98
I think) and I don't remember the history of my lpr/lpd/etc package, and I
don't claim to understand the intricacies of printcaps, but I'll ask it
anyways.

I just recently got an hp520 ink jet printer (mostly for my wife's DOS/WINDOWS
wordprocessing use) and I'd like to at least get it to be able to print out
simple text files under Linux.

If I use a printcap entry that looks like:

lp:lp=/dev/lp0:sd=/usr/spool/lp0:lf=/usr/adm/lpd-errs:sh

and I have a text file (called text_file) that looks like:

this is a
test of my printer
too bad it doesn't work

and I do "lpr text_file" it prints to the page like:

this is a
         test of my printer
                           too bad it doesn't work

Well, my first thought was that I could write a real simple output filter
program (called filter) that outputs a carrage return every time it sees a line
feed. So I wrote one that reads from standard in, writes to standard out, and
inserts carrage returns. In fact if I do "filter < text_file > /dev/lp0" it
prints out just like I'd expect. So I figured, I'd modify the printcap as
follows:

lp:lp=/dev/lp0:sd=/usr/spool/lp0:lf=/usr/adm/lpd-errs:of=/usr/etc/filter:sh

where the filter program had the path /usr/etc/filter. 

Well, I must have a very bad understanding of printcaps and output filters
because this didn't work at all. Now if I do "lpr text_file" nothing happens.
Nothing is printed on the printer, no errors are printed on the screen, no
errors logged to lpd-errs. All that happens is I get my bash prompt back.
If I do an "lpq" it tells me there are no entries in the queue (and sure
enough /usr/spool/lp0 doesn't have any files queued up).

It also doesn't help to change the "of=" to an "if=" in the printcap. It's as
though the filter program isn't called at all (I tried putting some statements
into the filter program that opens a temporary file, writes something to it,
and closes it.  When I ran "lpr text_file" I don't get that temporary file
created, which indicates to me that the filter program wasn't even started.

So my question is, what did I do wrong? Anybody have a solution for me?
Anyone have an hp520 filter/driver/whatever for lpr under linux?

-- 

   Tim Cullip
   [email-masked]

------------------------------

From: [email-masked] (David C. Niemi)
Subject: Re: 1.7MB+ format help wanted...
Date: 7 Sep 1994 03:37:26 GMT
Reply-To: [email-masked]

In article [email-masked], [email-masked] writes:
>       I would like information on how to set the /etc/fdprm file
>to hold the correct formats for the 1.7mb and 1.9mb disks (and any other
>high-density formats).  I'm using Slackware 2.0.0 and Linux kernel 1.0.9.

Kernels prior to 1.1.41 do not support higher-capacity floppy densities.
There are some patches to get up to 1.68MB (21 sectors) on a 1.44MB floppy
on prior kernels; 1.1.41 through 1.1.49 support these formats and up to
24 sectors equivalent (1.92 MB).

However, be warned that 1.1.x kernels are development kernels, not for
the casual user and not without risk.  If you do feel up to doing kernel
testing, make sure you get 1.1.49 or later; and get the "util" and new
"mtools" versions that go with it (on sunsite.unc.edu in /pub/Linux/kernel/patches/diskdrives/fdpatches-3.1-for-1.1.38.src.tar.gz).
Ignore the kernel patch, as it is already folded into the latest kernels.

If you don't feel confident experimenting with new kernels that could
potentially cause you serious problems, I suggest you wait for 1.2.0 of
the kernel to come out.

>       I'd like to see the parameters posted to the group, along with
>any other info related (e.g. reliability) on this topic.

I'm not sure /etc/fdprm is even needed any more; there's also /etc/mtools
that actually gets in the way (e.g. on Extra Density 3.84 MB disks).
=================================================================
David C. Niemi (SLMA, Herndon, Virginia, USA)    [email-masked]
Know the difference between the color of the wine and the color of
the glass.  (Jalaluddin Rumi)
==================================================================

------------------------------

From: [email-masked] (Abhinandan Jain)
Crossposted-To: comp.os.linux.admin
Subject: Re: FTAPE...Im' soo close, yet so far????
Date: 05 Sep 1994 13:57:03 GMT

>>>>> "Michael" == Michael James Porter <[email-masked]> writes:
In article <[email-masked]> [email-masked] (Michael James Porter) writes:

    Michael> Define FLOPPY_HACK, I think.
    Michael> In article <[email-masked]>,
    Michael> RYAN  Colin Patrick <[email-masked]> wrote:
    Michael> =>Hello,
    Michael> =>
    Michael> =>
    Michael> =>I'm trying to get ftape to go and have run into a snag. I have kernel 1.0.0, 
    Michael> =>ftape -1.13.b and modutils 0.99.15.pl1. I have succesfully complied the 
    Michael> =>modules and went throught the drv. hello world test without any problems.
    Michael> =>I'm pretty sure that make made it to the end of the compile as ftape.o does
    Michael> =>exist. The problem is when I do 'insmod ftape.o'. I get:
    Michael> =>
    Michael> =>darkstar:/usr/src/ftape-1.13b# insmod ftape.o
    Michael> =>_enable_irq undefined
    Michael> =>_disable_irq undefined
    Michael> =>_free_dma undefined
    Michael> =>_free_irq undefined
    Michael> =>_request_dma undefined
    Michael> =>_irqaction undefined
    Michael> =>
    Michael> =>Whats up??
    Michael> =>
    Michael> =>Thanks ahead....Colin Ryan: [email-masked]
    Michael> => 
    Michael> =>
    Michael> =>

Make sure to use gcc 2.5.8. Earlier versions lead to this problem.

--
Abhinandan Jain                    Jet Propulsion Laboratory
[email-masked]     4800 Oak Grove Drive, Pasadena, CA 91109

------------------------------

From: [email-masked] (Mitchum DSouza)
Subject: Re: gcc 2.5.8 / g++ with -g does fail on XOpenDisplay( ) ?!
Date: 7 Sep 1994 13:16:26 GMT

In article <[email-masked]>,
[email-masked] (Michael Will) writes:
|> Well, if I compile the objectfiles with -g and link without -g it works,
|> I can debug and all.

Please give the *exact* messages yoy get when compiling with -g.

Mitch

------------------------------

** FOR YOUR REFERENCE **

The service address, to which questions about the list itself and requests
to be added to or deleted from it should be directed, is:

    Internet: [email-masked]

You can send mail to the entire list (and comp.os.linux.misc) via:

    Internet: [email-masked]

Linux may be obtained via one of these FTP sites:
    nic.funet.fi				pub/OS/Linux
    tsx-11.mit.edu				pub/linux
    sunsite.unc.edu				pub/Linux

End of Linux-Misc Digest
******************************