On Mon, 25 Oct 1999, Linke, Andreas Dr. wrote:
> > Date: 22 Oct 1999 18:38:13 -0700
> > From: Bob Ebert <[EMAIL PROTECTED]>
> > Your sources, however, are toast.  VoidHand and Handle no 
> > longer exist.  In
> > general, you'll need to search/replace them with MemHandle.
> 
> My sources are toast???? That was exactly the answer I feared. Search and
> replace may be a good approach for my first 1000 lines toy program but it is
> definitely not a solution for professional software development. Even the
> simple thing of adding additional "compatibility" headers can be a pain if
> you do shared development.

  two options:

  1 copy everything to a unix system.. write a few shell scripts that
    search and replace the strings "VoidHand" and "Handle" with the 
    string "MemHandle"

    sed -e s/Handle/MemHandle/g -e s/VoidHand/MemHandle/g file.c > file.c

    messy.. (but you gotta love unix) :>>
 
  2 write a header file that does this:

    #undef VoidHand             // if it was declared, toast it
    #define VoidHand MemHandle
    #undef Handle               // if it was declared, toast it
    #define Handle MemHandle

  the new headers wont have VoidHand and Handle - which have been
  replaced by the typedef MemHandle. these lines of code should work
  the only problem here is that you still have the old declarations
  used.. forget the #defines and your code is toast. the first solution
  is the best, but... is much harder to do. 

  i believe that your source is TOAST *only* if you compile under a 
  the new headers. if you dont use the new headers.. you dont have a
  problem :> - i remember them saying it does not affect binaries.. 
  only source code.

  PS: the preprocessor is your FRIEND.. i miss that in Java :(

  cheers.

az.
--
Aaron Ardiri 
Lecturer                       http://www.hig.se/~ardiri/
University-College i G�vle     mailto:[EMAIL PROTECTED]
SE 801 76 G�vle SWEDEN       
Tel: +46 26 64 87 38           Fax: +46 26 64 87 88
Mob: +46 70 656 1143           A/H: +46 26 10 16 11

Reply via email to