Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.lang.c    |    Meh, in C you gotta define EVERYTHING    |    243,242 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 242,642 of 243,242    |
|    Michael Sanders to Michael Sanders    |
|    Re: srand(0)    |
|    30 Dec 25 06:07:07    |
   
   From: porkchop@invalid.foo   
      
   On Fri, 26 Dec 2025 08:08:57 -0000 (UTC), Michael Sanders wrote:   
      
   > Yes it's just a variant. I still need to merge/harmonize   
   > this new way (popular with some folks here in the U.S.)   
   > with the older 'proper' way you & I learned it.   
      
   Merged & harmonized...   
      
   int main(int argc, char *argv[]) {   
      
    // if app named 'moo' play bulls & cows else mastermind   
    const char *p = strrchr(argv[0], '/');   
    p = p ? p + 1 : argv[0];   
    MOO = (strcmp(p, "moo") == 0) ? 1 : 0;   
      
    int s = play(get_seed(argc, argv));   
    fflush(stdout);   
    fprintf(stderr, "%d\n", s);   
      
    return 0;   
      
   }   
      
   --   
   :wq   
   Mike Sanders   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca