mirror of
https://github.com/9fans/plan9port.git
synced 2025-01-12 11:10:07 +00:00
odds and ends
This commit is contained in:
parent
e12fa2a49b
commit
7e42d21012
14 changed files with 1454 additions and 5 deletions
106
bin/.cvsignore
Normal file
106
bin/.cvsignore
Normal file
|
@ -0,0 +1,106 @@
|
|||
9grep
|
||||
9p
|
||||
9pserve
|
||||
9sed
|
||||
9term
|
||||
9yacc
|
||||
_mk
|
||||
acid
|
||||
acidtypes
|
||||
acme
|
||||
aescbc
|
||||
ascii
|
||||
astro
|
||||
basename
|
||||
bc
|
||||
bmp
|
||||
bunzip2
|
||||
bzip2
|
||||
cal
|
||||
calendar
|
||||
cat
|
||||
cleanname
|
||||
cmp
|
||||
comm
|
||||
date
|
||||
db
|
||||
dc
|
||||
deroff
|
||||
dict
|
||||
diff
|
||||
echo
|
||||
ed
|
||||
factor
|
||||
fmt
|
||||
fortune
|
||||
freq
|
||||
fsize
|
||||
gif
|
||||
graph
|
||||
grep9
|
||||
gunzip
|
||||
gzip
|
||||
hoc
|
||||
htmlfmt
|
||||
ico
|
||||
idiff
|
||||
join
|
||||
jpg
|
||||
look
|
||||
ls
|
||||
mapd
|
||||
mc
|
||||
md5sum
|
||||
mk
|
||||
mkdir
|
||||
mtime
|
||||
namespace
|
||||
news
|
||||
p
|
||||
pbd
|
||||
plot
|
||||
plumb
|
||||
plumber
|
||||
png
|
||||
ppm
|
||||
pr
|
||||
primes
|
||||
ramfs
|
||||
rc
|
||||
rio
|
||||
rm
|
||||
sam
|
||||
samterm
|
||||
scat
|
||||
seq
|
||||
sha1sum
|
||||
sleep
|
||||
sort
|
||||
split
|
||||
sprog
|
||||
strings
|
||||
sum
|
||||
tail
|
||||
tcs
|
||||
tee
|
||||
test
|
||||
testfdpass
|
||||
time
|
||||
togif
|
||||
toico
|
||||
topng
|
||||
toppm
|
||||
touch
|
||||
tr
|
||||
tweak
|
||||
unicode
|
||||
uniq
|
||||
units
|
||||
unutf
|
||||
unzip
|
||||
wc
|
||||
win
|
||||
xd
|
||||
yacc
|
||||
yuv
|
||||
zip
|
2
dict/.cvsignore
Normal file
2
dict/.cvsignore
Normal file
|
@ -0,0 +1,2 @@
|
|||
pgw
|
||||
pgwindex
|
1
lib/.cvsignore
Normal file
1
lib/.cvsignore
Normal file
|
@ -0,0 +1 @@
|
|||
fortunes.index
|
597
lib/units
Normal file
597
lib/units
Normal file
|
@ -0,0 +1,597 @@
|
|||
/order of evaluation
|
||||
/ + -
|
||||
/ * /
|
||||
/ juxtaposition (meaning *)
|
||||
/ ¹ ² ³ ^
|
||||
/ | (meaning /)
|
||||
/ name number ()
|
||||
|
||||
/dimensions
|
||||
m #
|
||||
kg #
|
||||
sec #
|
||||
coul #
|
||||
candela #
|
||||
$ #
|
||||
radian #
|
||||
bit #
|
||||
erlang #
|
||||
°K #
|
||||
°C #
|
||||
°F #
|
||||
|
||||
/constants
|
||||
|
||||
π 3.14159265358979323846
|
||||
pi π
|
||||
c 2.997925e+8 m/sec
|
||||
g 9.80665 m/sec²
|
||||
au 1.49597871e+11 m
|
||||
mole 6.022169e+23
|
||||
e 1.6021917e-19 coul
|
||||
energy c²
|
||||
force g
|
||||
mercury 1.33322e+5 kg/m²sec²
|
||||
hg mercury
|
||||
h 6.62620e-34 m²kg/sec
|
||||
ℏ h/2 π
|
||||
hbar ℏ
|
||||
nonillion 1e30
|
||||
octillion 1e27
|
||||
septillion 1e24
|
||||
sextillion 1e21
|
||||
pentillion 1e18
|
||||
quadrillion 1e15
|
||||
trillion 1e12
|
||||
billion 1e9
|
||||
million 1e6
|
||||
thousand 1e3
|
||||
hundred 1e2
|
||||
|
||||
/dimensionless
|
||||
|
||||
° 1|180 π radian
|
||||
degree °
|
||||
circle 2 π radian
|
||||
turn 2 π radian
|
||||
grad .9 °
|
||||
arcdeg 1 °
|
||||
arcmin 1|60 °
|
||||
arcsec 1|3600 °
|
||||
ccs 1|36 erlang
|
||||
|
||||
steradian radian²
|
||||
sphere 4 π steradian
|
||||
sr steradian
|
||||
giga 1024 1024 1024
|
||||
|
||||
/Time
|
||||
|
||||
second sec
|
||||
s sec
|
||||
minute 60 sec
|
||||
min minute
|
||||
hour 60 min
|
||||
hr hour
|
||||
day 24 hr
|
||||
da day
|
||||
week 7 day
|
||||
year 365.24219879 day
|
||||
yr year
|
||||
month 1|12 year
|
||||
ms millisec
|
||||
us microsec
|
||||
|
||||
/Mass
|
||||
|
||||
gram millikg
|
||||
gm gram
|
||||
mg milligram
|
||||
metricton kilokg
|
||||
|
||||
/Avoirdupois
|
||||
|
||||
lb .45359237 kg
|
||||
lbf lb g
|
||||
pound lb
|
||||
ounce 1|16 lb
|
||||
oz ounce
|
||||
dram 1|16 oz
|
||||
dr dram
|
||||
grain 1|7000 lb
|
||||
gr grain
|
||||
shortton 2000 lb
|
||||
ton shortton
|
||||
longton 2240 lb
|
||||
|
||||
/Apothecary
|
||||
|
||||
scruple 20 grain
|
||||
apdram 60 grain
|
||||
apounce 480 grain
|
||||
troyounce apounce
|
||||
appound 5760 grain
|
||||
troypound appound
|
||||
|
||||
/Length
|
||||
|
||||
meter m
|
||||
cm centimeter
|
||||
mm millimeter
|
||||
km kilometer
|
||||
nm nanometer
|
||||
micron micrometer
|
||||
µ micrometer
|
||||
Å decinanometer
|
||||
angstrom Å
|
||||
|
||||
inch 2.54 cm
|
||||
" inch
|
||||
in inch
|
||||
inches inch
|
||||
' 12"
|
||||
foot 12 in
|
||||
feet foot
|
||||
ft foot
|
||||
yard 3 ft
|
||||
yd yard
|
||||
rod 5.5 yd
|
||||
rd rod
|
||||
mile 5280 ft
|
||||
mi mile
|
||||
|
||||
british 1200|3937 m/ft
|
||||
nmile 1852 m
|
||||
|
||||
acre 4840 yd²
|
||||
|
||||
cc cm³
|
||||
liter kilocc
|
||||
ml milliliter
|
||||
|
||||
/US Liquid
|
||||
|
||||
gallon 231 in³
|
||||
imperial 1.20095
|
||||
epa 0.8
|
||||
gal gallon
|
||||
quart 1|4 gal
|
||||
qt quart
|
||||
pint 1|2 qt
|
||||
pt pint
|
||||
|
||||
floz 1|16 pt
|
||||
fldr 1|8 floz
|
||||
|
||||
/US Dry
|
||||
|
||||
dry 268.8025 in³/gallon
|
||||
peck 8 dry quart
|
||||
pk peck
|
||||
bushel 4 peck
|
||||
bu bushel
|
||||
|
||||
/British
|
||||
|
||||
brgallon 277.420 in³
|
||||
brquart 1|4 brgallon
|
||||
brpint 1|2 brquart
|
||||
brfloz 1|20 brpint
|
||||
brpeck 554.84 in³
|
||||
brbushel 4 brpeck
|
||||
|
||||
/Energy Work
|
||||
|
||||
newton kg m/sec²
|
||||
nt newton
|
||||
joule nt m
|
||||
cal 4.1868 joule
|
||||
|
||||
/Electrical
|
||||
|
||||
coulomb coul
|
||||
ampere coul/sec
|
||||
amp ampere
|
||||
watt joule/sec
|
||||
volt watt/amp
|
||||
Ω volt/amp
|
||||
ohm Ω
|
||||
mho 1/Ω
|
||||
farad coul/volt
|
||||
henry sec²/farad
|
||||
weber volt sec
|
||||
|
||||
/Light
|
||||
|
||||
cd candela
|
||||
lumen cd sr
|
||||
lux cd sr/m²
|
||||
|
||||
/ MONEY DATE
|
||||
/ Fri Oct 27 15:52:13 EDT 2000
|
||||
|
||||
/ MONEY START
|
||||
argentpeso 1 | .9998 $
|
||||
australiadollar 1 | 1.9175 $
|
||||
brazilreal 1 | 1.9300 $
|
||||
britainpound 1 | .6972 $
|
||||
canadadollar 1 | 1.5237 $
|
||||
chilepeso 1 | 576.45 $
|
||||
chinayuan 1 | 8.2782 $
|
||||
colombiapeso 1 | 2165.00 $
|
||||
czechrepkoruna 1 | 42.11 $
|
||||
denmarkkrone 1 | 9.0134 $
|
||||
dominicanpeso 1 | 16.00 $
|
||||
egyptpound 1 | 3.6750 $
|
||||
euro 1 | 1.08863 $
|
||||
hongkongdollar 1 | 7.7991 $
|
||||
hungaryforint 1 | 317.59 $
|
||||
indiarupee 1 | 46.600 $
|
||||
indnsiarupiah 1 | 9025.00 $
|
||||
israelshekel 1 | 4.1450 $
|
||||
japanyen 1 | 108.34 $
|
||||
jordandinar 1 | .71098 $
|
||||
lebanonpound 1 | 1514.00 $
|
||||
malaysiaringgit 1 | 3.7996 $
|
||||
mexicopeso 1 | 9.6850 $
|
||||
newzealanddollar 1 | 2.4938 $
|
||||
norwaykrone 1 | 9.5940 $
|
||||
pakistanrupee 1 | 57.75 $
|
||||
perunewsol 1 | 3.510 $
|
||||
philpinspeso 1 | 50.10 $
|
||||
polandzloty 1 | 4.70 $
|
||||
russiaruble 1 | 27.9200 $
|
||||
sdr 1 | .7841 $
|
||||
saudiarabriyal 1 | 3.7508 $
|
||||
singaporedollar 1 | 1.7546 $
|
||||
slovakrepkoruna 1 | 52.65 $
|
||||
southafricarand 1 | 7.6725 $
|
||||
southkoreawon 1 | 1137.20 $
|
||||
swedenkrona 1 | 10.2621 $
|
||||
switzerlndfranc 1 | 1.8195 $
|
||||
taiwandollar 1 | 32.09 $
|
||||
thailandbaht 1 | 43.58 $
|
||||
turkeylira 1 | 687860 $
|
||||
uaedirham 1 | 3.6728 $
|
||||
uruguaynewpeso 1 | 12.4180 $
|
||||
venezuelabolivar 1 | 693.2500 $
|
||||
/ MONEY END
|
||||
|
||||
€ euro
|
||||
£ britainpound
|
||||
¥ japanyen
|
||||
dollar $
|
||||
|
||||
bef 1 | 40.3399 €
|
||||
belgiumfranc bef
|
||||
dem 1 | 1.95583 €
|
||||
germanymark dem
|
||||
grd 1 | 340.750 €
|
||||
greecedrachma grd
|
||||
esp 1 | 166.386 €
|
||||
spainpeseta esp
|
||||
frf 1 | 6.55957 €
|
||||
francefranc frf
|
||||
iep 1 | .787564 €
|
||||
irelandpunt iep
|
||||
itl 1 | 1936.27 €
|
||||
italylira itl
|
||||
luf 1 | 40.3399 €
|
||||
luxembourgfranc luf
|
||||
nlg 1 | 2.20371 €
|
||||
netherlandsguilder nlg
|
||||
ats 1 | 13.7603 €
|
||||
austriaschilling ats
|
||||
pte 1 | 200.482 €
|
||||
portugalescudo pte
|
||||
fim 1 | 5.94573 €
|
||||
finlandmark fim
|
||||
|
||||
baht thailandbaht
|
||||
bolivar venezuelabolivar
|
||||
brpound britainpound
|
||||
dinar jordandinar
|
||||
dirham uaedirham
|
||||
drachma greecedrachma
|
||||
escudo portugalescudo
|
||||
forint hungaryforint
|
||||
franc francefranc
|
||||
guilder netherlandsguilder
|
||||
krona swedenkrona
|
||||
lira italylira
|
||||
mark germanymark
|
||||
peseta spainpeseta
|
||||
peso mexicopeso
|
||||
punt irelandpunt
|
||||
rand southafricarand
|
||||
real brazilreal
|
||||
yuan chinayuan
|
||||
ringgit malaysiaringgit
|
||||
riyal saudiarabriyal
|
||||
ruble russiaruble
|
||||
rupee indiarupee
|
||||
rupiah indnsiarupiah
|
||||
shekel israelshekel
|
||||
sol perunewsol
|
||||
won southkoreawon
|
||||
yen japanyen
|
||||
zloty polandzloty
|
||||
|
||||
usdollar dollar
|
||||
sterling britainpound | pound
|
||||
poundsterling britainpound
|
||||
|
||||
/bits
|
||||
|
||||
baud bit/sec
|
||||
byte 8 bit
|
||||
short 2 byte
|
||||
long 4 byte
|
||||
vlong 8 bytes
|
||||
frame 2352 byte
|
||||
|
||||
/Australian liquid measure
|
||||
|
||||
pony 7 brfloz
|
||||
midie 10 brfloz
|
||||
pot midie
|
||||
handle midie
|
||||
schooner 15 brfloz
|
||||
jug 40 brfloz
|
||||
resch midie
|
||||
alf midie
|
||||
tinny 13 brfloz
|
||||
stubby tinny
|
||||
twisty 250 ml
|
||||
longneck 2 tinny
|
||||
slab 24 tinny
|
||||
sixpack 6 tinny
|
||||
nip brfloz
|
||||
|
||||
/wine
|
||||
winebottle 750 ml
|
||||
balthazar 16 winebottle
|
||||
jeroboam 4 winebottle
|
||||
magnum 2 winebottle
|
||||
mathusalem 8 winebottle
|
||||
methuselah 8 winebottle
|
||||
nebuchadnezzar 20 winebottle
|
||||
rehoboam 6 winebottle
|
||||
salmanazar 12 winebottle
|
||||
split 0.25 winebottle
|
||||
jigger 1.5 floz
|
||||
|
||||
/Trivia
|
||||
|
||||
% 1|100
|
||||
admiraltyknot 6080 ft/hr
|
||||
ε₀ (1e-9/36π) farad/m
|
||||
α (1/4π ε₀) e²/ℏ c
|
||||
alpha α
|
||||
apostilb cd/π m²
|
||||
are 1e+2 m²
|
||||
arpentcan 27.52 mi
|
||||
arpentlin 191.835 ft
|
||||
astronomicalunit au
|
||||
atmosphere 1.01325e+5 nt/m²
|
||||
atm atmosphere
|
||||
atomicmassunit 1.66044e-27 kg
|
||||
amu atomicmassunit
|
||||
bag 94 lb
|
||||
bakersdozen 13
|
||||
bar 1e+5 nt/m²
|
||||
barie 1e-1 nt/m²
|
||||
barleycorn 1|3 in
|
||||
barn 1e-28 m²
|
||||
barrel 42 gal
|
||||
barye 1e-1 nt/m²
|
||||
bev 1e+9 e volt
|
||||
biot 10 amp
|
||||
blondel cd/π m²
|
||||
boardfoot 144 in³
|
||||
bolt 40 yd
|
||||
bottommeasure 1|40 in
|
||||
britishthermalunit 1.05506e+3 joule
|
||||
btu britishthermalunit
|
||||
quad 1.0e+15 btu
|
||||
refrigeration 12000 btu/ton hour
|
||||
buck dollar
|
||||
cable 720 ft
|
||||
caliber 1e-2 in
|
||||
calorie cal
|
||||
carat 205 mg
|
||||
cent centidollar
|
||||
cental 100 lb
|
||||
centesimalminute 1e-2 grad
|
||||
centesimalsecond 1e-4 grad
|
||||
century 100 year
|
||||
cfs ft³/sec
|
||||
chain 66 ft
|
||||
circularinch 1|4 π in²
|
||||
circularmil 1e-6|4 π in²
|
||||
clusec 1e-8 mm hg m³/s
|
||||
coomb 4 bu
|
||||
cord 128 ft³
|
||||
cordfoot cord
|
||||
crith 9.06e-2 gm
|
||||
cubit 18 in
|
||||
cup 1|2 pt
|
||||
curie 3.7e+10/sec
|
||||
cusec ft³/sec
|
||||
dalton amu
|
||||
decade 10 yr
|
||||
degK °K
|
||||
degC °C
|
||||
degF °F
|
||||
dipotre 1/m
|
||||
displacementton 35 ft³
|
||||
doppelzentner 100 kg
|
||||
dozen 12
|
||||
drop .03 cm³
|
||||
dyne cm gm/sec²
|
||||
electronvolt e volt
|
||||
ell 45 in
|
||||
engineerschain 100 ft
|
||||
engineerslink 100|100 ft
|
||||
equivalentfootcandle lumen/π ft²
|
||||
equivalentlux lumen/π m²
|
||||
equivalentphot cd/π cm²
|
||||
erg cm²gm/sec²
|
||||
ev e volt
|
||||
faraday 9.652e+4 coul
|
||||
fathom 6 ft
|
||||
fermi 1e-15 m
|
||||
fifth 4|5 qt
|
||||
fin 5 dollar
|
||||
finger 7|8 in
|
||||
firkin 9 gal
|
||||
footcandle lumen/ft²
|
||||
footlambert cd/π ft²
|
||||
fortnight 14 da
|
||||
franklin 3.33564e-10 coul
|
||||
frigorie kilocal
|
||||
furlong 220 yd
|
||||
galileo 1e-2 m/sec²
|
||||
gamma 1e-9 weber/m²
|
||||
gauss 1e-4 weber/m²
|
||||
geodeticfoot british ft
|
||||
geographicalmile 1852 m
|
||||
gilbert 7.95775e-1 amp
|
||||
gill 1|4 pt
|
||||
gross 144
|
||||
gunterschain 22 yd
|
||||
hand 4 in
|
||||
hectare 1e+4 m²
|
||||
hefnercandle .92 cd
|
||||
hertz 1/sec
|
||||
hogshead 2 barrel
|
||||
hd hogshead
|
||||
homestead 1|4 mi²
|
||||
horsepower 550 ft lb g/sec
|
||||
hp horsepower
|
||||
hyl gm force sec²/m
|
||||
hz 1/sec
|
||||
imaginarycubicfoot 1.4 ft³
|
||||
karat 1|24
|
||||
kcal kilocal
|
||||
kcalorie kilocal
|
||||
kev 1e+3 e volt
|
||||
key kg
|
||||
khz 1e+3/sec
|
||||
kilderkin 18 gal
|
||||
knot nmile/hr
|
||||
kwh kilowatt hour
|
||||
lambert cd/π cm²
|
||||
langley cal/cm²
|
||||
last 80 bu
|
||||
league 3 mi
|
||||
lightyear c yr
|
||||
ly lightyear
|
||||
lightsecond c sec
|
||||
line 1|12 in
|
||||
link 66|100 ft
|
||||
longhundredweight 112 lb
|
||||
longquarter 28 lb
|
||||
lusec 1e-6 mm hg m³/s
|
||||
mach 331.46 m/sec
|
||||
marineleague 3 nmile
|
||||
maxwell 1e-8 weber
|
||||
metriccarat 200 mg
|
||||
mev 1e+6 e volt
|
||||
mgd megagal/day
|
||||
mh millihenry
|
||||
mhz 1e+6/sec
|
||||
mil 1e-3 in
|
||||
millenium 1000 year
|
||||
minersinch 1.5 ft³/min
|
||||
minim 1|60 fldr
|
||||
mo month
|
||||
mpg mile/gal
|
||||
mph mile/hr
|
||||
nail 1|16 yd
|
||||
nauticalmile nmile
|
||||
nit cd/m²
|
||||
noggin 1|8 qt
|
||||
nox 1e-3 lux
|
||||
ns nanosec
|
||||
oersted 2.5e+2 amp/m π
|
||||
oe oersted
|
||||
pace 36 in
|
||||
palm 3 in
|
||||
parasang 3.5 mi
|
||||
parsec au radian/arcsec
|
||||
pascal nt/m²
|
||||
pc parsec
|
||||
pennyweight 1|20 oz
|
||||
percent %
|
||||
perch rd
|
||||
pf picofarad
|
||||
phot lumen/cm²
|
||||
pica 1|6 in
|
||||
pieze 1e+3 nt/m²
|
||||
pipe 4 barrel
|
||||
point 1|72 in
|
||||
poise gm/cm sec
|
||||
pole rd
|
||||
poundal ft lb/sec²
|
||||
pdl poundal
|
||||
proof 1/200
|
||||
psi lb g/in²
|
||||
quarter 9 in
|
||||
quartersection 1|4 mi²
|
||||
quintal 100 kg
|
||||
quire 25
|
||||
rad 100 erg/gm
|
||||
ream 500
|
||||
registerton 100 ft³
|
||||
rhe 10 m²/nt sec
|
||||
rontgen 2.58e-4 curie/kg
|
||||
rood 1.21e+3 yd
|
||||
rope 20 ft
|
||||
rutherford 1e+6/sec
|
||||
rydberg 1.36054e+1 ev
|
||||
sabin 1 ft²
|
||||
sack 3 bu
|
||||
seam 8 bu
|
||||
section mi²
|
||||
shippington 40 ft³
|
||||
shorthundredweight 100 lb
|
||||
shortquarter 25 lb
|
||||
siemens 1/Ω
|
||||
σ 5.66956e-5 erg/cm² °K^4 sec
|
||||
sigma σ
|
||||
skein 120 yd
|
||||
skot 1e-3 apostilb
|
||||
slug lb g sec²/ft
|
||||
span 9 in
|
||||
spat 4 π sr
|
||||
spindle 14400 yd
|
||||
square 100 ft²
|
||||
squidge 1|972 inch
|
||||
catsquidge 1|432 inch
|
||||
stere m³
|
||||
sthene 1e+3 nt
|
||||
stilb cd/cm²
|
||||
stoke 1e-4 m²/sec
|
||||
stone 14 lb
|
||||
strike 2 bu
|
||||
surveyfoot british ft
|
||||
surveyorschain 66 ft
|
||||
surveyorslink 66|100 ft
|
||||
tablespoon 4 fldr
|
||||
teaspoon 4|3 fldr
|
||||
tesla weber/m²
|
||||
therm 1e+5 btu
|
||||
thermie 1e+6 cal
|
||||
timberfoot ft³
|
||||
tnt 4.6e+6 m²/sec²
|
||||
tonne 1e+6 gm
|
||||
torr mm hg
|
||||
township 36 mi²
|
||||
tun 8 barrel
|
||||
water .22491|2.54 kg/m²sec²
|
||||
wey 40 bu
|
||||
weymass 252 lb
|
||||
Xunit 1.00202e-13 m
|
||||
k 1.38047e-16 erg/°K
|
||||
foal 9223372036854775807
|
1
news/news
Normal file
1
news/news
Normal file
|
@ -0,0 +1 @@
|
|||
this is a news item
|
|
@ -50,3 +50,5 @@ nuke:V: nuke-headers
|
|||
|
||||
nuke-headers:V:
|
||||
rm -f rgbv.h ycbcr.h
|
||||
|
||||
CLEANFILES=$CLEANFILES o.rgbycc o.rgbrgbv
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
<$PLAN9/src/mkhdr
|
||||
|
||||
TARG=`ls *.[cy] | sed 's/\.c//'`
|
||||
TARG=`ls *.[cy] | sed 's/\.[cy]//'`
|
||||
SHORTLIB=sec fs mux regexp9 thread bio 9
|
||||
|
||||
<$PLAN9/src/mkmany
|
||||
|
||||
BUGGERED='CVS|faces|factotum|mailfs|mk|scat|upas|vac|venti|lex'
|
||||
BUGGERED='CVS|faces|factotum|mailfs|scat|upas|vac|venti|lex'
|
||||
DIRS=`ls -l |sed -n 's/^d.* //p' |egrep -v "^($BUGGERED)$"`
|
||||
|
||||
<$PLAN9/src/mkdirs
|
||||
|
@ -27,4 +27,3 @@ $O.tweak: tweak.$O ${XLIB:%=$PLAN9/lib/lib%.a}
|
|||
|
||||
CLEANFILES=$CLEANFILES bc.tab.[ch] units.tab.[ch]
|
||||
|
||||
|
||||
|
|
52
src/libip/udp.c
Normal file
52
src/libip/udp.c
Normal file
|
@ -0,0 +1,52 @@
|
|||
#include <u.h>
|
||||
#define NOPLAN9DEFINES
|
||||
#include <libc.h>
|
||||
#include <ip.h>
|
||||
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
|
||||
/*
|
||||
* prefix of all v4 addresses
|
||||
* copied from libip because libc cannot depend on libip
|
||||
*/
|
||||
static uchar v4prefix[IPaddrlen] = {
|
||||
0, 0, 0, 0,
|
||||
0, 0, 0, 0,
|
||||
0, 0, 0xff, 0xff,
|
||||
0, 0, 0, 0
|
||||
};
|
||||
|
||||
long
|
||||
udpread(int fd, Udphdr *hdr, void *buf, long n)
|
||||
{
|
||||
struct sockaddr_in sin;
|
||||
socklen_t len;
|
||||
|
||||
len = sizeof sin;
|
||||
n = recvfrom(fd, buf, n, 0, (struct sockaddr*)&sin, &len);
|
||||
if(n < 0)
|
||||
return -1;
|
||||
if(len != sizeof sin){
|
||||
werrstr("recvfrom acting weird");
|
||||
return -1;
|
||||
}
|
||||
memset(hdr, 0, sizeof *hdr);
|
||||
memmove(hdr->raddr, v4prefix, IPaddrlen);
|
||||
*(u32int*)(hdr->raddr+12) = *(u32int*)&sin.sin_addr;
|
||||
*(u16int*)hdr->rport = *(u16int*)&sin.sin_port;
|
||||
return n;
|
||||
}
|
||||
|
||||
long
|
||||
udpwrite(int fd, Udphdr *hdr, void *buf, long n)
|
||||
{
|
||||
struct sockaddr_in sin;
|
||||
|
||||
memset(&sin, 0, sizeof sin);
|
||||
sin.sin_family = AF_INET;
|
||||
*(u32int*)&sin.sin_addr = *(u32int*)(hdr->raddr+12);
|
||||
*(u16int*)&sin.sin_port = *(u16int*)hdr->rport;
|
||||
return sendto(fd, buf, n, 0, (struct sockaddr*)&sin, sizeof sin);
|
||||
}
|
||||
|
11
src/libregexp/cvt
Executable file
11
src/libregexp/cvt
Executable file
|
@ -0,0 +1,11 @@
|
|||
#!/bin/sh
|
||||
|
||||
/usr/bin/sed -E '
|
||||
s/\.(sp|rsp)/.s.\1/g
|
||||
s/\.(ep|rep)/.e.\1/g
|
||||
s/(\.|->)(cp|r|subid|right)([^a-zA-Z0-9_])/\1u1.\2\3/g
|
||||
s/(\.|->)(left|next)([^a-z])/\1u2.\2\3/g
|
||||
/#include <u.h>/d
|
||||
s/<libc.h>/"lib9.h"/g
|
||||
s/"regexp.h"/"regexp9.h"/g
|
||||
' $*
|
29
src/libsunrpc/COPYING
Normal file
29
src/libsunrpc/COPYING
Normal file
|
@ -0,0 +1,29 @@
|
|||
|
||||
This software was developed as part of a project at MIT:
|
||||
/sys/src/libsunrpc/*
|
||||
/sys/src/cmd/nfs.c
|
||||
/sys/src/cmd/aux/nfsmount.c
|
||||
/sys/src/cmd/aux/portmap.c
|
||||
|
||||
Copyright (c) 2003 Russ Cox,
|
||||
Massachusetts Institute of Technology
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
|
@ -3,7 +3,6 @@
|
|||
* To use this you need some patches to Valgrind that
|
||||
* let it help out with detecting stack overflow.
|
||||
*/
|
||||
#define USEVALGRIND 0
|
||||
#ifdef USEVALGRIND
|
||||
#include <valgrind/memcheck.h>
|
||||
#endif
|
||||
|
|
|
@ -497,7 +497,7 @@ altexec(Alt *a, int spl)
|
|||
_threaddebug(DBGCHAN, "unlocking the chanlock");
|
||||
unlock(&chanlock);
|
||||
_procsplx(spl);
|
||||
_threaddebug(DBGCHAN, "chanlock is %lud", *(ulong*)&chanlock);
|
||||
_threaddebug(DBGCHAN, "chanlock is %lud", *(ulong*)(void*)&chanlock);
|
||||
while(_threadrendezvous((ulong)b->tag, 0) == ~0)
|
||||
;
|
||||
return 1;
|
||||
|
|
|
@ -56,3 +56,9 @@ CLEANFILES=$CLEANFILES tprimes texec
|
|||
asm-Linux-386.$O: asm-FreeBSD-386.s
|
||||
asm-NetBSD-386.$O: asm-FreeBSD-386.s
|
||||
asm-OpenBSD-386.$O: asm-FreeBSD-386.s
|
||||
|
||||
# sorry
|
||||
VG=`test -d /home/rsc/pub/valgrind-debian && echo -DUSEVALGRIND`
|
||||
|
||||
CFLAGS=$CFLAGS $VG
|
||||
|
||||
|
|
644
src/libventi/cache.acid
Normal file
644
src/libventi/cache.acid
Normal file
|
@ -0,0 +1,644 @@
|
|||
sizeof_1_ = 8;
|
||||
aggr _1_
|
||||
{
|
||||
'U' 0 lo;
|
||||
'U' 4 hi;
|
||||
};
|
||||
|
||||
defn
|
||||
_1_(addr) {
|
||||
complex _1_ addr;
|
||||
print(" lo ", addr.lo, "\n");
|
||||
print(" hi ", addr.hi, "\n");
|
||||
};
|
||||
|
||||
sizeofFPdbleword = 8;
|
||||
aggr FPdbleword
|
||||
{
|
||||
'F' 0 x;
|
||||
{
|
||||
'U' 0 lo;
|
||||
'U' 4 hi;
|
||||
};
|
||||
};
|
||||
|
||||
defn
|
||||
FPdbleword(addr) {
|
||||
complex FPdbleword addr;
|
||||
print(" x ", addr.x, "\n");
|
||||
print("_1_ {\n");
|
||||
_1_(addr+0);
|
||||
print("}\n");
|
||||
};
|
||||
|
||||
UTFmax = 3;
|
||||
Runesync = 128;
|
||||
Runeself = 128;
|
||||
Runeerror = 128;
|
||||
sizeofFmt = 48;
|
||||
aggr Fmt
|
||||
{
|
||||
'b' 0 runes;
|
||||
'X' 4 start;
|
||||
'X' 8 to;
|
||||
'X' 12 stop;
|
||||
'X' 16 flush;
|
||||
'X' 20 farg;
|
||||
'D' 24 nfmt;
|
||||
'X' 28 args;
|
||||
'D' 32 r;
|
||||
'D' 36 width;
|
||||
'D' 40 prec;
|
||||
'U' 44 flags;
|
||||
};
|
||||
|
||||
defn
|
||||
Fmt(addr) {
|
||||
complex Fmt addr;
|
||||
print(" runes ", addr.runes, "\n");
|
||||
print(" start ", addr.start\X, "\n");
|
||||
print(" to ", addr.to\X, "\n");
|
||||
print(" stop ", addr.stop\X, "\n");
|
||||
print(" flush ", addr.flush\X, "\n");
|
||||
print(" farg ", addr.farg\X, "\n");
|
||||
print(" nfmt ", addr.nfmt, "\n");
|
||||
print(" args ", addr.args\X, "\n");
|
||||
print(" r ", addr.r, "\n");
|
||||
print(" width ", addr.width, "\n");
|
||||
print(" prec ", addr.prec, "\n");
|
||||
print(" flags ", addr.flags, "\n");
|
||||
};
|
||||
|
||||
FmtWidth = 1;
|
||||
FmtLeft = 2;
|
||||
FmtPrec = 4;
|
||||
FmtSharp = 8;
|
||||
FmtSpace = 16;
|
||||
FmtSign = 32;
|
||||
FmtZero = 64;
|
||||
FmtUnsigned = 128;
|
||||
FmtShort = 256;
|
||||
FmtLong = 512;
|
||||
FmtVLong = 1024;
|
||||
FmtComma = 2048;
|
||||
FmtByte = 4096;
|
||||
FmtFlag = 8192;
|
||||
sizeofTm = 40;
|
||||
aggr Tm
|
||||
{
|
||||
'D' 0 sec;
|
||||
'D' 4 min;
|
||||
'D' 8 hour;
|
||||
'D' 12 mday;
|
||||
'D' 16 mon;
|
||||
'D' 20 year;
|
||||
'D' 24 wday;
|
||||
'D' 28 yday;
|
||||
'a' 32 zone;
|
||||
'D' 36 tzoff;
|
||||
};
|
||||
|
||||
defn
|
||||
Tm(addr) {
|
||||
complex Tm addr;
|
||||
print(" sec ", addr.sec, "\n");
|
||||
print(" min ", addr.min, "\n");
|
||||
print(" hour ", addr.hour, "\n");
|
||||
print(" mday ", addr.mday, "\n");
|
||||
print(" mon ", addr.mon, "\n");
|
||||
print(" year ", addr.year, "\n");
|
||||
print(" wday ", addr.wday, "\n");
|
||||
print(" yday ", addr.yday, "\n");
|
||||
print(" zone ", addr.zone, "\n");
|
||||
print(" tzoff ", addr.tzoff, "\n");
|
||||
};
|
||||
|
||||
PNPROC = 1;
|
||||
PNGROUP = 2;
|
||||
sizeofLock = 4;
|
||||
aggr Lock
|
||||
{
|
||||
'D' 0 val;
|
||||
};
|
||||
|
||||
defn
|
||||
Lock(addr) {
|
||||
complex Lock addr;
|
||||
print(" val ", addr.val, "\n");
|
||||
};
|
||||
|
||||
sizeofQLp = 12;
|
||||
aggr QLp
|
||||
{
|
||||
'D' 0 inuse;
|
||||
'A' QLp 4 next;
|
||||
'C' 8 state;
|
||||
};
|
||||
|
||||
defn
|
||||
QLp(addr) {
|
||||
complex QLp addr;
|
||||
print(" inuse ", addr.inuse, "\n");
|
||||
print(" next ", addr.next\X, "\n");
|
||||
print(" state ", addr.state, "\n");
|
||||
};
|
||||
|
||||
sizeofQLock = 16;
|
||||
aggr QLock
|
||||
{
|
||||
Lock 0 lock;
|
||||
'D' 4 locked;
|
||||
'A' QLp 8 $head;
|
||||
'A' QLp 12 $tail;
|
||||
};
|
||||
|
||||
defn
|
||||
QLock(addr) {
|
||||
complex QLock addr;
|
||||
print("Lock lock {\n");
|
||||
Lock(addr.lock);
|
||||
print("}\n");
|
||||
print(" locked ", addr.locked, "\n");
|
||||
print(" $head ", addr.$head\X, "\n");
|
||||
print(" $tail ", addr.$tail\X, "\n");
|
||||
};
|
||||
|
||||
sizeofRWLock = 20;
|
||||
aggr RWLock
|
||||
{
|
||||
Lock 0 lock;
|
||||
'D' 4 readers;
|
||||
'D' 8 writer;
|
||||
'A' QLp 12 $head;
|
||||
'A' QLp 16 $tail;
|
||||
};
|
||||
|
||||
defn
|
||||
RWLock(addr) {
|
||||
complex RWLock addr;
|
||||
print("Lock lock {\n");
|
||||
Lock(addr.lock);
|
||||
print("}\n");
|
||||
print(" readers ", addr.readers, "\n");
|
||||
print(" writer ", addr.writer, "\n");
|
||||
print(" $head ", addr.$head\X, "\n");
|
||||
print(" $tail ", addr.$tail\X, "\n");
|
||||
};
|
||||
|
||||
sizeofRendez = 12;
|
||||
aggr Rendez
|
||||
{
|
||||
'A' QLock 0 l;
|
||||
'A' QLp 4 $head;
|
||||
'A' QLp 8 $tail;
|
||||
};
|
||||
|
||||
defn
|
||||
Rendez(addr) {
|
||||
complex Rendez addr;
|
||||
print(" l ", addr.l\X, "\n");
|
||||
print(" $head ", addr.$head\X, "\n");
|
||||
print(" $tail ", addr.$tail\X, "\n");
|
||||
};
|
||||
|
||||
sizeofNetConnInfo = 28;
|
||||
aggr NetConnInfo
|
||||
{
|
||||
'X' 0 dir;
|
||||
'X' 4 root;
|
||||
'X' 8 spec;
|
||||
'X' 12 lsys;
|
||||
'X' 16 lserv;
|
||||
'X' 20 rsys;
|
||||
'X' 24 rserv;
|
||||
};
|
||||
|
||||
defn
|
||||
NetConnInfo(addr) {
|
||||
complex NetConnInfo addr;
|
||||
print(" dir ", addr.dir\X, "\n");
|
||||
print(" root ", addr.root\X, "\n");
|
||||
print(" spec ", addr.spec\X, "\n");
|
||||
print(" lsys ", addr.lsys\X, "\n");
|
||||
print(" lserv ", addr.lserv\X, "\n");
|
||||
print(" rsys ", addr.rsys\X, "\n");
|
||||
print(" rserv ", addr.rserv\X, "\n");
|
||||
};
|
||||
|
||||
RFNAMEG = 1;
|
||||
RFENVG = 2;
|
||||
RFFDG = 4;
|
||||
RFNOTEG = 8;
|
||||
RFPROC = 16;
|
||||
RFMEM = 32;
|
||||
RFNOWAIT = 64;
|
||||
RFCNAMEG = 1024;
|
||||
RFCENVG = 2048;
|
||||
RFCFDG = 4096;
|
||||
RFREND = 8192;
|
||||
RFNOMNT = 16384;
|
||||
sizeofQid = 16;
|
||||
aggr Qid
|
||||
{
|
||||
'W' 0 path;
|
||||
'U' 8 vers;
|
||||
'b' 12 type;
|
||||
};
|
||||
|
||||
defn
|
||||
Qid(addr) {
|
||||
complex Qid addr;
|
||||
print(" path ", addr.path, "\n");
|
||||
print(" vers ", addr.vers, "\n");
|
||||
print(" type ", addr.type, "\n");
|
||||
};
|
||||
|
||||
sizeofDir = 60;
|
||||
aggr Dir
|
||||
{
|
||||
'u' 0 type;
|
||||
'U' 4 dev;
|
||||
Qid 8 qid;
|
||||
'U' 24 mode;
|
||||
'U' 28 atime;
|
||||
'U' 32 mtime;
|
||||
'V' 36 length;
|
||||
'X' 44 name;
|
||||
'X' 48 uid;
|
||||
'X' 52 gid;
|
||||
'X' 56 muid;
|
||||
};
|
||||
|
||||
defn
|
||||
Dir(addr) {
|
||||
complex Dir addr;
|
||||
print(" type ", addr.type, "\n");
|
||||
print(" dev ", addr.dev, "\n");
|
||||
print("Qid qid {\n");
|
||||
Qid(addr.qid);
|
||||
print("}\n");
|
||||
print(" mode ", addr.mode, "\n");
|
||||
print(" atime ", addr.atime, "\n");
|
||||
print(" mtime ", addr.mtime, "\n");
|
||||
print(" length ", addr.length, "\n");
|
||||
print(" name ", addr.name\X, "\n");
|
||||
print(" uid ", addr.uid\X, "\n");
|
||||
print(" gid ", addr.gid\X, "\n");
|
||||
print(" muid ", addr.muid\X, "\n");
|
||||
};
|
||||
|
||||
sizeofWaitmsg = 20;
|
||||
aggr Waitmsg
|
||||
{
|
||||
'D' 0 pid;
|
||||
'a' 4 time;
|
||||
'X' 16 msg;
|
||||
};
|
||||
|
||||
defn
|
||||
Waitmsg(addr) {
|
||||
complex Waitmsg addr;
|
||||
print(" pid ", addr.pid, "\n");
|
||||
print(" time ", addr.time, "\n");
|
||||
print(" msg ", addr.msg\X, "\n");
|
||||
};
|
||||
|
||||
sizeofIOchunk = 8;
|
||||
aggr IOchunk
|
||||
{
|
||||
'X' 0 addr;
|
||||
'U' 4 len;
|
||||
};
|
||||
|
||||
defn
|
||||
IOchunk(addr) {
|
||||
complex IOchunk addr;
|
||||
print(" addr ", addr.addr\X, "\n");
|
||||
print(" len ", addr.len, "\n");
|
||||
};
|
||||
|
||||
MaxFragSize = 9216;
|
||||
VtScoreSize = 20;
|
||||
VtMaxStringSize = 1024;
|
||||
VtMaxFileSize = 281474976710655;
|
||||
VtMaxLumpSize = 57344;
|
||||
VtPointerDepth = 7;
|
||||
VtDataType = 0;
|
||||
VtDirType = 8;
|
||||
VtRootType = 16;
|
||||
VtMaxType = 17;
|
||||
VtTypeDepthMask = 7;
|
||||
VtEntryActive = 1;
|
||||
VtEntryDir = 2;
|
||||
VtEntryDepthShift = 2;
|
||||
VtEntryDepthMask = 28;
|
||||
VtEntryLocal = 32;
|
||||
VtEntrySize = 40;
|
||||
sizeofVtEntry = 40;
|
||||
aggr VtEntry
|
||||
{
|
||||
'U' 0 gen;
|
||||
'u' 4 psize;
|
||||
'u' 6 dsize;
|
||||
'b' 8 type;
|
||||
'b' 9 flags;
|
||||
'W' 12 size;
|
||||
'a' 20 score;
|
||||
};
|
||||
|
||||
defn
|
||||
VtEntry(addr) {
|
||||
complex VtEntry addr;
|
||||
print(" gen ", addr.gen, "\n");
|
||||
print(" psize ", addr.psize, "\n");
|
||||
print(" dsize ", addr.dsize, "\n");
|
||||
print(" type ", addr.type, "\n");
|
||||
print(" flags ", addr.flags, "\n");
|
||||
print(" size ", addr.size, "\n");
|
||||
print(" score ", addr.score, "\n");
|
||||
};
|
||||
|
||||
sizeofVtRoot = 300;
|
||||
aggr VtRoot
|
||||
{
|
||||
'a' 0 name;
|
||||
'a' 128 type;
|
||||
'a' 256 score;
|
||||
'u' 276 blocksize;
|
||||
'a' 278 prev;
|
||||
};
|
||||
|
||||
defn
|
||||
VtRoot(addr) {
|
||||
complex VtRoot addr;
|
||||
print(" name ", addr.name, "\n");
|
||||
print(" type ", addr.type, "\n");
|
||||
print(" score ", addr.score, "\n");
|
||||
print(" blocksize ", addr.blocksize, "\n");
|
||||
print(" prev ", addr.prev, "\n");
|
||||
};
|
||||
|
||||
VtRootSize = 300;
|
||||
VtRootVersion = 2;
|
||||
VtCryptoStrengthNone = 0;
|
||||
VtCryptoStrengthAuth = 1;
|
||||
VtCryptoStrengthWeak = 2;
|
||||
VtCryptoStrengthStrong = 3;
|
||||
VtCryptoNone = 0;
|
||||
VtCryptoSSL3 = 1;
|
||||
VtCryptoTLS1 = 2;
|
||||
VtCryptoMax = 3;
|
||||
VtCodecNone = 0;
|
||||
VtCodecDeflate = 1;
|
||||
VtCodecThwack = 2;
|
||||
VtCodecMax = 3;
|
||||
VtRerror = 1;
|
||||
VtTping = 2;
|
||||
VtRping = 3;
|
||||
VtThello = 4;
|
||||
VtRhello = 5;
|
||||
VtTgoodbye = 6;
|
||||
VtRgoodbye = 7;
|
||||
VtTauth0 = 8;
|
||||
VtRauth0 = 9;
|
||||
VtTauth1 = 10;
|
||||
VtRauth1 = 11;
|
||||
VtTread = 12;
|
||||
VtRread = 13;
|
||||
VtTwrite = 14;
|
||||
VtRwrite = 15;
|
||||
VtTsync = 16;
|
||||
VtRsync = 17;
|
||||
VtTmax = 18;
|
||||
sizeofVtFcall = 80;
|
||||
aggr VtFcall
|
||||
{
|
||||
'b' 0 type;
|
||||
'b' 1 tag;
|
||||
'X' 4 error;
|
||||
'X' 8 version;
|
||||
'X' 12 uid;
|
||||
'b' 16 strength;
|
||||
'X' 20 crypto;
|
||||
'U' 24 ncrypto;
|
||||
'X' 28 codec;
|
||||
'U' 32 ncodec;
|
||||
'X' 36 sid;
|
||||
'b' 40 rcrypto;
|
||||
'b' 41 rcodec;
|
||||
'X' 44 auth;
|
||||
'U' 48 nauth;
|
||||
'a' 52 score;
|
||||
'b' 72 dtype;
|
||||
'u' 74 count;
|
||||
'X' 76 data;
|
||||
};
|
||||
|
||||
defn
|
||||
VtFcall(addr) {
|
||||
complex VtFcall addr;
|
||||
print(" type ", addr.type, "\n");
|
||||
print(" tag ", addr.tag, "\n");
|
||||
print(" error ", addr.error\X, "\n");
|
||||
print(" version ", addr.version\X, "\n");
|
||||
print(" uid ", addr.uid\X, "\n");
|
||||
print(" strength ", addr.strength, "\n");
|
||||
print(" crypto ", addr.crypto\X, "\n");
|
||||
print(" ncrypto ", addr.ncrypto, "\n");
|
||||
print(" codec ", addr.codec\X, "\n");
|
||||
print(" ncodec ", addr.ncodec, "\n");
|
||||
print(" sid ", addr.sid\X, "\n");
|
||||
print(" rcrypto ", addr.rcrypto, "\n");
|
||||
print(" rcodec ", addr.rcodec, "\n");
|
||||
print(" auth ", addr.auth\X, "\n");
|
||||
print(" nauth ", addr.nauth, "\n");
|
||||
print(" score ", addr.score, "\n");
|
||||
print(" dtype ", addr.dtype, "\n");
|
||||
print(" count ", addr.count, "\n");
|
||||
print(" data ", addr.data\X, "\n");
|
||||
};
|
||||
|
||||
VtStateAlloc = 0;
|
||||
VtStateConnected = 1;
|
||||
VtStateClosed = 2;
|
||||
sizeofVtConn = 1148;
|
||||
aggr VtConn
|
||||
{
|
||||
QLock 0 lk;
|
||||
QLock 16 inlk;
|
||||
QLock 32 outlk;
|
||||
'D' 48 debug;
|
||||
'D' 52 infd;
|
||||
'D' 56 outfd;
|
||||
'D' 60 muxer;
|
||||
'X' 64 writeq;
|
||||
'X' 68 readq;
|
||||
'D' 72 state;
|
||||
'a' 76 wait;
|
||||
'U' 1100 ntag;
|
||||
'U' 1104 nsleep;
|
||||
'X' 1108 part;
|
||||
Rendez 1112 tagrend;
|
||||
Rendez 1124 rpcfork;
|
||||
'X' 1136 version;
|
||||
'X' 1140 uid;
|
||||
'X' 1144 sid;
|
||||
};
|
||||
|
||||
defn
|
||||
VtConn(addr) {
|
||||
complex VtConn addr;
|
||||
print("QLock lk {\n");
|
||||
QLock(addr.lk);
|
||||
print("}\n");
|
||||
print("QLock inlk {\n");
|
||||
QLock(addr.inlk);
|
||||
print("}\n");
|
||||
print("QLock outlk {\n");
|
||||
QLock(addr.outlk);
|
||||
print("}\n");
|
||||
print(" debug ", addr.debug, "\n");
|
||||
print(" infd ", addr.infd, "\n");
|
||||
print(" outfd ", addr.outfd, "\n");
|
||||
print(" muxer ", addr.muxer, "\n");
|
||||
print(" writeq ", addr.writeq\X, "\n");
|
||||
print(" readq ", addr.readq\X, "\n");
|
||||
print(" state ", addr.state, "\n");
|
||||
print(" wait ", addr.wait, "\n");
|
||||
print(" ntag ", addr.ntag, "\n");
|
||||
print(" nsleep ", addr.nsleep, "\n");
|
||||
print(" part ", addr.part\X, "\n");
|
||||
print("Rendez tagrend {\n");
|
||||
Rendez(addr.tagrend);
|
||||
print("}\n");
|
||||
print("Rendez rpcfork {\n");
|
||||
Rendez(addr.rpcfork);
|
||||
print("}\n");
|
||||
print(" version ", addr.version\X, "\n");
|
||||
print(" uid ", addr.uid\X, "\n");
|
||||
print(" sid ", addr.sid\X, "\n");
|
||||
};
|
||||
|
||||
NilBlock = -1;
|
||||
sizeofVtBlock = 88;
|
||||
aggr VtBlock
|
||||
{
|
||||
'X' 0 c;
|
||||
QLock 4 lk;
|
||||
'X' 20 data;
|
||||
'a' 24 score;
|
||||
'b' 44 type;
|
||||
'D' 48 nlock;
|
||||
'D' 52 iostate;
|
||||
'D' 56 ref;
|
||||
'U' 60 heap;
|
||||
'A' VtBlock 64 next;
|
||||
'A' VtBlock 68 prev;
|
||||
'U' 72 used;
|
||||
'U' 76 used2;
|
||||
'U' 80 addr;
|
||||
'D' 84 decrypted;
|
||||
};
|
||||
|
||||
defn
|
||||
VtBlock(addr) {
|
||||
complex VtBlock addr;
|
||||
print(" c ", addr.c\X, "\n");
|
||||
print("QLock lk {\n");
|
||||
QLock(addr.lk);
|
||||
print("}\n");
|
||||
print(" data ", addr.data\X, "\n");
|
||||
print(" score ", addr.score, "\n");
|
||||
print(" type ", addr.type, "\n");
|
||||
print(" nlock ", addr.nlock, "\n");
|
||||
print(" iostate ", addr.iostate, "\n");
|
||||
print(" ref ", addr.ref, "\n");
|
||||
print(" heap ", addr.heap, "\n");
|
||||
print(" next ", addr.next\X, "\n");
|
||||
print(" prev ", addr.prev\X, "\n");
|
||||
print(" used ", addr.used, "\n");
|
||||
print(" used2 ", addr.used2, "\n");
|
||||
print(" addr ", addr.addr, "\n");
|
||||
print(" decrypted ", addr.decrypted, "\n");
|
||||
};
|
||||
|
||||
VtOREAD = 0;
|
||||
VtOWRITE = 1;
|
||||
VtORDWR = 2;
|
||||
VtOCREATE = 256;
|
||||
BioLocal = 1;
|
||||
BioVenti = 2;
|
||||
BioReading = 3;
|
||||
BioWriting = 4;
|
||||
BioEmpty = 5;
|
||||
BioVentiError = 6;
|
||||
BadHeap = -1;
|
||||
sizeofVtCache = 60;
|
||||
aggr VtCache
|
||||
{
|
||||
QLock 0 lk;
|
||||
'A' VtConn 16 z;
|
||||
'U' 20 blocksize;
|
||||
'U' 24 now;
|
||||
'A' VtBlock 28 hash;
|
||||
'D' 32 nhash;
|
||||
'A' VtBlock 36 heap;
|
||||
'D' 40 nheap;
|
||||
'A' VtBlock 44 block;
|
||||
'D' 48 nblock;
|
||||
'X' 52 mem;
|
||||
'D' 56 mode;
|
||||
};
|
||||
|
||||
defn
|
||||
VtCache(addr) {
|
||||
complex VtCache addr;
|
||||
print("QLock lk {\n");
|
||||
QLock(addr.lk);
|
||||
print("}\n");
|
||||
print(" z ", addr.z\X, "\n");
|
||||
print(" blocksize ", addr.blocksize, "\n");
|
||||
print(" now ", addr.now, "\n");
|
||||
print(" hash ", addr.hash\X, "\n");
|
||||
print(" nhash ", addr.nhash, "\n");
|
||||
print(" heap ", addr.heap\X, "\n");
|
||||
print(" nheap ", addr.nheap, "\n");
|
||||
print(" block ", addr.block\X, "\n");
|
||||
print(" nblock ", addr.nblock, "\n");
|
||||
print(" mem ", addr.mem\X, "\n");
|
||||
print(" mode ", addr.mode, "\n");
|
||||
};
|
||||
|
||||
complex VtConn vtcachealloc:z;
|
||||
complex VtCache vtcachealloc:c;
|
||||
complex VtBlock vtcachealloc:b;
|
||||
complex VtCache vtcachefree:c;
|
||||
complex VtCache vtcachedump:c;
|
||||
complex VtBlock vtcachedump:b;
|
||||
complex VtCache cachecheck:c;
|
||||
complex VtBlock cachecheck:b;
|
||||
complex VtBlock upheap:b;
|
||||
complex VtBlock upheap:bb;
|
||||
complex VtCache upheap:c;
|
||||
complex VtBlock downheap:b;
|
||||
complex VtBlock downheap:bb;
|
||||
complex VtCache downheap:c;
|
||||
complex VtBlock heapdel:b;
|
||||
complex VtCache heapdel:c;
|
||||
complex VtBlock heapins:b;
|
||||
complex VtCache vtcachebumpblock:c;
|
||||
complex VtBlock vtcachebumpblock:b;
|
||||
complex VtCache vtcachelocal:c;
|
||||
complex VtBlock vtcachelocal:b;
|
||||
complex VtCache vtcacheallocblock:c;
|
||||
complex VtBlock vtcacheallocblock:b;
|
||||
complex VtCache vtcacheglobal:c;
|
||||
complex VtBlock vtcacheglobal:b;
|
||||
complex VtBlock vtblockduplock:b;
|
||||
complex VtBlock vtblockput:b;
|
||||
complex VtCache vtblockput:c;
|
||||
complex VtBlock vtblockwrite:b;
|
||||
complex VtCache vtblockwrite:c;
|
||||
complex VtCache vtcacheblocksize:c;
|
||||
complex VtBlock vtblockcopy:b;
|
||||
complex VtBlock vtblockcopy:bb;
|
Loading…
Reference in a new issue