File: commacs

package info (click to toggle)
unzip 5.40-1
  • links: PTS
  • area: non-free
  • in suites: potato
  • size: 4,120 kB
  • ctags: 5,900
  • sloc: ansic: 40,977; cpp: 3,778; makefile: 1,384; asm: 1,228; sh: 133
file content (85 lines) | stat: -rw-r--r-- 1,869 bytes parent folder | download | duplicates (3)
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
?section CC ROUTINE
#FRAME
[#PUSH stem src obj htime file prev time stime otime
       comp out options sup buf col locn group
]

[#IF [#ARGUMENT /VALUE src/ WORD /SPACE/ END]]
[#IF [#EMPTYV src] |THEN|
  #OUTPUT Syntax: CC <file> <collector> <comp-options>
  #RESET FRAMES
  #RETURN
]

[#IF NOT [#FILEINFO /EXISTENCE/ [src]]
|THEN|
  #OUTPUT [src] does not exist !
  #RESET FRAMES
  #RETURN
]

#SETV stem src
#CHARDEL stem [#CHARCOUNT stem]
#SET obj [stem]O

[#IF [#ARGUMENT /VALUE out/ DEVICE END]]
[#IF [#EMPTYV out] |THEN| #SET out $T.#C]

#SETMANY col group, [#FILEINFO /VOLUME, SUBVOL/ [out]]
#SET locn [group].[stem]
#SET sup [#LOOKUPPROCESS /ANCESTOR/ [col]]


#SET options [#REST]

== Find newest Header file
#SET htime 0
#SET file [#FILENAMES /MAXIMUM 1/ *H]
[#LOOP |WHILE| NOT [#EMPTYV file]
|DO|
  #SET time [#FILEINFO /MODIFICATION/ [file]]
  [#IF time > htime |THEN| #SETV htime time]

  #SETV prev file
  #SET file [#FILENAMES /MAXIMUM 1, PREVIOUS [prev]/ *H]
]

#SET stime [#FILEINFO /MODIFICATION/ [src]]
#SET otime [#FILEINFO /MODIFICATION/ [obj]]

#SET comp 0

[#IF otime < htime
|THEN|
  #OUTPUT Header file(s) changed since object [obj] compiled
  #SET comp -1
]

[#IF otime < stime
|THEN|
  #OUTPUT Source file [src] changed since object [obj] compiled
  #SET comp -1
]

[#IF comp
|THEN|
  SPOOLCOM /OUTV buf/ OPEN [sup];JOB (OWNER, LOC [locn]),STATUS,DELETE !
  #OUTPUTV buf
  #OUTPUT Compiling [src]...
  C /IN [src], OUT [out].[stem]/[obj];SYMBOLS,HIGHPIN [options]
  [#CASE [tacl^completioncode]
  | 0 |
    #OUTPUT Compiled OK: [src]
    SPOOLCOM /OUTV buf/ OPEN [sup];JOB (OWNER, LOC [locn]),STATUS,DELETE !
    #SET _completion:completioncode 0
  | 1 |
    #OUTPUT [src]: Compile Warnings
  |OTHERWISE|
    #OUTPUT [src]: Compile FAILED !
  ]
|ELSE|
  #OUTPUT Object file [obj] is up to date
  #SET _completion:completioncode 0
]

#UNFRAME