INTRINS/iX
INTRINS/iX is a package of "MPE intrinsic look-alike" routines for use on
various Unix/Linux platforms, including HP-UX.
INTRINS/iX
Allegro Consultants, Inc.
2006-01-11
On MPE/iX, most intrinsics have uppercase names.
This is, however, not a rule, but a convention that has
signifanct exceptions to it. Unfortunately, a programmer looking
at the MPE/iX Intrinsics Reference Manual cannot determine if a
given intrinsic has an uppercase name (e.g., FOPEN), or
a lowercase name (e.g., dbbegin). This information can be
determined by looking at the SYSINTR.PUB.SYS file on MPE/iX,
or by running the CSEQ tool from Allegro Consultants. (CSEQ
reports the calling sequence for intrinsics.)
INTRINS/iX implements many MPE intrinsics, and also some
commonly used non-intrinsic routines. Finally, INTRINS/iX adds
over one hundred new routines, designed to aid in porting
programs from MPE to Unix-based systems (e.g., calendar_to_tm).
(The new routines are generally all lowercase names.)
Some additional routines were added, in lowercase, where
writing a complete intrinsic wasn't desirable or possible,
or to facilitate porting.
For example, in addition to emulating the FOPEN intrinsic, we
provide three new routines: open_new_file (to open a new
disk file), open_old_file (to open an existing disk file),
and open_printer.
Similarly, in addition to an
FGETINFO/FFILEINFO emulator, we also have get_file_creator,
get_file_dates, get_file_times, and get_file_eof_bytes.
JCWs and session variables posed a particular problem. Unix does
not support the concept of putenv() actually affecting anything
in the parent's environment. Thus, there is no supported Unix method
of passing an environmental variable back to the caller. Rather than
invent a method (which opens the wormhole of job/session temporary
storage), we simply support JCW in PUTJCW, and that is settable
only within a process.
The following is a list of the intrinsics we currently support.
Intrinsics supported:
ALMANAC
ASCII
BINARY
CALENDAR
CATCLOSE
CATOPEN
CATREAD
CCODE
CLOCK
COMMAND (note: calls system())
CREATE (partial)
CTRANSLATE (for code 0)
DASCII
DATELINE
DBINARY
DEBUG dummy but allows setting breakpoint in wdb/gdb
FATHER (no ccG returned)
FCHECK (only error# returned as non-0)
FCLOSE (partial)
FCONTROL (partial)
FERRMSG (using strerror)
FFILEINFO (partial)
FGETINFO (partial)
FINDJCW (for 16-bit integer values)
FLABELINFO (partial)
FLOCK (note: does FPOINT (0)); may need W access
FMTCALENDAR
FMTCLOCK
FMTDATE
FOPEN (partial)
FPOINT
FREAD
FREADDIR
FREADLABEL returns ccL
FRELATE (partial: 0 or $8001)
FUNLOCK (note: does FPOINT (0))
FUPDATE
FWRITE
FWRITEDIR
FWRITELABEL returns ccL
GENMESSAGE
GETJCW (if "JCW" has 16-bit integer value )
GETPRIVMODE (partial)
GETPROCID (32-bit result)
GETUSERMODE
HPCALENDAR
HPCICOMMAND (calls system())
HPCIGETVAR (partial)
HPDEBUG dummy but allows setting breakpoint in wdb/gdb
HPGETPROCPLABEL (partial)
HPSETCCODE
KILL (relaxed semantics)
PAUSE
PRINT
PRINTFILEINFO (different output)
PRINTOP (writes to /dev/console)
PROCINFO (partial)
PROCTIME (note: Unix might use 10-millisec incr)
PUTJCW (only for JCW; only affecting this process
QUIT
READ (acts like READX)
READX (minor differences)
RESETCONTROL
SETJCW (partial)
TERMINATE
TIMER
WHO (mapped semantics)
XCONTRAP
Note: the following routines are not officially classified as
"intrinsics" on MPE/iX, but they have been in the operating
system for many years, and are used by many programmers. They
are supported by INTRINS/iX:
ccode
ftnccode
genmsgu
mypin
thiscpu (returns 17)
The following routines are "extra" routines, which are not
intrinsics and not found in MPE/iX, but can be of value in porting
code from MPE/iX:
GENMSGU (uppercase version, identical to genmsgu)
PROCTIME_micro (note: Unix might use 10-millisec incr)
calendar32_gmt
calendar_gmt
calendar_to_tm
clock_gmt
clock_to_tm
dateline_gmt
extract_feq_parts
flush_stdout
fopen_file_via_pipe
fopen_printer
fsysux_fcheck
fsysux_fread_line
fsysux_set32
fsysux_set64
fsysux_set_errors
fsysux_version
genmsgu_file
get_errno
get_file_creator
get_file_dates
get_file_eof_bytes
get_file_eof_bytes64
get_file_times
get_hpcpuname
get_hpsusan
get_hpsusan_r
get_hpsysname
get_hpux_version
get_isatty
get_parent_pid
get_system_startup_time_secs
get_timezone
gmt_secs_to_loc_secs
loc_secs_to_gmt_secs
map_gid_to_gname
map_gname_to_gid
map_uid_to_uname
map_uname_to_home_dir
map_uname_to_uid
mark_file_ascii
open_file_via_pipe
open_new_file
open_new_file
open_newold_file
open_old_file
open_printer
printfileinfo_foreign
set_errno
ss_asc_to_commas
ss_check_file_exists
ss_clear_file_info
ss_cmd_file (:FILE command, an alternative to COMMAND ("FILE ..."))
ss_cmd_listeq
ss_cmd_reset
ss_fdefine
ss_fdefine_recchars
ss_fdefinev
ss_fdefinev1
ss_find_empty_feq
ss_find_feq
ss_find_mpe_filename_len
ss_flush_file_through_newline
ss_fmt_time_t
ss_fmti
ss_gen_temp_filename
ss_get_env_i16
ss_get_env_i32
ss_get_env_u16
ss_get_feq
ss_get_file_name
ss_get_token
ss_get_upshift_mpe
ss_is_file_null
ss_is_file_open
ss_listeq
ss_mode_to_aops
ss_record_file_ferr_errno
ss_remember_feq
ss_reset_feq
ss_reset_terminal
ss_set_upshift_mpe
ss_setup_terminal
ss_short_filename
ss_show_fid
ss_show_last_ferror
ss_show_open_mode
ss_system_to_file
ss_system_to_file2
ss_upshift_str
ss_yyddd_to_mmddyy
time_t_to_calendar32_clock
time_t_to_calendar_clock
ux_turn_off_echo
ux_turn_on_echo
Dummy routines...these are intrinsics we do not currently implement.
However, "dummy" versions are supplied, to allow a program that might
have a reference to them to be linked/loaded (for use in cases where
the developer "knows" that the routines won't actually be called).
If they are called, they report their name, and after the ninth
such call will terminate the process:
ACTIVATE
CAUSEBREAK
CREATEPROCESS
FDEVICECONTROL
FRENAME
FSETMODE
GETINFO
GETPRIORITY
GETPROCINFO
PRINTOPREPLY
//
-------------------------------------------------------------------
|