Linux-Misc Digest #330, Volume #21                Sun, 8 Aug 99 12:13:08 EDT

Contents:
  Re: C structure size inconsitency (Floyd Davidson)
  Re: PATH is going wild (Floyd Davidson)
  Re: Extract the first n characters from a stream? ([EMAIL PROTECTED])
  lilo parameters problem ("Elya Guyer")
  Re: How to install CLE 8.0 in SuSE 6.1 (Heeeeeeeez back!)
  Re: Ghostly modules still cry for life (too dramatic?) (Jon Bloom)
  startx -- -bpp 16.....too long to type (Nevyn)
  Re: C structure size inconsitency (Floyd Davidson)
  Re: nfs problems under RH6 (Wolfgang Denk)
  Re: DDS-3 SCSI Tape Drive + Red Hat 6.0 (Wolfgang Denk)
  wheelmouse with knews ? (Christophe Zwecker)
  Re: Installing uncompress (Gary Momarison)
  Re: sndconfig, cron problems (Robert McGwier)
  Re: Linux Games ("akm76")
  Re: CDROM driver not supported in RH 6 install ("Bowyer")
  Need help on installing patches.. (Warren)
  Re: startx -- -bpp 16.....too long to type (Mark Slagell)
  Re: mkbootdisk on different machine (Leonard Evens)
  Re: CDROM driver not supported in RH 6 install ("Walt and Denise Fles")
  Re: C structure size inconsitency (Frank Sweetser)
  Re: help recovering disk space (Leonard Evens)

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

From: [EMAIL PROTECTED] (Floyd Davidson)
Subject: Re: C structure size inconsitency
Date: 8 Aug 1999 11:49:37 GMT
Reply-To: [EMAIL PROTECTED]

 Andreas Hinz <[EMAIL PROTECTED]> wrote:
>Compiling the following:
>------------------------
>#include <time.h>
>#include <stdio.h>
>
>
>struct Test0 {
> char X0[4];
> char X1[100];
> char X2;
> char X3[100];
> char X4[2];
> char X5;
> char X6;
>} T0;
>
>
>struct Test1 {
> time_t X0;
> char X1[100];
> char X2;
> char X3[100];
> char X4[2];
> char X5;
> char X6;
>} T1;
>
>struct Test2 {
> time_t X0;
> char X1;
> char X2;
> char X3;
> char X4;
> char X5;
> char X6;
>} T2;
>
>
>void main(void)

The ISO/ANSI C standard requires that main() return type int.
Defining main() to return void invokes undefined behavior unless
it is documented by the compiler (and with gcc it is not).

>{
> fprintf(stderr,"%i, %i, %i, %i \n",sizeof(time_t), sizeof(T0), sizeof(T1),
>                                    sizeof(T2));
>}
>-------------------------------------
>
>
>Running the compiled result, 'x', gives the following results:
>
>  4, 209, 212, 12
>
>
>I don't get it. It should have been
>
>  4, 209, 209, 10
>
>
>Can anyone explain this to me, please?
>I first thougt it was some byte alignment, but that does not make sense
>since the structs T0 and T1 should be exact the same size.

Indeed it is byte alignment!  At the end of the structure,
allowing the next object to begin on a appropriately aligned
address.

Here is a replacement main() function which you can use to
demonstrate where the padding is inserted.



#include <stddef.h>

int
main(void)
{
  fprintf(stderr,"%u, %u, %u, %u \n",
    sizeof(time_t),
    sizeof(T0),
    sizeof(T1),
    sizeof(T2));

  fprintf(stderr, "%u %u %u %u %u %u %u\n",
   offsetof(struct Test2, X0),
   offsetof(struct Test2, X1),
   offsetof(struct Test2, X2),
   offsetof(struct Test2, X3),
   offsetof(struct Test2, X4),
   offsetof(struct Test2, X5),
   offsetof(struct Test2, X6));

   return 0;
}

  Floyd

-- 
Floyd L. Davidson                          [EMAIL PROTECTED]
Ukpeagvik (Barrow, Alaska)


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

From: [EMAIL PROTECTED] (Floyd Davidson)
Subject: Re: PATH is going wild
Date: 8 Aug 1999 12:09:18 GMT
Reply-To: [EMAIL PROTECTED]


scable  <[EMAIL PROTECTED]> wrote:
>When I log on, my system (RH 6.0) goes hog wild and gives me a PATH that
>is five screen lines long.  Most of it is the same path elements
>repeated over and over again.  I have tried to find whether I have some
>sort of loop, for example, between local and global bashrc files, but I
>can't find anything of the sort.  Anybody have an idea what else could
>give rise to this curious behavior?
>
>Thanks.

If you make additions to the PATH variable with a statement like,

   PATH=~/bin:/usr/local/bin:$PATH

in the wrong place it will indeed become a loop.  Files
/etc/profile and the first of ~/.bash_profile, ~/.bash_login or
~/.profile that is found will be sourced by the login shell, and
using a recursive assignment will be fine in one, and only one,
of those files.  

But if that is in ~/.bashrc or the file specified by ENV it will
be added again each time a subshell is spawned.

  Floyd


-- 
Floyd L. Davidson                          [EMAIL PROTECTED]
Ukpeagvik (Barrow, Alaska)


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

From: [EMAIL PROTECTED]
Crossposted-To: comp.os.unix.misc
Subject: Re: Extract the first n characters from a stream?
Date: 8 Aug 1999 12:50:49 GMT

Kenny Zhu Qili <[EMAIL PROTECTED]> writes:

>Jon Skeet <[EMAIL PROTECTED]> wrote:
>> Um, I expect head will do what you want it to.

>But the SUN version of head can't specify number of characters or bytes.
>Any other ideas?

dd bs=nnn count=1

--
        Amos Shapir
Paper: nSOF Parallel Software, Ltd.
       Givat-Hashlosha 48800, Israel
Tel: +972 3 9388551   Fax: +972 3 9388552        GEO: 34 55 15 E / 32 05 52 N

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

From: "Elya Guyer" <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.setup,comp.os.linux.admin
Subject: lilo parameters problem
Date: Sun, 8 Aug 1999 16:00:03 +0200

  Hello!
  I'm running Suse 6.1 linux with Suse precompiled 2.0.36 kernel ( because
of production need)
I'm trying to load the kernel with "mem=62M"  option , but it seems lilo
simply cannot transfer this or any other parameter to the kernel. I tried to
install lilo version 20 ( which was running ok.
with kernel 2.0.36 on Suse 6.0) but still Lilo doesn't seem to transfer
parameters to the kernel.
Any ideas would be greatly appreciated.At least how can I trace the lilo
treat of parameters?

Thanks in advance
Elya Guyer




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

From: Heeeeeeeez back! <[EMAIL PROTECTED]>
Subject: Re: How to install CLE 8.0 in SuSE 6.1
Date: Sun, 8 Aug 1999 13:33:13 +0100

Billy Lau <[EMAIL PROTECTED]> wrote:
> HI,

> I'm a newbie in using Linux.
> I got a CLE 8.0 for SuSE 6.1 but didn't know how to install and activate it.
> Does anyone has successfully work around with it and point out the steps to
> me.

What's CLE? What form did it come in? (RPM, TAR, ZIP?, Executable? Source?)

-- 
______________________________________________________________________________
| [EMAIL PROTECTED] | "Are you pondering what I'm pondering Pinky?"  |
|    Andrew Halliwell BSc   |                                                |
|             in            | "I think so brain, but this time, you control  |
|      Computer Science     |  the Encounter suit, and I'll do the voice..." |
==============================================================================
|GCv3.12 GCS>$ d-(dpu) s+/- a C++ US++ P L/L+ E-- W+ N++ o+ K PS+  w-- M+/++ |
|PS+++ PE- Y t+ 5++ X+/X++ R+ tv+ b+ DI+ D+ G e++ h/h+ !r!|  Space for hire  |
==============================================================================

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

From: Jon Bloom <[EMAIL PROTECTED]>
Subject: Re: Ghostly modules still cry for life (too dramatic?)
Date: Sun, 08 Aug 1999 09:41:57 -0400

kgb wrote:
> 
>     I had said I disabled APM in the kernel, since it smacked of laptops,
> well, aparently my previous kernel used APM. No failures, just this. When I
> boot, even though I have my system map changed, it screams something along
> the lines:
> 
> Starting APM daemon:
> [FAILED]
> 
>     And then happily boots along as if it never happened. Just to make it
> happy I'm thinking about compiling again, this time WITH APM. But... Since
> it appears I don't need it... Why add it's size? Why is it still insisting
> on starting the APM daemon that was at first part of the kernel? I'm
> guessing a config, file, or another related boot file either in /etc or
> /boot.

That's happening because the init scripts are trying to start apmd. You
can use the runlevel editor in control-panel to remove apmd.

Jon
--
Jon Bloom, KE3Z
[EMAIL PROTECTED]
Electronic Publications Manager (Software, CD-ROMs and Web site)

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

From: Nevyn <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.x
Subject: startx -- -bpp 16.....too long to type
Date: Sun, 08 Aug 1999 16:23:05 +0100

i want to keep using startx to start x but i like to start it like
above, and would like to know if i can modify a file so i can go back to
just typing startx but still getting the better colour depth....any
ideas??

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

From: [EMAIL PROTECTED] (Floyd Davidson)
Subject: Re: C structure size inconsitency
Date: 8 Aug 1999 13:27:20 GMT
Reply-To: [EMAIL PROTECTED]

Andreas Hinz <[EMAIL PROTECTED]> wrote:
>Gergo Barany <[EMAIL PROTECTED]> wrote:

>>Why stderr?
>
>Because 'printf(' and 'fprintf(stdout' dosn't print anything on the sreeen.
>I don't know why.

I can see no reason for that to be the case.  I also see no
problem with using output to stderr either.

>>It doesn't matter what you think it should be.  
>
>It most certainly does. If I create a file with a specific
>data structure, an other program can not read this file
>correctly.  And exactly that is the problem.
>
>Creating a file with the above data structure in DOS and
>reading it in Linux fails because of this.
>
>I just want to know why it does it and what the system behind
>this is.  So i can find a solution.

The C standard does not provide for portable binary structure
formats across different platforms, or even between different
versions of the same compiler on any given platform.  You can
write a binary copy of a structure to disk for a temporary file
that will be read back in by the same process, but you cannot
expect even the same program running at some later date to
properly read the file.

Typically to save data to disk requires a conversion to an
ascii format.

>>If your program relies on a specific size for structs, you are
>>probably doing something wrong.
>
>Why? Do you see anything wrong with the shown structures? I
>don't.

The "something wrong" is relying on a specific sized binary
format for a struct between processes (and in this case between
platforms).  The guaranteed characteristics of a struct are that
the first member starts at the beginning of the struct, and that
all members follow in order.  There are no guarantees about the
size of members, the binary formatting of members, or about
padding between members.  As I noted previously in another
article, there is a system specific macro, "offsetof" which will
provide the offset into a struct for each member.

For a more authorative answer you might want to post a query
in comp.lang.c, where there are a number of experts (including
a few members of the C Standards committee) who can provide
much greater detail.

  Floyd





-- 
Floyd L. Davidson                          [EMAIL PROTECTED]
Ukpeagvik (Barrow, Alaska)


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

Crossposted-To: comp.os.linux.help,comp.os.linux.questions
From: Wolfgang Denk <[EMAIL PROTECTED]>
Subject: Re: nfs problems under RH6
Date: Sun, 8 Aug 1999 13:49:05 GMT

Terence Tse <[EMAIL PROTECTED]> writes:

>Seems that you have not answered "y" or "m" for nfs server support.
>Be reminded, the make config script will skip "nfs server support" if you
>answer "n" with Experimental kernel at the very beginning.

...which is a bug, IMHO.

Wolfgang

-- 
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: -88  Home: -86  Email: [EMAIL PROTECTED]
"Open the pod bay doors, HAL."                    - Dave Bowman, 2001

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

Crossposted-To: comp.os.linux.hardware
From: Wolfgang Denk <[EMAIL PROTECTED]>
Subject: Re: DDS-3 SCSI Tape Drive + Red Hat 6.0
Date: Sun, 8 Aug 1999 13:47:35 GMT

yan seiner <[EMAIL PROTECTED]> writes:

>I use the wangtek with no problems.  The tapes seem to have a high
>failure rate, though - two out of 8 failed in 6 months.

How often do you use a cleaning cartridge?

>Is this normal for a DDS-3?

No.

Wolfgang

-- 
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: -88  Home: -86  Email: [EMAIL PROTECTED]
HR Manager to job candidate "I see you've had no  computer  training.
Although  that  qualifies  you  for upper management, it means you're
under-qualified for our entry level positions."

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

From: [EMAIL PROTECTED] (Christophe Zwecker)
Subject: wheelmouse with knews ?
Date: 8 Aug 1999 16:34:21 +0200

Hi,

got imwheel and it works via xrdb file wit emacs and netscape, does
anyone have it running with knews ?

thx for help
bye
-- 
Christophe Zwecker                     mail: [EMAIL PROTECTED]
Hamburg, Germany                        fon: +49 179 3994867

UNIX is user-friendly. It's just not ignorant-friendly and 
idiot-friendly.Build a system even a fool can use,and only 
a fool will want to use it.

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

Subject: Re: Installing uncompress
From: Gary Momarison <[EMAIL PROTECTED]>
Date: 08 Aug 1999 07:46:50 -0700

[EMAIL PROTECTED] writes:

> I am trying to find a copy of uncompress for a MIPS machine running
> Linux.  I am installing Excite for Web Servers on the machine, but the
> installer for EWS won't run without a copy of uncompress on the machine.
> I know gunzip is usually the preferred program, but this installer just
> won't run without uncompress.  I've found come uncompress binaries for
> Linux, but they don't work on a MIPS machine (the Cobalt RaQ 2).  Any
> help with finding a copy of uncompress for MIPS or one that I can just
> compile myself would be greatly appriciated.

My "uncompress" is part of Red Hat's "ncompress" RPM.  There should be
a source code version of that RPM at their site.

I'd first try just making a link from "uncompress" to "gunzip" since
"gunzip" can uncompress a file made with "compress".  Maybe EWS is
just looking for a particular program name and doesn't really care
what the program really is.

-- 
Look for Linux info at http://www.dejanews.com/home_ps.shtml and
Gary's Encyclopedia at http://www.aa.net/~swear/pedia/index.html

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

From: Robert McGwier <[EMAIL PROTECTED]>
Crossposted-To: linux.redhat.misc
Subject: Re: sndconfig, cron problems
Date: Sun, 08 Aug 1999 14:52:04 GMT

Almost all of these sound like directly or indirectly related to
loss of the PATH variable in your environment but YES it sounds like
your environment is messed up.  insmod command not found and having
to type ./sndconfig , etc. are all symptomatic of having lost the
environment.

Bob

[EMAIL PROTECTED] wrote:
> 
> Greetings!
> 
> I'm having various problems with my new install (2nd try) of RedHat v.
> 6.0; I'll start with a couple.
> 
> [1] I'm trying to run sndconfig.
> 
> [1.1] On my first install, I could invoke it at the command-line without
> full pathname, but now I need a full pathname; I'm wondering if my
> environment is screwed somehow.
> 
> [1.2] More seriously, it doesn't effortlessly configure the soundcard the
> way it did the first time; ok, a big change is that I now have the
> ethercard installed. I diddle with the irqs and get to the 'test sound'
> screen when it says:
> 
>     "sh: insmod command not found
>     ad 1848: no such file or directory"
> 
> Is this due to some kind of path problem? (I've forgotten where insmod is
> but it's installed alright.)
> 
> [2] Zgv is revealing some bugs (?)
> 
> [2.1] I can run zgv but there's a mess of error screen messages I see
> after it closes, referring to parity errors involving ncr53c876-0, and it
> says it's 'downloading scsi scripts'. This seems to be referring to my
> tekram scsi adaptor.
> 
> [2.2] It also refers to "unknown chipset Oak driver"??
> 
> [3] Cron is unavailable? I realize I'm not sure about this and will have
> to reboot to Linux but let me mention it. I wanted to run
> /etc/cron.daily/updatedb.cron since my locate command ('file or directory
> not found') doesn't seem to work. The system can't find it.
> 
> Ok, that's a bunch of things. I'd really like to solve the sound
> configuration issue and the cron issue. I don't know enough to
> troubleshoot very wisely, and I wouldn't want to reinstall yet again.
> 
> Thanks!
> 
> Felmon
> 
> -----------------------------------------------------------
>       Felmon John Davis
>      [EMAIL PROTECTED]   |  [EMAIL PROTECTED]
>      Union College /  Schenectady, NY
>      - insert standard doxastic disclaimers -
>      OS/2 - ma kauft koi katz em sack
> -----------------------------------------------------------

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

From: [EMAIL PROTECTED] ("akm76")
Subject: Re: Linux Games
Date: 8 Aug 1999 15:29:02 GMT

In article <KWFp3.168$[EMAIL PROTECTED]>, "Michael John" <[EMAIL PROTECTED]> 
writes:
|: Hi all, I realize most of you are using Linux for serious reasons; The web,
|: intranets, SendMail, etc. I'm a new user of Caldera's Open Linux 2.2 and
|: really would like suggestions on some good Linux games.
|: I know of www.happypenguin.org and other Linux games sites.
|: What I'd like is some feedback on the games you all play.
|: I have an overclocked P200MMx (to 225) and a voodoo 4 meg card as well.
|: Please post your favourite games as this will immensly help a project of
|: mine.
|: Thank you very much!!
|: Michael

FreeCiv 1.8 rocks! 
Much nicer graphics(than 1.7), fully customizable, and
as far as i noticed it lacks only one feature of civ ii -
you can't negotiate with AI's.
Of course the GUI looks slightly poorer than civ ii,
and you don't have those movies, but you're getting used to
it very fast, cause it's just a good game, imho.
Cheers


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

From: "Bowyer" <[EMAIL PROTECTED]>
Crossposted-To: 
alt.linux,alt.os.linux,comp.os.linux.hardware,comp.os.linux.setup,linux.redhat.misc
Subject: Re: CDROM driver not supported in RH 6 install
Date: Sun, 8 Aug 1999 22:54:04 -0400

The installation gave me the following choices.  I've also listed what
happened:

Aztech CD                          autoprobe failed
Backpack CDROM           autprobe failed
Goldstar R420                   autoprobe failed
Misumi                                asked for specifications / autoprobe
failed
Mitsumi (alternate)             autoprobe failed
Optics Storage 8000         asked for specifications / autoprobe failed
Phillips CM206/260           asked for specifications / autoprobe failed
Sanyo                                  autoprobe failed
Sony CDU -31A                 asked for specifications / autoprobe failed
Sony CDU -5xx                   autoprobe failed
Soundblaster/ Panasonic  took forever / autoprobe failed

Every time the autoprobe failed it gave my the message "Error:  I can't find
the device anywhere on your system!"

I can't find anything in my manuals for the computer about what type of
CDROM it is.  If it helps any, it's an old Packard Bell Legend 10 CD SX.
Thanks for any help.

Matt Bowyer
[EMAIL PROTECTED]



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

From: [EMAIL PROTECTED] (Warren)
Crossposted-To: 
comp.os.linux.help,comp.os.linux.questions,comp.os.linux,linux.redhat.misc
Subject: Need help on installing patches..
Date: Sun, 08 Aug 1999 11:40:55 -0400

Hello,

  I haven't installed patches in a while, and I seem to be having trouble
doing it. I download the kernel patch from kernel.org, and renamed it
"patch-2.2.10.gz", I then type;

gzip -cd patch-2.2.10.gz | patch -p0

   But..it comes back telling me it's not a valid gzip file. The file is
listed on the website as "patch-2.2.10.gz", but when I shift-click on it,
the download process truncates the ".gz"...I don't remember why this is.

  Could someone clue me in on how to install patches properly ?

Kind regards,
   Warren Crossfield

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

From: Mark Slagell <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.x
Subject: Re: startx -- -bpp 16.....too long to type
Date: Sun, 08 Aug 1999 09:57:35 -0500

Nevyn wrote:

> i want to keep using startx to start x but i like to start it like
> above, and would like to know if i can modify a file so i can go back to
> just typing startx but still getting the better colour depth....any
> ideas??

Look for something like this in your XF86Config file (should be found in
/etc or /etc/X11):

Section "Screen"
   Driver          "some driver"
   Device          "some video card"
   Monitor         "some monitor"


Under the Monitor line, insert this line:

    DefaultColorDepth 16


Failing that, you can always define an alias...


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

From: Leonard Evens <[EMAIL PROTECTED]>
Crossposted-To: redhat.general
Subject: Re: mkbootdisk on different machine
Date: Sun, 08 Aug 1999 10:26:02 -0500

Ron wrote:
> 
> I have RedHat6.0 running on an older i586 box. This box's floppy drive unable to 
>write to the disk for some reason. I have RedHat Linux 5.2 running on an i686 box. 
>Samba file sharing is working on this network.  How do (can) I use the 5.2 box to 
>create a bootdisk for the 6.0 machine?  Thanks,  Ron
> 
> ------------------  Posted via CNET Linux Help  ------------------
>                     http://www.searchlinux.com

Your message appeared as one long line with my newsreader.
Try to avoid that if you want people to respond.

I assume you mean that your floppy drive can't write
floppy disks.

mkbootdisk sets things up for your specific hardware
configuration, including what your root partition is,
and it adds a mkinitrd if you have a SCSI hard drive.
I don't know if it uses anything else about the machine.

You could try with another machine which had the same
hardware and same root partition.

Alternately, you could use any machine with the same
kernel and in the /boot directory with a floppy in the
floppy drive, do
dd if=Your_Kernel_name of=/dev/fd0
rdev /dev/fd0 /dev/Root_partition_on_the_target_machine
This should produce a bootable kernel on a floppy.  It
won't have the rescue capability that the boot floppy
produced by mkbootdisk has.

-- 

Leonard Evens      [EMAIL PROTECTED]      847-491-5537
Dept. of Mathematics, Northwestern Univ., Evanston, IL 60208

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

From: "Walt and Denise Fles" <[EMAIL PROTECTED]>
Crossposted-To: 
alt.linux,alt.os.linux,comp.os.linux.hardware,comp.os.linux.setup,linux.redhat.misc
Subject: Re: CDROM driver not supported in RH 6 install
Date: Sun, 8 Aug 1999 10:56:12 -0500

Just wondering if it's one of those that is attached to the sound card.
THOSE need a driver before the system can access it ( as does the
sound card ).

If so, you probably can hook it up directly to a spare IDE channel and
forget about needing the additional driver.

Good Luck!

--
Walt and Denise Fles
[EMAIL PROTECTED]
Bowyer <[EMAIL PROTECTED]> wrote in message
news:7ok5oa$mst$[EMAIL PROTECTED]...
> The installation gave me the following choices.  I've also listed what
> happened:
>
> Aztech CD                          autoprobe failed
> Backpack CDROM           autprobe failed
> Goldstar R420                   autoprobe failed
> Misumi                                asked for specifications / autoprobe
> failed
> Mitsumi (alternate)             autoprobe failed
> Optics Storage 8000         asked for specifications / autoprobe failed
> Phillips CM206/260           asked for specifications / autoprobe failed
> Sanyo                                  autoprobe failed
> Sony CDU -31A                 asked for specifications / autoprobe failed
> Sony CDU -5xx                   autoprobe failed
> Soundblaster/ Panasonic  took forever / autoprobe failed
>
> Every time the autoprobe failed it gave my the message "Error:  I can't
find
> the device anywhere on your system!"
>
> I can't find anything in my manuals for the computer about what type of
> CDROM it is.  If it helps any, it's an old Packard Bell Legend 10 CD SX.
> Thanks for any help.
>
> Matt Bowyer
> [EMAIL PROTECTED]
>
>



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

From: Frank Sweetser <[EMAIL PROTECTED]>
Subject: Re: C structure size inconsitency
Date: 08 Aug 1999 10:55:32 -0400

[EMAIL PROTECTED] (Andreas Hinz) writes:

> On 8 Aug 1999 10:32:42 GMT, Gergo Barany <[EMAIL PROTECTED]> wrote:
> >
> > The only correct return type for main() is int.
> >
> Thank you for the hint.
> 
> 
> >Why stderr?
> >
> Because 'printf(' and 'fprintf(stdout' dosn't print anything on the sreeen.
> I don't know why.

because stdout is buffered, stderr is not.

fflush(stdout);

> >It doesn't matter what you think it should be. 
> >
> It most certainly does. If I create a file with a specific data structure,
> an other program can not read this file correctly.
> And exactly that is the problem.
> 
> Creating a file with the above data structure in DOS and reading it in Linux
> fails because of this.

depending on the optimizations and the compiler, the compiler may insert
padding here and there into your data structure.  for example, many 32 bit
machines perform 32bit aligned access much faster than non-aligned.  so, if
you have

struct {
        something_16bit foo;
        something_32bit bar;
}

then accessing bar is going to be much faster if the compiler inserts
another 16 bits inbetween the two to keep both elements aligned on a 32bit
boundry. 

if you're planning to try and move data around between two systems as
disimilar as unix and dos, i'd suggest you either 1) move data around in
single chunks, or (probably) even better simply copy things into and out of
a char[] buffer for writing to and from.

-- 
Frank Sweetser rasmusin at wpi.edu fsweetser at blee.net  | PGP key available
paramount.ind.wpi.edu RedHat 5.2 kernel 2.2.5        i586 | at public servers
Woody:  Would you like a beer, Mr. Peterson?
Norm:   No, I'd like a dead cat in a glass.
                -- Cheers, Little Carla, Happy at Last, Part 2

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

From: Leonard Evens <[EMAIL PROTECTED]>
Crossposted-To: redhat.general
Subject: Re: help recovering disk space
Date: Sun, 08 Aug 1999 10:36:48 -0500

gcwesley wrote:
> 
> I setup my Linux RedHat 6.0 system with a boot partition of 200MB and later
> increased it to 480MB because some programs would not install to the /usr
> partition.  Now, I only have about 10% free on the /boot partition.  An
> author wrote that I could delete unneeded files, and I've dumped core,
> *.baks and *.tmps.  However, he also wrote that I could dump *.o files as
> they where object files created during the build.  Is this true?  And are
> there other files that I could delete safely also?  Thank you in advance.
> 
> ------------------  Posted via CNET Linux Help  ------------------
>                     http://www.searchlinux.com

This sounds very peculiar.  Do you mean the / or root partition?
If you actually have a separate boot partition, it should not
need nearly 200MB.   I don't have a separate boot partition,
but boot (which is a subdirectory of / ) uses only about
5.3 MB.   They now recommend setting up a separate partition
for boot so the kernel can be kept below the 1024 cylinder
limit, but 20MB should more than suffice for current use and
possible upgrades.   I suspect that either you are confusing
/boot and / (root) or you haven't set things up properly.

I have yet to be able to install (or upgrade to) RH6.0 with
less than 600 MB.  (But I tend to install gimp and other things
that take up space).  If you don't have to worry about the
1024 cylinder problem, I would suggest just making two partitions,
one for root and one for swap.  If you do have to worry about
the 1024 cylinder limit, make three partitions: for /, /boot, and
swap.  But then make sure later in the installation that you
arrange to mount things properly on the partitions.   Even if
you can currently get away with a smaller / partition, you
will find later you need the space.

I wouldn't remove .o files.   The installation should not
leave any around that are not needed.  If you don't plan
to make any kernels, you can remove the kernel source tree.


-- 

Leonard Evens      [EMAIL PROTECTED]      847-491-5537
Dept. of Mathematics, Northwestern Univ., Evanston, IL 60208

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


** 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 PROTECTED]

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

    Internet: [EMAIL PROTECTED]

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

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

Reply via email to