RE: Calling sequence

1999-04-29 Thread James
On Thu, 29 Apr 1999, Mullen, Patrick wrote: # Like I said from the beginning (or maybe I just thought it, # I can't remember), the example line is bad programming # so it shouldn't be done, anyway. yeah because if you miss out the spaces it becomes i+j (or whatever the variables were) and

Re: Allocation

1999-04-28 Thread James
On Wed, 28 Apr 1999, Amol Mohite wrote: # in main function if i have int i, j; # # can i be sure that i and j are contiguous ? does it matter? (think about it, what use would knowing if they were do you?) they could be, then again could not be. Does it depend on processor archetecture and

Re: Calling sequence

1999-04-28 Thread James
On Wed, 28 Apr 1999, Amol Mohite wrote: oh goodie, more homework to do :) # In gcc, # # if i = 2; # then j = i++ + ++i; # # what is the value of j. 6. # what is the calling sequence in this case ? ++i first or i++ first ? it'd do this: i = 2 i++ /* add 1 to i and return 2 */ i =

Re: recv

1999-04-28 Thread James
On Wed, 28 Apr 1999, Glynn Clements wrote: # # Why don't you just use fgets(), fscanf() etc? # how? don't they need a FILE pointer not a file descriptor. (this is probably # a very silly question with a very simple answer...) # See the fdopen(3) manpage. Ahhh... i see. FILE *foo; foo =

Re: Calling sequence

1999-04-28 Thread James
On Wed, 28 Apr 1999, Glynn Clements wrote: # In gcc, # # if i = 2; # then j = i++ + ++i; # # what is the value of j. # # i++ == 2 # ++i == 3 # =j == 5 no. it's not. I typed this in: main() { int i = 2; printf ("%d", i++ + ++i);} and when i ran it i got 6

recv

1999-04-26 Thread James
i'm trying to communicate with a server which sends output down a socket. The server sends a code and then some text (e.g 01: Connection Refused). What i'd like to do is just recv the first 2 bytes and act on them, instead of having to recv the whole line (i don't know how long the lines of text

C Compilers

1999-04-25 Thread James
What are the differences between: gcc egcs pgc and which should i use? Last i tried, egcs wouldn't compile kernels. All i want is a good, quick C and C++ compiler that works 100% with all code. Also, where am i supposed to install a c compiler and how do i remove an existing one (after

egcs

1999-04-21 Thread James
can egcs compile kernels yet? -- +++ The program isn't debugged until the last user is dead. +++ [EMAIL PROTECTED] http://www.penguinpowered.com/~a_out

processes

1999-04-13 Thread James
if i know the pid of a process, how can i find out it's status? (i.e running, blocked, ready, zombie, invalid pid...) -- +++ If at first you don't succeed, you must be a programmer +++ [EMAIL PROTECTED] http://www.penguinpowered.com/~a_out

Re: compiling

1999-04-11 Thread James
On Sun, 11 Apr 1999, Darius Blaszijk wrote: # Recently I came across a package witch I want to use in my programs. The # package consists of a header file (interface) and a *.c source code file # (implementation). How can I use these files in my application? If I try # to compile my application

Re: array filling problem

1999-04-10 Thread James
On Sat, 10 Apr 1999, Dan Jue wrote: # Are we allowed to assume that row-major order arrays are totally # contiguous in memory for any platform (by your example of address Probably not. # a[0][4])? For arrays of structures or objects (or some other big unit), # is it not possible for their

Re: fledgling

1999-04-06 Thread James
On Tue, 6 Apr 1999, Glynn Clements wrote: # In no less than 5 months I will be graduating and # moving on to college. I plan to study computer # engineering. I know that I *will* be able to skip some # courses, especially if it has to deal with # programming. # # It depends upon the nature

ppp

1999-04-06 Thread James
what's the most reliable way of detecting when a ppp link is up? so far i've been looking in /proc/net/dev, but the ppp entry in that hasn't gone away and i'm nolonger online. -- +++ If at first you don't succeed, you must be a programmer +++ [EMAIL PROTECTED]

terminal

1999-04-01 Thread James
how do i turn off the cursor and make my programs accept characters typed into a terminal without you having to press enter first? I once knew, but i forgot :) -- +++ If at first you don't succeed, you must be a programmer +++ [EMAIL PROTECTED]

Re: Type casting with malloc()

1999-04-01 Thread James
On Thu, 1 Apr 1999, holotko wrote: # My question. Do I really need to add the type cast (ObjectType *) # before the call to malloc() ? no. but gcc will warn you, if you use -Wall, about it. Doesn't do any harm leaving it in and if you miss it out gcc will add it in itself. Technically you need

strtok()

1999-03-29 Thread James
maybe it's just me, but i find this funny... (from the strtok() manpage) BUGS Never use this function. it's a fairly big bug! :) i expect there are similar things stuck to nuclear warheads (Warning! This device is hazardous to most forms of life, do not use). i'll try strsep() instead,

Re: strtok()

1999-03-29 Thread James
On Mon, 29 Mar 1999, Bug Hunter wrote: # # strtok() uses a global to store its intermediate results. meaning that # you can get unexpected results if several parts of your program use it. # it uses a local static variable actually. and it is very destructive, but if you make a copy of the

recv

1999-03-29 Thread James
is it really inefficient and slow to recv stuff from a socket 1 byte at a time? my program reads data from a socket 1 byte at a time, checking if the character read is a newline, if it isn't then the char is copied into a char array, otherwise the recv stops and something is done with the array.

-D

1999-03-28 Thread James
does doing gcc -DBAR=\"foo.c\" do the same thing as gcc -DBAR='"foo.c"' which is equivalent do doing this in the source file #define BAR "foo.c" -- +++ If at first you don't succeed, you must be a programmer +++ [EMAIL PROTECTED]

Re: poniter problem

1999-03-26 Thread James
On Fri, 26 Mar 1999, Amol Mohite wrote: # say I have a char *c pointing to an array of 10 bytes. you mean: char myarray[10], *c; c = myarray; # When i do (int *)c++ (increment before typecast -- forget the brackets for # nw), and equate it t an int *i then please re-read what you type.

Re: container class ?

1999-03-26 Thread James
On Fri, 26 Mar 1999, Chetan Sakhardande wrote: # Also in unix, how do i set an alarm with timer less than i sec? use usleep(). -- +++ If at first you don't succeed, you must be a programmer +++ [EMAIL PROTECTED] http://www.users.globalnet.co.uk/~kermit

Re: ???

1999-03-24 Thread James
On Mon, 22 Mar 1999, Glynn Clements wrote: # will allocate space for a `char *', but it will point to some random # memory location. The result of using dbQuery as the first argument to # sprintf() will be undetermined. The one thing of which you can be sure # is that it will write to some

Re: cdrom_msf and cdrom_ti question

1999-03-21 Thread James
On Sun, 21 Mar 1999, Glynn Clements wrote: # I'm using struct cdrom_ti to play audio tracks, but when I try to play # the last track (this fails on every cd) it wont't play. # Every track but the last track works, isn't that weird? # One of my ideas is that maybe it has something to do with

Porting Resources

1999-03-21 Thread James C. Lewis
t pitfalls to watch out for, and items of the such. Thanks in advance, -James C. Lewis _ /_ _ _ _ / ) / _' _ (_/(///)(-_) (__ . (__(-((//_) PUCC Information Center Consultant [EMAIL PROTECTED] Please place all complaints in this box -- []

Re: vim or emacs c syntax

1999-03-14 Thread James
On Sun, 14 Mar 1999, Catalin Bucur wrote: # Chris wrote: # # I was wondering how to make vim do syntax highlighting for C code or emacs # and how to set tabs for code. # # Thanks # # For vim, # :syntax on and the tabstops... :set tabstop=x [where x is some number, 4 or 8

Re: Missing errnos.h

1999-03-06 Thread James
On Sat, 6 Mar 1999, Henk Jan Barendregt wrote: # I'm trying to compile a code which uses a header file I haven't heard of # errnos.h # # Check your include path or otherwhise i think you've lost it somehow. # On my system (kernel 2.0.36) it's in the /usr/include directory it's called

Re: exit() ...

1999-03-05 Thread James
On Fri, 5 Mar 1999 [EMAIL PROTECTED] wrote: # I've seen a lot of source code lately. My idea the best way to learn a # language ... # # I've noticed that exit() can take a parameter. I've seen exit(0), exit(1), # exit(2) and even exit(10). What does the parameter mean ? I can't find any # table

RE: Yet another beginners question ...

1999-03-03 Thread James
On Tue, 2 Mar 1999 [EMAIL PROTECTED] wrote: # My friend says that I should buy the KR but i think I read somewhere that # it's 'old C', not ANSII C. Is this correct ? no, the KR ANSI C Book is for ANSI (One I) C... I think you're confusing it with KR C which is old C. this is the book to buy:

Re: Yet another beginners question ...

1999-03-03 Thread James
On Tue, 2 Mar 1999 [EMAIL PROTECTED] wrote: # #define LOGFILE /APPHOME/applogfile /* APPHOME is the actual home # directory for the application */ # remove("LOGFILE");/* First remove the old logfile */ # LogFile = fopen("LOGFILE", "w"); you know how using #define's

Re: Newcomer

1999-02-22 Thread James
On Sun, 21 Feb 1999, Piero Giuseppe Goletto wrote: # As far as I know, the minix kernel is the basis from which Linus Torvalds # started writing the Linux Kernel. "and in the beginning god did type 'cp -r minix/* linux'" :) where can i get gas (the gnu assembler)? i want to compile kernel

./configure

1999-02-22 Thread James
How do i make my own configure scripts? are they hand written or created by some special program? -- +++ Beware of programmers who carry screwdrivers +++ [EMAIL PROTECTED] http://www.users.globalnet.co.uk/~kermit

Re: Debugging ...

1999-02-22 Thread James
On Mon, 22 Feb 1999 [EMAIL PROTECTED] wrote: # I have an application in wich i define for example an integer that is equal # to 3. But I want the following adjustment to my program : # When i wanna compile my program with the -g (debug) option, i'd like that # the integer is equal to 2. What i

Saneness

1999-02-21 Thread James
What is a non-sane build environment? (apart from Windows and dos :) -- +++ Beware of programmers who carry screwdrivers +++ [EMAIL PROTECTED] http://www.users.globalnet.co.uk/~kermit

Re: your mail

1999-02-20 Thread James
On Fri, 19 Feb 1999, Nassar Carnegie wrote: # Thats all good too.., beacuse im learning C as well. I thought to learn # more from other peoples problems and programming errors by joining a C # programming mailing list. I see that this list moves kind of "slow" yeah, but this list is like a

signals

1999-02-19 Thread James
Why doesn't linux have a ualarm() or sigset()? it's mildly irritating. cos if i'm writing some program that needs a continuous alarm sending i have to repeatedly call signal() and alarm() to set one up. surely there's an easier way. including bsd/signal.h just gives me an error about the file

Re: stderr

1999-02-18 Thread James
On Wed, 17 Feb 1999, David Rysdam wrote: # The second way is to close file descriptor 2, and re-open another # file/device with that number within your program. will C let you do that? cos what'd happen if you closed stdout and forgot to re-open one and then did a printf(). And you can't open

Re: memory allocation

1999-02-18 Thread James
On Thu, 18 Feb 1999, Anubhav Hanjura wrote: # main() # { # # char *filename; # char *string =3D "this is a string"; # # strcpy(filename,string); # printf("filename is %s\n",filename); # } This _should_ break. where does *filename point? from the strcpy() man page: DESCRIPTION The

Re: variable arguments

1999-02-18 Thread James
+++ [EMAIL PROTECTED] http://www.users.globalnet.co.uk/~kermit Here's what i got sent when i asked the question... -- Forwarded message -- Date: Wed, 9 Sep 1998 22:27:03 +0100 (BST) [i keep my mails :) ] From: Glynn Clements [EMAIL PROTECTED] To: James [EMAIL

Test

1999-02-13 Thread James
hello... -- +++Beware of programmers who carry screwdrivers +++ [EMAIL PROTECTED] [Website undergoing re-design...]l.org int a=1,b,c=2800,d,e,f[2801],g;main(){for(;b-c;)f[b++]=a/5;for(;d=0,g=c*2;c

Funny Fortune! (fwd)

1999-01-16 Thread James
completely off topic, out of date and ultimately not worth posting... but funny all the same -- +++Beware of programmers who carry screwdrivers +++ [EMAIL PROTECTED] [Website undergoing re-design...]l.org better !pout !cry better watchout lpr

Re: send_sig and library question

1999-01-16 Thread James
On Fri, 15 Jan 1999, Glynn Clements wrote: # send_sig() is a kernel function (kernel/exit.c). # send_sig() isn't in any library; it's a kernel function. # You can't link to it; it's a kernel function. # # You find the library first. Then you read the library's documentation, # which should tell

Hello...

1999-01-15 Thread James
is this list dead too? (what's happened to linux-admin@vger? not even majordomo is replying...) -- +++Beware of programmers who carry screwdrivers +++ [EMAIL PROTECTED] [Website undergoing re-design...]l.org

Re: test

1999-01-15 Thread James
On Thu, 14 Jan 1999, David Rysdam wrote: # # email!! wow... guess they turned the server back on :) -- +++Beware of programmers who carry screwdrivers +++ [EMAIL PROTECTED] [Website undergoing re-design...]l.org

Re: Hello...

1999-01-15 Thread James
On Fri, 15 Jan 1999, Karl F. Larsen wrote: # # James, # This list is far from dead. But it sometimes is quiet. I carry a # leatherman which has even a long nosed pliers! It's good for helping those # "Easy Open" beer cans. cool, i've just got a 'standard' sized screwdriver

Re: Arrays

1999-01-10 Thread James
On Sat, 9 Jan 1999, Richard Ivanowich wrote: # Hello all, # # Now i know arrays do no bound checking. How would i make it do bound # checking? # # ie. int array[10]; # # for(i=0;i=11;i++) { # array[i]=i; # } for (i=0;i10;i++) { array[i] = i; } /*i.e code bound checking by hand

Mail (fwd)

1999-01-02 Thread James [on his mailserver]
oops! i'll try sending it to the right place this time... there isn't a linux-c-programming at vger is there? -- Forwarded message -- Date: Sat, 2 Jan 1999 01:37:01 + (GMT) From: "James [on his mailserver]" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Mail in a

bits

1999-01-01 Thread James [on his mailserver]
i'm writing a program which can accept switches to set various things in the program, there will be several switches (all optional) which set some conditions in my program to either ON or OFF. To process this i was going to: declare a struct like this: struct { unsigned int file : 1; /*

Libraries

1998-12-30 Thread James [on his mailserver]
i've written a C library (call it 'foo) and made a foo.a file using 'ar'. Now what do i do? i tried copying the file into /usr/local/lib and compiling a test program using 'gcc -Wall -lfoo test.c -o test' and it complained about undefined references to all my library routines. i also tried

Re: ! = -1?

1998-12-28 Thread James [on his mailserver]
On Sun, 27 Dec 1998, Colin Campbell wrote: errr wait a minute. 0 equals false any other value represents truth. You seem err crap! i ALWAYS mix it up! going to buy a post-it-note and write it down and stick it on my monitor :) to quote from my KR C book... "if it is true (that is, if

Arrays

1998-12-27 Thread James [on his mailserver]
isn't there any way to do this: ask user for some integer 0 make an array that big cos i'd like to... would this work: int thing[0], *ptr = thing; int in; ... printf ("Enter a number 0:"); scanf ("%d", in); realloc (ptr, in); ... ?

! = -1?

1998-12-26 Thread James [on his mailserver]
in C's logic, do -1 and 1 mean the same thing? i.e FALSE. 0 is the ONLY value that is interpreted as TRUE right? cos i have a function (and we'll call it foo() again :) which does something and returns -1 if there is an error and 0 if it went ok. Now if in my main() i do this: /* assume foo()

Re: File formats? .MID, .KAR, .ST3

1998-12-22 Thread James [on his mailserver]
On Tue, 22 Dec 1998, James [on his mailserver] wrote: On Tue, 22 Dec 1998, Dave wrote: Can anyone point me to information on file formats for the following file types: www.wotsit.com has loads of specs on file formats. oops, meant www.wotsit.org

Mobile Phones

1998-12-14 Thread James [on his mailserver]
A bit off topic, but interesting nontheless; i crashed my mobile phone! Panasonic G450, UK Vodafone it said Lo Battery, i pressed a key (probably 5) and the backlight came on, then the battery ran out and it said Phone Shutting Down and stayed that way until i removed it's battery! when i

Code formatting

1998-11-30 Thread James [on his mailserver]
should C code be formatted so that it fits into an 80 column display? i think it should because otherwise list and other viewers wrap the text which looks really nasty.

Re: egcs

1998-11-26 Thread James [on his mailserver]
On Wed, 25 Nov 1998, Glynn Clements wrote: I'm not sure if this answers your question, but then I'm not really sure exactly what your question was. i'm not sure either (it was approaching 3am and i was determined to make kernel 2.0.36 compile before i went to bed.. and i did) i've got both

Re: mail help

1998-11-21 Thread James [on his mailserver]
On Sat, 21 Nov 1998, CyberPsychotic wrote: probably would be worth to set list-members-only posting policy. i don't see why this wasn't set anyway. What's the use of being able to post to this list if you never receive replies?

Re: indenting question

1998-11-14 Thread James
On Thu, 12 Nov 1998, Leon Breedt wrote: -is it better to indent my source using real (\t) tabs, or should i configure -my editor to expand tabs into spaces? i can't decide which is best :) use tabs because when deleting the tab character (i.e you press tab in the middle of a line by accident)

Re: linked list question

1998-11-14 Thread James
On Fri, 13 Nov 1998, Glynn Clements wrote: - -Leon Breedt wrote: - - i'm working on a doubly-linked list at the moment, just one or two questions: - - i looked at the way the doubly linked list is implemented in glib, - -What is glib? the low-level GTK+ library, think it handles basic screen

Re: free memory?

1998-11-14 Thread James
On Sat, 14 Nov 1998, Moshe Zadka wrote: -Decrefing with a bug? -consider the following, buggy, code: -a=malloc(10); -b=malloc(10); -free(a); -free(a); wouldn't the program stop when it reached the 2nd free because it is trying to free a NUL pointer (assuming free sets them to NUL, if not the

Re: Magazines for low prices!

1998-11-10 Thread James
On Mon, 9 Nov 1998, magazines wrote: -To be removed from future mailings, please send an email to -mailto:[EMAIL PROTECTED]ŸD i'm too tired to think. Can someone cook me up a procmail recipe that looks for similar strings to this (to be removed, to remove etc) in emails and stuffs these emails

Re: Newbie Header Q's

1998-11-09 Thread James [on his mailserver]
On Sun, 8 Nov 1998, Marc Evelyn wrote: Nah. They use ed. there's bits of that in VI, :q! and all that stuff. is it as bad as edlin?

Re: My PCI modem.

1998-11-08 Thread James
On Sat, 7 Nov 1998, Canul Podkopayeva wrote: -BTW, its a PCI plug-n-play modem, I'm running 2.1.126 aargh! run for the hills! anyway, if it has Winmodem on it then it'll make a good doorstop :) have you tried running minicom or something and configuring that? modems don't require any special

Re: last question :)

1998-11-08 Thread James
On Sat, 7 Nov 1998, Leon Breedt wrote: -what's the fastest way to check for the existence of a file/directory? try and stat() it? if it fails then it doesn't exist? -- +++ Divide By Cucumber Error, Please Re-Install Universe And Reboot +++ [EMAIL PROTECTED] [Website undergoing

Re: file size query

1998-11-08 Thread James
On Sat, 7 Nov 1998, Leon Breedt wrote: -hi again - -is there a function similar to pascal's filesize() in ANSI C? something -that will take a pointer to a stream as parameter, and return the file -size in bytes. man stat -- +++ Divide By Cucumber Error, Please Re-Install Universe And Reboot

Mail

1998-11-06 Thread James
Can anyone actually see this mail? None of my mails i've sent have come back to me... -- +++ Divide By Cucumber Error, Please Re-Install Universe And Reboot +++ [EMAIL PROTECTED] [Website undergoing re-design...]l.org

Mail spools

1998-10-26 Thread James
is the data in /var/spool/mail/whatever in a special order? I mean the order of the separate mail messages. Does it matter if the newest is at the head and the oldest at the tail? -- +++ Divide By Cucumber Error, Please Re-Install Universe And Reboot +++ [EMAIL PROTECTED]

Re: Mail

1998-10-19 Thread James [on his mailserver]
On Sat, 17 Oct 1998, Henrik Nordstrom wrote: There are two UNIX mailbox formats. Which one thats used depends on your sendmail version/configuration. Format 1. "^From " based. From Whoever@somewhere date mail data. Any line beginning with "From " is escaped to "From ". i've scanned

Man Page Error

1998-10-04 Thread James
This is semi-on topic... (it's about a man page to do with c programming): There's an error in the GETCWD(3) manpage: NAME getcwd, get_current_dir_name, getwd - Get current working directory SYNOPSIS #include unistd.h char *getcwd(char *buf, size_t size);

stat

1998-09-30 Thread James
how do i use the S_IS* macros? i want to check files to see if they really are files or directories... all it says is S_ISREG(m) regular file? what's m? i've tried stating a filename, then doing: if (S_ISREG(buf.st_rdev)) /* st_rdev seemed the most sensible */

Re: What's the biggest file?

1998-09-17 Thread James
On Tue, 15 Sep 1998, tempest wrote: -Hello James, - -Sorry to bother you with such a silly question, but could you give me -the URL of where you found the Linux Programmers Guide? I'd really -like to have that myself! I'm on the linux-c-programming mailing -list, in case your wondering how I

finding strings

1998-09-16 Thread James
wait... made it a bit more user friendly... $ grep `find -name *.c -print` -ne | less it'll now display the line numbers and pipe it into less so you can read it a page at a time. -- +++ Divide By Cucumber Error, Please Re-Install Universe And Reboot +++ [EMAIL PROTECTED]

File IO

1998-09-16 Thread James
how do i do file I/O in the kernel? I.e i want to read a value from a file and store it in the kernel's uptime variable... i've tried the 'normal' open() (or was it fopen(), one of the two) but it complains (i can't remember the error, but it was as though i'd not linked something in). and if

What's the biggest file?

1998-09-15 Thread James
thought this might help someone, wrote it whilst trying to work out where all my harddrive space had gone... $ du -bax | sort -rn +0 | less it'll display all your files and directories, sorted with the biggest first (which'll always be . so ignore the top line). It only searches the current

Re: curses, colour won't work...

1998-09-13 Thread James
On Sun, 13 Sep 1998, Ken wrote: - - -On Sun, 13 Sep 1998, James wrote: - - how do i get coloured text in ncurses? i've tried making a colour pair - and attron() and attrset() but the best i got was the following in - black on flashing white (the text was 'Hello!'): - - 27462Hello! - - (i can't

max dir length

1998-09-10 Thread James
just for compatabilities sake, what's the maximum number of directory entries (is it infinite?), i've picked 255 for no good reason, this sound sane? what?! suppose sending this'd help (it's been sat here all night) -- +++ Divide By Cucumber Error, Please Re-Install Universe And Reboot +++

file locations

1998-09-10 Thread James
where's the 'standard' place for my program binaries to go? /usr/local/bin or /usr/bin ? and documentation should go in /usr/doc/programname manpages in /usr/man/... (and how do i write manual pages anyway?) -- +++ Divide By Cucumber Error, Please Re-Install Universe And Reboot +++ [EMAIL

flex

1998-09-10 Thread James
flex would let me parse files wouldn't it? at the moment i have a horrendous parsing routine that contains a few gotos in it (aargh :) and is generally really complicated ( = slow) and not nice. What i want parsing is similar to C source (but not the same, it contains blocks of data enclosed in

directories

1998-09-10 Thread James
forget it i've worked it out... open a dir with opendir(), have a loop that repeatedly calls readdir(). now i need repeated calls to stat() to find out the file size... -- +++ Divide By Cucumber Error, Please Re-Install Universe And Reboot +++ [EMAIL PROTECTED]

RE: main()

1998-09-10 Thread James
On Wed, 9 Sep 1998, Niels Hald Pedersen wrote: -If you want a pascallish structure of C programs, use function -prototypes: this is what i do... apart from making it 'nicer' for the compiler, it can also trap errors like forgetting a parameter when writing the function itself. I wasn't

Re: function parameters

1998-09-10 Thread James
On Wed, 9 Sep 1998, Glynn Clements wrote: - printf ("Hello","world","\n","%d%d%d", 2, 0, 35); - -This isn't a legitimate printf() call. The format string has to be a -single argument, e.g. oops, i meant printf ("Hello ""World ""\n"); /* No ,'s between */ so that if you have a

Re: UNIX meteor (was RE: fsck)

1998-09-09 Thread James
On Tue, 8 Sep 1998, Niels Hald Pedersen wrote: - - -Reuters, London, February 29, 1998: -that's an unorthodox leap year, isn't it ? i'd spotted that... What happens to people born on the 29th feb? are they 1/4 age of everyone else born in their year? :) -- +++ Divide By Cucumber Error,

function parameters

1998-09-09 Thread James
how do i create a function that has an undetermined number of parameters? i.e printf can have 1 parameter: printf ("Hello World\n"); or many... printf ("Hello","world","\n","%d%d%d", 2, 0, 35); how? the definition for it has '...' as a parameter... what's that mean? and if you

Re: fsck

1998-09-09 Thread James
On Tue, 8 Sep 1998, Dave wrote: -Except maybe the United States government, who still uses vacuum tubes and -discrete transistors to run its air traffic control system "If it aint broke, don't try to fix it" (oh, wait... you said vacuum tube...) -- +++ Divide By Cucumber Error, Please

uptime

1998-09-09 Thread James
I've been thinking about this for a while... is there some patch that'll store my pc's uptime when i reboot (so it'd really be a cumulative-uptime). -- +++ Divide By Cucumber Error, Please Re-Install Universe And Reboot +++ [EMAIL PROTECTED]http://x-map.home.ml.org

main()

1998-09-08 Thread James
where is the right place to put main()? before or after my function definitions? Because i used to write Pascal code, i stick main() last (in Pascal, the main begin..end pair must be the last function in the program). does it matter? seems more logical to define your prototypes, write them, then

Re: fsck

1998-09-07 Thread James
On Fri, 4 Sep 1998, dreamwvr wrote: -Reuters, London, February 29, 1998: -Scientists have announced discovering a meteorite which will strike the -earth in March, 2028. Millions of UNIX coders expressed relief for being -spared the UNIX epoch "crisis" of 2038. at least when that event does

Re: Binary

1998-09-03 Thread James
On Tue, 1 Sep 1998, Josh Muckley wrote: -You need to find the pinouts of the parallel port and then just -connect a led from a data line to a ground line. There are three -differant types of lines in your p-port. The first and most important -is DATA (out), the second is STATUS (in) and the

Re: Binary

1998-08-30 Thread James
On Sat, 29 Aug 1998, Glynn Clements wrote: - -James wrote: - - How do you use binary numbers in C? i'm sure i once knew... - - i know you prefix 0x to numbers for Hex, 0 for octal, what's binary... - -ANSI C doesn't provide any way to specify numbers in binary. - ahh... oops! i know where i

binary

1998-08-30 Thread James
uh oh, i've started another big debate :) carry on, it's interesting stuff... -- [EMAIL PROTECTED]http://x-map.home.ml.org

Re: Binary

1998-08-30 Thread James
On Sun, 30 Aug 1998, Chetan Sakhardande wrote: -No way. - -Just curious -- why? you ever seen that diagram that shows how to connect LEDs to the data lines on your parallel port? well i wanted it to flash different patterns (for no good reason) and it's 1 bit per led, 1 on, 0 off. specifying

usleep()

1998-08-26 Thread James
why when i run the following does it wait 5 seconds then display .\.\.\.\.\ instead of displaying . [wait 1 second] \ . [wait 1 second]... /* start */ #include stdio.h #include unistd.h int main() { int c; for (c = 0; c 5; c++) { printf (".");

Stat

1998-08-25 Thread James
i'm trying to use stat() to find out a file's size. So far i have : /* Start Of Code */ #include sys/stat.h #include unistd.h #include stdio.h int main (void) { int status; struct stat *buf; status = stat ("/root/.procmailrc", buf); /* don't ask why i'm using my

Re: EGG ROLLS!

1998-08-25 Thread James
On Mon, 24 Aug 1998 [EMAIL PROTECTED] wrote: -Are you tired of eating the same old american left overs? -TRY OUR BEAUTIFUL ORIENTAL DISHES AT CATHAY PEARL! - - 508-379-1188 - i live in the UK, do i get full refund if it's cold :) -- [EMAIL PROTECTED]

Re: Soundcards...

1998-08-21 Thread James
On Fri, 21 Aug 1998, luser wrote: - how can i capture the data that my soundcard produces when it makes sounds? - -Not very easily using software, you would need to use pipes and a -program to write to a file and the device file. ioclt() is used -to set sampling speed/size, it's problematic.

Re: Tired with the vi/grep, who can recommend a better programming environment.

1998-08-21 Thread James
On Thu, 20 Aug 1998, Nathan Grass wrote: - I think that anyone who enters Computer Science as a student MUST have a - computer and it must have Linux. As a class project they write a new X - manager or such. - -Did I ever tell you the story of a little operating system called Minix? that's in a

RE: Malloc()

1998-08-11 Thread James
On Mon, 10 Aug 1998, Niels Hald Pedersen wrote: -Is this true ? - -On my system, it is possible to compile/link a new (changed) version of -a program, while a copy is still running. After the link, the running -old copy no more have a valid executable, thus. How come ? because the program is

Patches

1998-08-02 Thread James
i want to make patches for my C programs, i know it involves using diff to make the patch, and patch to apply it but what do i do? i've read 'man diff' and it can output patches in various formats, does it matter which format i use (i don't think it does because patch works out the format when

Re: remove

1998-08-01 Thread James
On Fri, 31 Jul 1998, K.HARI.KRISHNAN wrote: //remove This doesn't work you know... Oh if only people would read the email they first got... [It's the same on ALL mailing lists] I Like England Just Fine, But I Ain't Eating Any Of That Beef MailTo: root at kermit "dot" globalnet /dot\ co

This List

1998-07-31 Thread James
Is this list broken or something? i've had hardly any mail off it! (either that or procmail has gone a bit wonky - i'm sure it deletes mail for me! i know the default mailbox for unsorted mail disappears every so often) I Like England Just Fine, But I Ain't Eating Any Of That Beef MailTo:

Pthreads-dev

1998-07-24 Thread James
Where can i get the Pthreads-Dev package from? I need it so i can compile something (sound-recorder-0.02.tar.gz) because at the moment i get this error: bigbird:/sound-recorder-0.02# make cd src; make all; make[1]: Entering directory `/sound-recorder-0.02/src' g++ -D_REENTRANT -Wall -O3 -c

  1   2   >