:: Re: [DNG] [Completely OT] Re: Fwd: …
Forside
Slet denne besked
Besvar denne besked
Skribent: Steve Litt
Dato:  
Til: dng
Emne: Re: [DNG] [Completely OT] Re: Fwd: Mini init script written in Perl boots.
On Mon, 20 Jun 2016 12:55:11 +0200
Edward Bartolo <edbarx@???> wrote:

> Hi KatolaZ,
>
> Thanks to your reading list, I downloaded "The C programming language"
> by (Kernighan & Ritchie) and I am reading it.
>
> P.S.
> That proof is a temptation to pass some time with when I can. I will
> attempt it. :)
>
> Edward


Maaaaaan, that brings back memories. 1984-1988, I roller biked, skated
and skateboarded all around Venice, Santa Monica, Culver City, West LA,
Hollywood and LA. Everywhere I went, in my backpack was "The C
programming language", ***FIRST EDITION***. That edition was half as
thick, and twice as mysterious. IIRC there was no such thing as
function prototypes in that book: Back then you declared function args
in some really weird syntax I was happy to forget.

By the early 1990's, my book was so shredded it could no longer be held
together by tape the way it had in the past half decade. I literally
wore out the book. I threw it in the trash, went on down to Opamp Books
(RIP), and bought the 2nd edition, which was a spectacular improvement.

I hope you're reading the 2nd edition, because the 1st edition was
quirky, too clever for its own good, and utterly obsolete by 1995.

By the way, the book that really taught me C in 1984 was this one:

http://www.barnesandnoble.com/w/c-puzzle-book-alan-r-feuer/1100482268?ean=9780201604610&quickview=true

And Edward, learn from my mistakes, never do this:

char * tweak_string(char * st){
  maxsize=1000;
  if (strlen(st)> maxsize-20)
     return NULL;
  char buf[maxsize];
  strcpy(buf, "pre_");
  strncat(buf, st, maxsize-20);
  buf[strlen(st)+3] = '\0';
  return(buf);
}


I should have gotten fired. It created an intermittent that took 2
weeks to track down. I never did it again.

SteveT

Steve Litt
June 2016 featured book: Troubleshooting: Why Bother?
http://www.troubleshooters.com/twb