-
Notifications
You must be signed in to change notification settings - Fork 0
/
os.init
55 lines (46 loc) · 1.84 KB
/
os.init
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
;*************************************************************************
; Copyright (c) 2002 The University of Chicago, as Operator of Argonne
; National Laboratory.
; Copyright (c) 2002 The Regents of the University of California, as
; Operator of Los Alamos National Laboratory.
; This file is distributed subject to a Software License Agreement found
; in the file LICENSE that is included with this distribution.
;*************************************************************************
COMMON SYSTEM_BLOCK,OS_SYSTEM
; os.init (R1.0)
if n_elements(OS_SYSTEM) eq 0 then $
OS_SYSTEM = { $
arch : !VERSION.ARCH, $
os : !VERSION.OS, $
os_family: !VERSION.OS_FAMILY, $
release : !VERSION.RELEASE, $
; build_date: !VERSION.BUILD_DATE, $
font : '-adobe-helvetica-bold-r-normal--24-*', $
device : !d.name, $
file_sep: '/', $
mkdir : 'mkdir', $ ; create a directory
chmod : 'chmod', $ ; command change file mode
mv : 'mv', $ ; command rename file
cp : 'cp', $ ; command copy file
rm : 'rm', $ ; command remove
lpr : 'lpr', $ ; command lpr
prt : 'enscript', $ ; command enscript
printer : '', $ ; default printer
wc : 'wc' $ ; command wc find lines
}
if !d.name eq 'WIN' then OS_SYSTEM.file_sep = '\'
; un-comment out the following line if mv does not work
if !d.name eq 'WIN' then OS_SYSTEM.mv = 'move'
if !d.name eq 'WIN' then OS_SYSTEM.rm = 'del'
if !d.name eq 'WIN' then OS_SYSTEM.cp = 'copy'
if !d.name eq 'WIN' then OS_SYSTEM.lpr = 'copy'
if !d.name eq 'WIN' then OS_SYSTEM.prt = 'copy'
if !d.name eq 'WIN' then OS_SYSTEM.printer = '\\sodium\funky-chicken'
defsysv,'!os',os_system
; if !d.name eq 'WIN' then CD,'C:\idl\viewer2.2'
!QUIET = 1
; loadct,39
if !d.n_colors gt !d.table_size then device,decompose=0
; required for IDL 6.1 VM / RT
p = getenv('IDL_USERDIR')
if strtrim(p,2) ne '' then cd,p