![]() |
|
This index contains technical terms and primitive procedures. Other sources of information are the index of defined procedures, which contains procedures whose definitions are in the text and procedures that you are asked to write as exercises; the glossary, which defines many technical terms; and the Alphabetical Table of Scheme Primitives on page funlist.
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
#f
Ch6
#t
Ch6
'
Ch5
*
FunList
+
FunList
-
Ch6, FunList
/
FunList
<
Ch6
<=
Ch6
=
Ch6
>
Ch6
>=
Ch6
Abelson, Harold Ch13, Ch26
abs
Ch6
abstract data type Ch16, Ch17, Ch18, Ch25
accumulate
Ch8, Ch8, Ch19
actual argument Ch4
actual argument expression Ch4
actual argument value Ch4
ADT Ch16, Ch18, Ch25
align
Ch20
and
Ch6, Ch6
append
Ch17
apply
Ch17
argument, actual Ch4
arguments, variable number of Ch17
arithmetic function Ch2
assoc
Ch17
association list Ch17
atomic expression Ch3
base case Ch11
base cases, simplifying Ch12
before?
Ch6
begin
Ch20
bf
Ch5
binary number Ch15
bl
Ch5
Bonne, Rose Credits
boolean?
Ch6
Boole, George Ch2
branch node Ch18
bridge points ProjBridge
butfirst
Ch5
butlast
Ch5
cadr
Ch17
car
Ch17
Carroll, Lewis Ch4, Credits
case, base Ch11
case, recursive Ch11
cdr
Ch17
ceiling
FunList
chalkboard model Ch7
child (in spreadsheet program) Ch25
children
Ch18
clause, cond Ch6
Clinger, William Ch22
close-all-ports
Ch22
close-input-port
Ch22
close-output-port
Ch22
complexity, control of Ch1
composition of functions Part2, Ch4
compound expression Ch3, Ch3
compound procedure Ch1
computing, symbolic Ch1
cond clause Ch6
cond
Ch6, Ch10, Ch20
cons
Ch17
constant, named Ch7
control of complexity Ch1
conversational program Ch20
cos
FunList
count
Ch8
c...r
Ch17
data file Ch22
data structure Ch10
data type, abstract Ch16, Ch17, Ch18, Ch25
datum
Ch18
define
Ch4, Ch9
definition, global Ch9
diagram, plumbing Ch3, Ch3
display
Ch20, Ch22
Dodgson, Charles Credits
effect, side Ch20
else
Ch6
empty?
Ch6
empty sentence Ch5, Ch6
end-of-file object Ch22
eof-object?
Ch22
equal?
Ch6
error
FunList
error messages Ch1
eval
Ch25
evaluation, order of Ch3, Ch3
even?
FunList
every
Ch8, Ch8
exclusive, mutually Ch6
exit
Ch1
expression, actual argument Ch4
expression, atomic Ch3, Ch3
expression, compound Ch3, Ch3
expression, self-evaluating Ch3, Ch3, Ch5, Ch5
expt
FunList
extensions to Scheme Ch5, InitFile
Fibonacci numbers Ch13
file, data Ch22
file-map
/*
* (C)opyright MMIV-MMVI Anselm R. Garbe <garbeam at gmail dot com>
* See LICENSE file for license details.
*/
#include "dwm.h"
#include <stdio.h>
#include <string.h>
#include <X11/Xlocale.h>
/* static */
static unsigned int
textnw(const char *text, unsigned int len)
{
XRectangle r;
if(dc.font.set) {
XmbTextExtents(dc.font.set, text, len, NULL, &r);
return r.width;
}
return XTextWidth(dc.font.xfont, text, len);
}
static void
drawtext(const char *text, unsigned long col[ColLast], Bool highlight)
{
int x, y, w, h;
static char buf[256];
unsigned int len, olen;
XGCValues gcv;
XRectangle r = { dc.x, dc.y, dc.w, dc.h };
XSetForeground(dpy, dc.gc, col[ColBG]);
XFillRectangles(dpy, dc.drawable, dc.gc, &r, 1);
if(!text)
return;
w = 0;
olen = len = strlen(text);
if(len >= sizeof(buf))
len = sizeof(buf) - 1;
memcpy(buf, text, len);
buf[len] = 0;
h = dc.font.ascent + dc.font.descent;
y = dc.y + (dc.h / 2) - (h / 2) + dc.font.ascent;
x = <