linux-c-programming.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* functions to determine dementions of console?
@ 2004-05-23 23:05 ameer armaly
  2004-05-24  2:09 ` Glynn Clements
                   ` (2 more replies)
  0 siblings, 3 replies; 16+ messages in thread
From: ameer armaly @ 2004-05-23 23:05 UTC (permalink / raw)
  To: linux-c-programming

Hi all.
I was wondering if there are a set of functions/system calles to let me
know what someone's set their tty length and heighth too?  I do this
because I don't want to presume 80x25 in case someone's got it set
otherwise.



Ameer


^ permalink raw reply	[flat|nested] 16+ messages in thread
* RE: value computed is not used ??
@ 2004-06-01 17:34 Huber, George K RDECOM CERDEC STCD SRI
  2004-06-01 19:09 ` Glynn Clements
  0 siblings, 1 reply; 16+ messages in thread
From: Huber, George K RDECOM CERDEC STCD SRI @ 2004-06-01 17:34 UTC (permalink / raw)
  To: linux-c-programming



-----Original Message-----
From: linux-c-programming-owner@vger.kernel.org
[mailto:linux-c-programming-owner@vger.kernel.org]On Behalf Of Charlie
Gordon
Sent: Tuesday, June 01, 2004 12:09 PM
To: linux-c-programming@vger.kernel.org
Subject: Re: value computed is not used ??

Charlie wrote (qoting J.)

>> I understood everything in the above answer except for one issue ? Why
is:
>> int main(void) {
>> The wrong prototype for main ? main() schould return `0' or `1' etc ?!?
>> Thank you very much for taking the effort to explain and answer.
>> Jeroen.

>the proper prototype for main is
>int main(int argc, char **argv);
>or possibly :
>int main(int argc, char *argv[]);
>which is semantically equivalent, but emphasises the fact that argv points
>to an array of char*

I to am a little confused on why you state that int main(void) is an
incorrect 
prototype for main?  Quoting from the C99 - draft standard,

"The function called at program startup is named main.  The implementation
declares
no prototype for this function.  It shall be defined with a return type of
int and with
no parameters:
    int main(void) {/* ... */}
or with two parameters (referred to hear as argc and argv, though any names
may be used, 
as they are local to the function in which they are declared):
    int main(int argc, char* argv[]) {/* ... *.}
or equivalent, or in some other implementation-defined manner." (section
5.1.2.2.1)

This seems to imply that either prototype for main may be used.  Is this a
new 
addition to the C99 standard, or am I missing something here.

George





-
To unsubscribe from this list: send the line "unsubscribe
linux-c-programming" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2004-06-03  1:26 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-05-23 23:05 functions to determine dementions of console? ameer armaly
2004-05-24  2:09 ` Glynn Clements
2004-05-26 14:41 ` Christoph Bussenius
2004-05-30 19:12 ` J.
2004-05-30 20:35   ` Micha Feigin
2004-05-31 19:38     ` Christoph Bussenius
2004-06-01  1:41       ` value computed is not used ?? J.
2004-06-01  3:25         ` Glynn Clements
2004-06-01  7:30         ` Charlie Gordon
2004-06-01 16:08           ` Charlie Gordon
2004-06-01 21:58           ` Glynn Clements
2004-06-03  1:26             ` Micha Feigin
  -- strict thread matches above, loose matches on Subject: below --
2004-06-01 17:34 Huber, George K RDECOM CERDEC STCD SRI
2004-06-01 19:09 ` Glynn Clements
2004-06-01 20:58   ` Charlie Gordon
2004-06-01 21:44     ` Glynn Clements

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).