[comp.sys.amiga.programmer] SAS/C -dSYMBOL="string" help

smithey@esosun.UUCP (Brian Smithey) (04/02/91)

Ran into a problem trying to move some code from Unix to my Amiga.
The Unix code is defining a string (filename, actually) on the
command line like this:

cc -DSOMESYMBOL -DFILE=\"filename\" yow.c

I'm trying to do this with SAS/C 5.10a (both directly at the
shell and via lmk, Lattice make), and can't get the double-quotes
escaped.  I've skimmed both the AmigaDOS manual and the SAS C
docs and haven't found anything that works.  I'd appreciate the
answer, but even more I'd like a pointer to where this is documented.

Oh yeah, I'm using lower-case -d (-dFILE=...) in lc, as documented.

Thanks,
Brian  <smithey@esosun.css.gov>


-- 
Brian Smithey / SAIC, Geophysics Division / San Diego CA
uucp:	   uunet!seismo!esosun!smithey
Internet:  smithey@esosun.css.gov

phil@adam.adelaide.edu.au (Phil Kernick) (04/03/91)

smithey@esosun.UUCP (Brian Smithey) writes:

>Ran into a problem trying to move some code from Unix to my Amiga.
>The Unix code is defining a string (filename, actually) on the
>command line like this:

>cc -DSOMESYMBOL -DFILE=\"filename\" yow.c

You can't.  It doesn't work.  It is a serious bug in lc and I have not
found a good workaround.

Maybe I should rewrite lc to be more like cc, or has someone already
done this?


Phil.


-- 
o|      ///   Phil Kernick              EMail:  phil@adam.adelaide.edu.au    |o
 |     ///    Departmental Engineer     Phone:  +618 228 5914                |
o| \\\///     Dept. of Psychology       Fax:    +618 224 0464                |o
 |  \///      University of Adelaide    Mail:   GPO Box 498 Adelaide SA 5001 |

david@starsoft.hou.tx.us (Dave Lowrey) (04/05/91)

In article <phil.670637728@adam.adelaide.edu.au> phil@adam.adelaide.edu.au (Phil Kernick) writes:
>
> smithey@esosun.UUCP (Brian Smithey) writes:
>
> >Ran into a problem trying to move some code from Unix to my Amiga.
> >The Unix code is defining a string (filename, actually) on the
> >command line like this:
>
> >cc -DSOMESYMBOL -DFILE=\"filename\" yow.c
>
> You can't.  It doesn't work.  It is a serious bug in lc and I have not
> found a good workaround.
>
> Maybe I should rewrite lc to be more like cc, or has someone already
> done this?

I use a "cc clone", written by Miles Bader.

It had a few bugs that I fixed, and I have updated it to work with
SAS/C.

I would post it, except I have not been able to contact the original
author to get his permission.

What is the general consensus....Is it OK to modify "PD" code, and re-
distribute it? I would, of course, give credit to the original author.

Dave Lowrey

----------------------------------------------------------------------------
These words be mine. The company doesn't care, because I am the company! :-)

      Dave Lowrey        |  david@starsoft.hou.tx.us
Starbound Software Group |
      Houston, TX        | "Dare to be stupid!" -- Weird Al Yankovic