[Fwd: Source Code To Windows 98 (programmer humor) (fwd)] 
Author Message
 [Fwd: Source Code To Windows 98 (programmer humor) (fwd)]

[ Attached Message ]

From:
To:
Date: Tue, 6 Apr 1999 19:59:28 -0400 (EDT)
Local: Tues, Apr 6 1999 7:59 pm
Subject: Source Code To Windows 98 (programmer humor) (fwd)
Thanks for using NetForward!
http://www.*-*-*.com/
v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v

+------------------------------+
| How is it all I ever do,     |
| A criminal, living a crime   |  
| Now all I will ever do,      |  
| Will destroy you all in time |  
+------------------------------+

Quote:
---------- Forwarded message ----------
Date: Tue, 6 Apr 1999 07:45:44 -0700


Subject: Source Code To Windows 98 (programmer humor)

   _            -----_
  //           {|||} 0]_____
  ||          {|||}   \-----]
   \\        {|||}    _\____              Try this in UNIX:
    \\      {|||}    /  ----
     \\--------     /           echo Mhbqnrnes Stbjr | tr [a-y] [b-z]
     /             |
     |   DogByte   |
     \| ----------- \
       |           ||
       ||           ||
       ==           ==

         /*  Source Code to Windows 98   */

          #include "win31.h"
          #include "win95.h"
          #include "evenmore.h"
          #include "oldstuff.h"
          #include "billrulz.h"
          #include "monopoly.h"
          #define INSTALL = HARD

          char make_prog_look_big[1600000];
          void main()
          {
              while(!CRASHED)
              {
                  display_copyright_message();
                  display_bill_rules_message();
                  do_nothing_loop();
                  if (first_time_installation)
                  {
                      make_50_megabyte_swapfile();
                      do_nothing_loop();
                      totally_screw_up_HPFS_file_system();
                      search_and_destroy_the_rest_of_OS/2();
                      disable_Netscape();
                      disable_RealPlayer();
                      disable_Corel_Products();
                      hang_system();
                  }

                  write_something(anything);
                  display_copyright_message();
                  do_nothing_loop();
                  do_some_stuff();

                  if (still_not_crashed)
                  {
                      display_copyright_message();
                      do_nothing_loop();
                      basically_run_windows_3.1();
                      do_nothing_loop();
                      do_nothing_loop();
                  }
              }

              if (detect_cache())
                  disable_cache();

              if (fast_cpu())
              {
                   set_wait_states(lots);
                   set_mouse(speed, very_slow);
                   set_mouse(action, jumpy);
                   set_mouse(reaction, sometimes);
              }

              /* printf("Welcome to Windows 3.11"); */
              /* printf("Welcome to Windows 95"); */
              printf("Welcome to Windows 98");
              if (system_ok())
                  crash(to_dos_prompt)
              else
                  system_memory = open("a:\swp0001.swp", O_CREATE);

              while(something)
              {
                  sleep(5);
                  get_user_input();
                  sleep(5);
                  act_on_user_input();
                  sleep(5);
              }
              create_general_protection_fault();
          }
                      .__________________________.
              /\__/\  |                          |
             /   O O\_|     ---TrashLaughs---    |
            /          \University of Hard Knocks|
           /      \     \    MightyCool.Com      |
          /   _    \     \_______________________!
         /    |\____\     \      ||
        /     | | | |\____/      ||
       /       \| | | |/ |      _||
      /  /  \   -------  |_____| ||
     /   |   |           |       __)
     |   |   |           |_____  __)      IT'S FREE!!!
     |  |_|_|_|          |     \___)
     /\                  |       !!
    / /\        |        /
   / /  |       |       |       To be added to the list, go to:
 _/ /   |       |       |           http://www.*-*-*.com/
!__/   c_c_c_C/ \C_c_c_c/

                   Trashlaughs is Wired... are you?
                   -> http://www.*-*-*.com/ <-
              Wired Global Communications (602) 674-9900



Sat, 22 Sep 2001 03:00:00 GMT  
 [Fwd: Source Code To Windows 98 (programmer humor) (fwd)]

Quote:
>          char make_prog_look_big[1600000];
>          void main()

I want to see Paul or Mark explain to MS that 'main ()' should return
'int'. Go ahead - I'l wait.

Quote:
>          {
>              while(!CRASHED)
>              {
>                  display_copyright_message();
>                  display_bill_rules_message();
>                  do_nothing_loop();
>                  if (first_time_installation)
>                  {
>                      make_50_megabyte_swapfile();
>                      do_nothing_loop();
>                      totally_screw_up_HPFS_file_system();
>                      search_and_destroy_the_rest_of_OS/2();
>                      disable_Netscape();
>                      disable_RealPlayer();
>                      disable_Corel_Products();
>                      hang_system();
>                  }

You forgot 'disable_Stacker ()' and 'disable_Digital_Research_DOS ()'!

--
 Phlip at politizen dot com                  (address munged)
======= http://users.deltanet.com/~tegan/home.html =======



Sat, 22 Sep 2001 03:00:00 GMT  
 [Fwd: Source Code To Windows 98 (programmer humor) (fwd)]

   >          char make_prog_look_big[1600000];
   >          void main()

   I want to see Paul or Mark explain to MS that 'main ()' should return
   'int'. Go ahead - I'l wait.

Actually main() returning void is a MS C extension, so they can use it
in their own programs, like Windows 98, with perfect impunity.
--
(supporter of the campaign for grumpiness where grumpiness is due in c.l.c)

Please: do not email me copies of your posts to comp.lang.c
        do not ask me C questions via email; post them instead



Sat, 22 Sep 2001 03:00:00 GMT  
 [Fwd: Source Code To Windows 98 (programmer humor) (fwd)]

Quote:


>   >          char make_prog_look_big[1600000];
>   >          void main()

>   I want to see Paul or Mark explain to MS that 'main ()' should
return
>   'int'. Go ahead - I'l wait.

>Actually main() returning void is a MS C extension, so they can use it
>in their own programs, like Windows 98, with perfect impunity.

Oh, joy! another 'void main ()' thread!

'void main ()' is one of those extensions that are forbidden by the C++
Standard. The C Standard has different nuances which effectively mean
the same thing but I won't go into them because we'v been having several
concurrent 'void main ()' threads here in C++ land for the past month
and I'm trying to repress them.

Remember, everyone, this Subject has the word "humor" in! Let's everyone
try to stay on topic here!!

Quote:
>(supporter of the campaign for grumpiness where grumpiness is due in

c.l.c)

--
 Phlip at politizen dot com                  (address munged)
======= http://users.deltanet.com/~tegan/home.html =======



Sat, 22 Sep 2001 03:00:00 GMT  
 [Fwd: Source Code To Windows 98 (programmer humor) (fwd)]

Quote:
>                                                we'v been having several
>concurrent 'void main ()' threads here in C++ land for the past month
>and I'm trying to repress them.

Surely the idea behind threads is that they *do* run
concurrently.

Where can I get the man page for repress?
--
Roger



Tue, 25 Sep 2001 03:00:00 GMT  
 [Fwd: Source Code To Windows 98 (programmer humor) (fwd)]

Quote:

> Actually main() returning void is a MS C extension, so they can use it
> in their own programs, like Windows 98, with perfect impunity.

Say what? I just wrote a console program under Linux that used "void
main(void)". I never have used the int. I'm not even sure how.

James



Tue, 25 Sep 2001 03:00:00 GMT  
 [Fwd: Source Code To Windows 98 (programmer humor) (fwd)]

Quote:


>>                                                we'v been having several
>>concurrent 'void main ()' threads here in C++ land for the past month
>>and I'm trying to repress them.

>Surely the idea behind threads is that they *do* run
>concurrently.

>Where can I get the man page for repress?
>--
>Roger

Maybe they're not fully repressed, just deprecated.


Tue, 25 Sep 2001 03:00:00 GMT  
 [Fwd: Source Code To Windows 98 (programmer humor) (fwd)]

Quote:


>> Actually main() returning void is a MS C extension, so they can use it
>> in their own programs, like Windows 98, with perfect impunity.

>Say what? I just wrote a console program under Linux that used "void
>main(void)". I never have used the int. I'm not even sure how.

Not sure how??  Well, rather than having the definition of main() read:
        void main( void )...

You have:
        int main( void )...

That was simple.  Then, when you are ready to exit, you can just call return
(or is it exit()?) with an integral value.  That's how the standard linux
commands give exit values.  Everything should have an exit value.

-Michael

--
Reply address is completely bogus.  The real address is:
        GEORGE <at symbol> MINTCITY <dot> COM
but in lowercase, not UPPERCASE
--
No, my friend, the way to have good and safe government, is not to trust it
all to one, but to divide it among the many, distributing to every one exactly
the functions he is competent to.  It is by dividing and subdividing these
republics from the national one down through all its subordinations, until it
ends in the administration of every man's farm by himself; by placing under
every one what his own eye may superintend, that all will be done for the
best.
                -- Thomas Jefferson, to Joseph Cabell, 1816



Tue, 25 Sep 2001 03:00:00 GMT  
 [Fwd: Source Code To Windows 98 (programmer humor) (fwd)]

Quote:



> >> Actually main() returning void is a MS C extension, so they can use it
> >> in their own programs, like Windows 98, with perfect impunity.

NO NO NO ... it *must* return int, despite anything thay M$ might say.

Quote:

> >Say what? I just wrote a console program under Linux that used "void
> >main(void)". I never have used the int. I'm not even sure how.

> Not sure how??  Well, rather than having the definition of main() read:
>         void main( void )...

> You have:
>         int main( void )...

> That was simple.  Then, when you are ready to exit, you can just call return
> (or is it exit()?) with an integral value.  That's how the standard linux
> commands give exit values.  Everything should have an exit value.

Only use exit() if you don't want destructors for auto objects to be called (i.e.
in general use return rather than exit)
Quote:

> -Michael



Tue, 25 Sep 2001 03:00:00 GMT  
 [Fwd: Source Code To Windows 98 (programmer humor) (fwd)]
Hello,

Quote:

> Say what? I just wrote a console program under Linux that used "void
> main(void)". I never have used the int. I'm not even sure how.

It works, but with a warning:

---------------------8<----------------
#include <stdio.h>

void main(){
  printf("Hello World\n");

Quote:
}


test.c: In function `main':
test.c:3: warning: return type of `main' is not `int'

Hello World

--------------------->8----------------

but with a return value, the warnings disappear:

---------------------8<----------------

#include <stdio.h>

int main(){
  printf("Hello World\n");
  return 0;

Quote:
}



Hello World

--------------------->8----------------

In the "real world", a program should return 0 if there was no error
and an error code if something went wrong.

Useful for things like

test || echo "Something went wrong";
test && echo "Cool, it worked!";

CU
Olaf
--
ACMEDIA - Cologne - Germany
professional and easy2use e-Commerce Systems
http://www.acmedia.de  http://www.buy-world.de



Tue, 25 Sep 2001 03:00:00 GMT  
 [Fwd: Source Code To Windows 98 (programmer humor) (fwd)]




   > >> Actually main() returning void is a MS C extension, so they can use it
   > >> in their own programs, like Windows 98, with perfect impunity.

   NO NO NO ... it *must* return int, despite anything thay M$ might say.

Look, I'm not one to defend Microsoft, but in this case they're in the
right.  An implementor may make any extensions to C that they like,
and the result is still C as long it doesn't cause any strictly
conforming program to become invalid, at least according to Annex G.5.
So Microsoft can make void main() a Microsoft C extension and use that
in their Microsoft C programs; no strictly conforming C program will
use void main(), so it won't affect them.

However, they should document that it's an extension, and I've been
told that they don't.
--
(supporter of the campaign for grumpiness where grumpiness is due in c.l.c)

Please: do not email me copies of your posts to comp.lang.c
        do not ask me C questions via email; post them instead



Tue, 25 Sep 2001 03:00:00 GMT  
 [Fwd: Source Code To Windows 98 (programmer humor) (fwd)]
On Fri, 09 Apr 1999 13:03:26 -0600, James Goldman

Quote:


>> Actually main() returning void is a MS C extension, so they can use it
>> in their own programs, like Windows 98, with perfect impunity.

>Say what? I just wrote a console program under Linux that used "void
>main(void)". I never have used the int. I'm not even sure how.

He said that it *is* a MS C extension; he didn't say that it *not* also an
extension found in Linux or elsewhere.

Clear those logic bugs in your head; maybe as a beneficial side effect
you will stop using void main.

In any case, recent releases of the EGCS compiler warn about main not returning
int, and if you do -pedantic-errors, will refuse to compile.



Tue, 25 Sep 2001 03:00:00 GMT  
 [Fwd: Source Code To Windows 98 (programmer humor) (fwd)]

Quote:

> On Fri, 09 Apr 1999 13:03:26 -0600, James Goldman


> >> Actually main() returning void is a MS C extension, so they can use it
> >> in their own programs, like Windows 98, with perfect impunity.

> >Say what? I just wrote a console program under Linux that used "void
> >main(void)". I never have used the int. I'm not even sure how.

> He said that it *is* a MS C extension; he didn't say that it *not* also an
> extension found in Linux or elsewhere.

But it *can't* be a MS-C extension and still conform to the std.

Nick



Tue, 25 Sep 2001 03:00:00 GMT  
 [Fwd: Source Code To Windows 98 (programmer humor) (fwd)]

Quote:
> > >> Actually main() returning void is a MS C extension, so they can use it
> > >> in their own programs, like Windows 98, with perfect impunity.

> > >Say what? I just wrote a console program under Linux that used "void
> > >main(void)". I never have used the int. I'm not even sure how.

> > He said that it *is* a MS C extension; he didn't say that it *not* also an
> > extension found in Linux or elsewhere.

> But it *can't* be a MS-C extension and still conform to the std.

It's an MS extension and (possibly) the standard way to code at MS. It
does not conform to the ANSI standard.

Gergo

--
When I was a kid I said to my father one afternoon, "Daddy, will you
take me to the zoo?" He answered, "If the zoo wants you let them come
and get you."
                -- Jerry Lewis

GU d- s:+ a--- C++>$ UL+++ P>++ L+++ E>++ W+ N++ o? K- w--- !O !M !V
PS+ PE+ Y+ PGP+ t* 5+ X- R>+ tv++ b+>+++ DI+ D+ G>++ e* h! !r !y+



Tue, 25 Sep 2001 03:00:00 GMT  
 [Fwd: Source Code To Windows 98 (programmer humor) (fwd)]

Quote:


>> On Fri, 09 Apr 1999 13:03:26 -0600, James Goldman


>> >> Actually main() returning void is a MS C extension, so they can use it
>> >> in their own programs, like Windows 98, with perfect impunity.

>> >Say what? I just wrote a console program under Linux that used "void
>> >main(void)". I never have used the int. I'm not even sure how.

>> He said that it *is* a MS C extension; he didn't say that it *not* also an
>> extension found in Linux or elsewhere.

>But it *can't* be a MS-C extension and still conform to the std.

Why not? There is such thing as a conforming extension. Of course, programs
that use it are non-conforming.


Tue, 25 Sep 2001 03:00:00 GMT  
 
 [ 28 post ]  Go to page: [1] [2]

 Relevant Pages 

1. [Fwd: New MVC++ programmer need info]

2. Windows '98 source code

3. [Fwd: Debug and no Source-Information about functions of a lib]

4. Win 98 Source code

5. custom control prefix (asp or fwd)

6. [Fwd: Need help with fprintf problem]

7. Fwd: last one

8. PLEASE READ: Help in writing a program (fwd)

9. [Fwd: FILE READ PROBLEM]

10. Fwd: Re: CUJ sep 97 review

11. [Fwd: How and where to install cc from to Solaris 2.6]

12. [Fwd: shutdown]

 

 
Powered by phpBB® Forum Software