Skip to content

Commit

Permalink
Implement $*OS, $*OSVER and a hugely cheating and lying $*PID.
Browse files Browse the repository at this point in the history
  • Loading branch information
jnthn committed Feb 10, 2010
1 parent c36e0f4 commit 3a94b96
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/cheats/setup-io.pm
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,22 @@ INIT {
set_hll_global ['PROCESS'], "$OUT", $P0
$P0 = find_lex '$ERR'
set_hll_global ['PROCESS'], '$ERR', $P0
## Parrot doesn't give us the PID for now. Well, this file *is*
## in the cheats directory... :-)
$P0 = box 0
set_hll_global ['PROCESS'], '$PID', $P0

## set up $*OS, $*OSVER $*EXECUTABLE_NAME
.include 'sysinfo.pasm'
.local string info
info = sysinfo .SYSINFO_PARROT_OS
$P0 = new ['Str']
$P0 = info
set_hll_global ['PROCESS'], '$OS', $P0
info = sysinfo .SYSINFO_PARROT_OS_VERSION
$P0 = new ['Str']
$P0 = info
set_hll_global ['PROCESS'], '$OSVER', $P0
}
}

0 comments on commit 3a94b96

Please sign in to comment.