DataMuseum.dk

Presents historical artifacts from the history of:

DKUUG/EUUG Conference tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about DKUUG/EUUG Conference tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download
Index: ┃ T x

⟦5c3787f5d⟧ TextFile

    Length: 3095 (0xc17)
    Types: TextFile
    Names: »x_geometry.clu«

Derivation

└─⟦a0efdde77⟧ Bits:30001252 EUUGD11 Tape, 1987 Spring Conference Helsinki
    └─ ⟦526ad3590⟧ »EUUGD11/gnu-31mar87/X.V10.R4.tar.Z« 
        └─⟦2109abc41⟧ 
            └─ ⟦this⟧ »./X.V10R4/CLUlib/x_geometry.clu« 

TextFile

% Copyright    Barbara Liskov    1985

x_geometry = proc (spec, defspec: string)
	       returns (int, int, int, int, bool, bool, bool)
    i1: int := string$indexc('x', defspec)
    i2: int
    if i1 = 0
       then i1 := string$indexc('+', defspec)
	    i2 := string$indexc('-', defspec)
	    if i2 > 0  cand  (i1 = 0  cor  i2 < i1)
	       then i1 := i2 end
	    if i1 = 0
	       then i1 := string$size(defspec) + 1 end
       end
    dw: int := int$parse(string$substr(defspec, 2, i1 - 2))
       except others: dw := 1 end
    if i1 <= string$size(defspec)  cand  defspec[i1] = 'x'
       then i1 := i1 + 1 end
    defspec := string$rest(defspec, i1)
    i1 := string$indexc('+', defspec)
    i2 := string$indexc('-', defspec)
    dxp: bool := true
    if i2 > 0  cand  (i1 = 0  cor  i2 < i1)
       then i1 := i2
	    dxp := false
       end
    if i1 = 0
       then i1 := string$size(defspec) + 1 end
    dh: int := int$parse(string$substr(defspec, 1, i1 - 1))
       except others: dh := 1 end
    defspec := string$rest(defspec, i1 + 1)
       except when bounds: defspec := "" end
    i1 := string$indexc('+', defspec)
    dyp: bool := true
    if i1 = 0
       then i1 := string$indexc('-', defspec)
	    if i1 = 0
	       then i1 := string$size(defspec) + 1
	       else dyp := false
	       end
       end
    dx: int := int$parse(string$substr(defspec, 1, i1 - 1))
       except others: dx := 1 end
    dy: int := int$parse(string$rest(defspec, i1 + 1))
       except others: dy := 1 end

    i1 := string$indexc('x', spec)
    if i1 = 0
       then i1 := string$indexc('+', spec)
	    i2 := string$indexc('-', spec)
	    if i2 > 0  cand  (i1 = 0  cor  i2 < i1)
	       then i1 := i2 end
	    if i1 = 0
	       then i1 := string$size(spec) + 1 end
       end
    width: int := int$parse(string$substr(spec, 2, i1 - 2))
       except others: width := dw end
    if width <= 0
       then width := dw end
    if i1 <= string$size(spec)  cand  spec[i1] = 'x'
       then i1 := i1 + 1 end
    spec := string$rest(spec, i1)
    i1 := string$indexc('+', spec)
    i2 := string$indexc('-', spec)
    xplus: bool := true
    place: bool := true
    if i2 > 0  cand  (i1 = 0  cor  i2 < i1)
       then i1 := i2
	    xplus := false
       end
    if i1 = 0
       then i1 := string$size(defspec) + 1
	    place := false
       end
    height: int := int$parse(string$substr(spec, 1, i1 - 1))
       except others: height := dh end
    if height <= 0
       then height := dh end
    spec := string$rest(spec, i1 + 1)
       except when bounds: spec := "" end
    i1 := string$indexc('+', spec)
    yplus: bool := true
    if i1 = 0
       then i1 := string$indexc('-', spec)
	    if i1 = 0
	       then i1 := string$size(spec) + 1
	       else yplus := false
	       end
       end
    x: int := int$parse(string$substr(spec, 1, i1 - 1))
       except others:
		   x := dx
		   xplus := dxp
	      end
    y: int := int$parse(string$rest(spec, i1 + 1))
       except others:
		   y := dy
		   yplus := dyp
	      end
    return(width, height, x, y, xplus, yplus, place)
    end x_geometry