HP3000-L Archives

December 1995, Week 1

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:
Jeff Kell <[log in to unmask]>
Reply To:
Jeff Kell <[log in to unmask]>
Date:
Fri, 1 Dec 1995 11:48:15 EST
Content-Type:
text/plain
Parts/Attachments:
text/plain (57 lines)
On Fri, 1 Dec 1995 03:46:10 GMT Mike Paivinen said:
>Jeff Kell ([log in to unmask]) wrote:
>: The really weird thing is you can (currently) take a relatively simple 'c'
>: program to display its args and maybe ctime() or getenv(), compile it under
>: MPE and save it, compile it under posix and save it.  Now run both programs
>: with a few arguments from the shell and from the CI.  You can potentially
>: get four different results FROM THE SAME SOURCE CODE!
>
>It looks like you've done this before.  Would you post an example to
>illustrate your point?
 
Well, it's nothing "drastic" unless you get a bit more exotic, but you should
be aware of these things if you're mixing and matching legacy MPE with Posix:
 
shell/iX> ccposix one two three
argc=4,parm=0,info=[].               [parm/info is really cheating, but
argv[0] = [ccposix]                   the differences in how they are
argv[1] = [one]                       handled should be understood by
argv[2] = [two]                       anyone mixing legacy MPE and Posix]
argv[3] = [three]
ctime=Fri Dec  1 16:45:32 1995
TZ=[GMT0], TERM=[hp2392a]            [set by HP-supplied /etc/profile ]
 
shell/iX> CCMPE one two three            [Odd parm value, but ctime is
argc=4,parm=333,info=[one two three].     correct, and note that the shell
argv[0] = [CCMPE.MANAGER.SYS]             environment vars aren't inherited
argv[1] = [one]                           by getenv() from the MPE code.
argv[2] = [two]                           Also note argv[0] returns fname,
argv[3] = [three]                         group,account even if in HFS dirs;
ctime=Fri Dec  1 11:45:41 1995            Returns null if an HFS progname.
TZ=[], TERM=[]                            Note info string here, no info
                                          above]
shell/ix> exit
 
(MANAGER.SYS): ./ccposix "one two three"   [Now ctime is right (without
argc=4,parm=0,info=[one two three].         having TZ set, but we have
argv[0] = []                                a null argv[0], and the posix
argv[1] = [one]                             code now sees an info= string]
argv[2] = [two]
argv[3] = [three]
ctime=Fri Dec  1 11:53:06 1995
TZ=[], TERM=[]
 
(MANAGER.SYS): CCMPE "one two three"
argc=4,parm=0,info=[one two three].
argv[0] = [CCMPE.MANAGER.SYS]
argv[1] = [one]
argv[2] = [two]
argv[3] = [three]
ctime=Fri Dec  1 11:53:31 1995
TZ=[], TERM=[]
 
This was standard includes and standard libraries.  You can probably get
some other permutations if you're custom-linking other libraries.
 
Jeff Kell <[log in to unmask]>

ATOM RSS1 RSS2