HP3000-L Archives

April 1998, Week 2

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Michael Kennett <[log in to unmask]>
Reply To:
[log in to unmask][log in to unmask], 10 Apr 1998 13:38:13 -0400452_ISO-8859-1 We are in need of some troubleshooting assistance on our local area
network at our facility in El Paso, Texas. If anyone has any
recommendations or if you are a provider of such services, please
contact me (preferably off-list). Thanks.

Jim Phillips Manager of Information Systems
E-Mail: [log in to unmask] Therm-O-Link, Inc.
Phone: (330) 527-2124 P. O. Box 285
Fax: (330) 527-2123 Garrettsville, Ohio 4423153_10Apr199813:38:[log in to unmask]
Date:
Tue, 7 Apr 1998 18:46:00 +0800
Content-Type:
text/plain
Parts/Attachments:
text/plain (66 lines)
Hello All!

This post is really a newby request for help on how to do
quoting within the MPE command interpreter (CI).

After changing the group/user permissions to include PH (Process
Handling) capability, I can execute programs that are build with
the c89 compiler. Thank you all for your help :-)

However, I have another problem with the c89 compiler. This problem
has to do with the "-D" command line switch that is used to define
symbols ~ it is equivalent to a #define embedded in the code.

Consider the following (fancy) "Hello World" program, that I want
to 'internationalize' by allowing the greeting "Hello" to be changed
at compile time. (e.g. The Australian version should have "G'day")
[OK - its a very bad form of internationalization...]

#include <stdio.h>

int main()
{
        printf(HELLO);
        printf(" world!\n");

        return 0;
}


To build this program, I would like to issue a command like:

c89 -o hello -DHELLO=\"G\'day\" hello.c

Note the use of the backslash (\) to remove the interpretation of the
quote characters by the shell.

This command works in Unix (with gcc), but when I try it on the HP 3000
inside the Posix shell I get an error:

shell/iX> c89 -o hello -DHELLO=\"G\'day\" hello.c
    ccomxl.pub.sys;info="-Ap -DHELLO="G'day" ";parm=7
                                      ^
Encountered an unexpected word. (CIERR 10061)
    ccomxl.pub.sys;info="-Ap -DHELLO="G'day" ";parm=7
    ^
Implied run command failed due to parser error. (CIERR 9057)
c89: warning:  compile of './hello.c' failed
c89: error:  one or more compiles failed; aborted


As can be seen from the error output above c89 is a shell script
front end to the MPE CI compiler. The quoting works within the
context of the shell, but it then breaks down inside the info="..."
parameter passed in MPE.

How can the double quotes inside the MPE info parameter be quoted,
so as to preserve their special meaning?

Any help on this matter is appreciated,

Michael Kennett
([log in to unmask])

(Usual disclaimer: my employer is innocent. They didn't do it - I
did it, etc....)

ATOM RSS1 RSS2