Spinellis main May 6, 2003 17:4

Index

Symbols ?, operator, 46, 174 ||, operator, 41 ?, regular expression, 340 (,30 @(#), revision-id tag, 206 *, regular expression, 341 @, 231, 261 +, regular expression, 340 @code, Texinfo command, 263 ,, operator, 35 [], 341 ->, operator, 102 [...],11 -flag, see the flag under the corresponding [ˆ], 341 command \<, regular expression, 341 -name, see the name under the \>, regular expression, 341 corresponding letter \, regular expression, 341 .*, regular expression, 342 ##, operator, 176 .\", troff command, 262 $*, 259 ., 260 $*, identifier name, 194 ., regular expression, 341 $<, identifier name, 194 /**/, operator, 176 $>, identifier name, 194 /**, 231, 261 $?, identifier name, 194 /*-, 231 $@, identifier name, 194 /flag, see the flag under the corresponding $$, identifier name, 194 command $, regular expression, 341 ˜, 302 $name, see the name under the ˜, regular expression, 340 corresponding letter ˆ], editor command, 343 %, editor command, 346 ˆ, regular expression, 341 %, regular expression, 340 <<, operator, 53, 308 %name, see the name under the <, 261 corresponding letter ==, operator, 52 &&, operator, 22, 41 =, operator, 30, 52 &, operator, 53, 64 >>>, Java operator, 53 –, 297 >>, operator, 53, 58, 308 –name, see the name under the >, 261 corresponding letter

459 Spinellis main May 6, 2003 17:4

460 Index

Digits agile programming, 8 05.fastfs, sample, 243 aha.c, sample, 281 16-bit, 238 aha–done, 281 4GL, 16 aha–finish–ccbs, 281 aha–intr, 281 A algebraic specification, 318 %A%, revision-id tag, 206 algorithms, 245 .a, file extension, 227 alias.c, sample, 119, 120, 233, 246 abort, C , 168 aliasing, through pointers, 70 abstract all, pseudo-target, 194 class, see class, abstract alloc.c, sample, 217 data type, 106, 249, 318 alloca, -specific function, 88 machine, 113 am-utils.texi, sample, 261 Abstract Windowing Toolkit, 286, 329 amd.c, sample, 219 abstract, Java keyword, 276, 306 Amoeba, 158 abstraction, 91 AND, bitwise, 53 Acceptor, design pattern, 336 AND, logical, 41 Access, see Microsoft Access ant, program, 192, 196, 198 access method, 304 any.cpp, sample, 303 ace, sample, 329, 336, 338, 399 any.h, sample, 303 ace–min, 315 ap–snprintf.c, sample, 234 ActionGoToEdit.java, sample, 299 apache, program, xxv, 162, 181, 244, 260, active class, 13 270, 322, 323 Active Object, design pattern, 336 apache, sample, 399 Active Template Library, 325 API, see also under the name of the specific ActiveX, 325 API (e.g. Win32) Ada, 16, 98, 126, 296, 299 documentation, 249 Ada keyword Java platform documentation, 28, 264 package, 299 thread, 162 use, 299 providing OS services, 160 with, 299 Sun RPC, 272 Ada-95, 300 Api Spy, 370 adaptation, 8 APM, 292 Adaptec, 280 applet, 20 Adapter, design pattern, 336 AppleTalk, 186 Adaptive Communication Environment, 329, application, 336 338 Application programming interface, see API adb.c, sample, 108, 109 apply.c, sample, 35 adb–direct.c, sample, 108, 109 apropos, program, 255 Addr.i, sample, 308 apropos.1, sample, 255 administrator manual, 242 apropos.pdf, sample, 255 Adobe FrameMaker, 260 ., troff command, 262 adornment, 276 arc, 139 ADT, 106, 318 arch, directory name, 183 aggregation association, 13 arch, sample, 186 Spinellis main May 6, 2003 17:4

Index 461

archeology, see archeology ASCII diagram, 256 architecture, 180 ascmagic.c, sample, 22 centralized repository, 268 .asm, file extension, 227 control models, 285 .asp, file extension, 227 data-flow, 273 assembly code, see symbolic code design pattern, 331 assert, C library, 218, 220 distributed, 268 assert, Java method, 220 domain-specific, 333 assertion, 28, 55, 56, 217, 219, 220 event-driven, 285 association navigation, 13 framework, 329 associative array, 111 hierarchies, 282 astosc.c, sample, 213 layered, 279 astosc.out, 213 non-trivial, 180 asymmetric bounds, 100 object-oriented, 275 asynchronous, 143, 165, 167 packaging, 292 Asynchronous Completion Token, design pipes-and-filters, 273 pattern, 336 reuse, 328 asynchronous signals, 156 state transition, 291 at, program, 160 system manager, 289 at.1, sample, 251 $Archive:$, revision-id tag, 206 at.c, sample, 33 arcs.c, sample, 246 at.pdf, sample, 251 argc, identifier name, 20 at, sample, 135 ArgoEvent.java, sample, 289 ATL, see Active Template Library ArgoModuleEvent.java, sample, 289 ATM, 186 ArgoNotationEvent.java, sample, 289 atom.c, sample, 114 ArgoUML, 278 atrun.c, sample, 160 argouml, sample, 399 attribute, see class, property args.c, sample, 200 $Author:$, revision-id tag, 206 argv, identifier name, 20 $Author$, revision-id tag, 206 arithmetic.c, sample, 165 @author, javadoc tag, 263 array, 96 autoconf, 199, 224 as argument, 65 AVL tree, 130 associative, 111 awk, program, 209, 227, 309, 330, 357, 377 data structure, 96 .awk, file extension, 227 dynamically allocated, 89 AWT, see Abstract Windowing Toolkit index, 111 results, 65 B two-dimensional, 111 B+ tree, 319 array.t, sample, 215 b4light.c, sample, 108 as, program, 323 %B%, revision-id tag, 206 AS, Modula keyword, 299 b, Hungarian prefix, 236 asc.c, sample, 282 .B, troff command, 262 asc–disp.out, 212 backward-list, editor command, 346 asc–intr, 282 backward-up-list, editor command, 346 ASCII characters, 40 bad, C++ library, 24 Spinellis main May 6, 2003 17:4

462 Index

.bas, file extension, 227 buffer, 96 base case, 143, 146 buffer overflow, 99, 141, 254 base class, see class, base bufinit, 281 BaseDirContextTestCase.java, sample, bug tracking database, 209 220 bugs, documenting, 251 Basic, 42, 309, 354 Bugs, manual section, 251, 254 basic block, 372 Bugzilla, 209 basic block coverage analysis, 372 build process, 189, 212, 321 .bat, file extension, 227 build.bat, sample, 380 beautifier, 365 build.properties.sample, sample, .BI, troff command, 262 198 bin, directory name, 183 build.xml, sample, 196 binary search, 55, 113 build, directory name, 183 binary tree, 126 build, pseudo-target, 194 BIND, xxv, 248 bus.h, sample, 176 bio–doread, 281 bwrite, 281 biodone, 281 bytecode, 334 biowait, 281 .bz2, file extension, 227 bit field, 77 bzip2, program, 227 bitwise-AND,53 .Bl, troff command, 262 C blackboard system, 270 C, 15, 98 bless, keyword, 300, 309 C data type, 61 block, 28, 31 C library block.cpp, sample, 297, 301 abort, 168 .bmp, file extension, 227 assert, 218, 220 boolean expression, 39 bsearch, 69, 320 boss/worker, 156, 157 cos, 388 bpb.h, sample, 77 ctime, 389 .br, troff command, 262 ctype,42 .BR, troff command, 262 EOF,24 branch, 203 exit(1),43 bread, 281 exit, 24, 36, 168 break, Java keyword, 38, 39, 152 ferror,24 break, keyword, 32, 36, 37, 55, 96, 231 fgets,99 breakpoint, 6, 374 fread,98 brelse, 281 free, 85, 89 bremfree, 281 fwrite, 98, 280 BRIEF, 340 gets, 98, 99 browser, 365 isupper,42 BSD, 195, 225, 226 longjmp, 168, 169 bsearch.c, sample, 56, 320 main, 20, 219 bsearch, C library, 69, 320 malloc, 80, 84, 85, 88, 101 btree, sample, 125 memcpy, 97, 98 buf, identifier name, 96 memmove,97 Spinellis main May 6, 2003 17:4

Index 463

memset,97 .C, file extension, 227 NULL, 52, 236 c, Hungarian prefix, 236 printf, 23, 73 @c, Texinfo command, 263 qsort, 69, 98 cache.c, sample, 63 realloc,86 Cache.java, sample, 234 scanf,99 cal.c, sample, 34 setjmp, 169 Calendar, Java class, 382, 390 signal, 168 call sin, 388 and return, 285 snprintf,99 by name, 172 sprintf, 98, 99 by reference, 63, 66 stdin,51 graph, 134, 372 stdio, 280 case, keyword, 32, 219, 231 strcat,99 cat, program, 244 strcmp, 22, 234 cat.1, sample, 244, 251 strcpy,99 cat.c, sample, 24, 205, 243 strdup,66 cat.pdf, sample, 244, 251 strlen,72 Catalina.java, sample, 22 strncat,99 catalina, sample, 358 strncpy,99 CatalinaService.java, sample, 23 tm–year, 390 catch, Java keyword, 150, 151, 152 tolower,42 cb, program, 367 tv–sec,76 cb, Hungarian prefix, 236 tv–usec,76 cbo, Hungarian prefix, 237 vsnprintf,99 cbrowser, 366 vsprintf,99 cc, program, 323 C preprocessor, see preprocessor -E, 361 C++, 42, 98, 276, 364 -S, 362 C++ keyword, see keyword .cc, file extension, 227 C++ library CC, identifier name, 193 bad,24 CD-ROM, 14,399 fail,24 cdecl, program, 368 good,24 centralized repository, 268 vector, 100 CFLAGS, identifier name, 193 C++ operator, see operator CGI, 358 c++decl, program, 368 .cgi, file extension, 227 C-M-d, editor command, 346 cgram.y, sample, 130 C-M-m, editor command, 346 ch, Hungarian prefix, 236 C-M-p, editor command, 346 change, 252 C-M-u, editor command, 346 CHANGELOG.txt, sample, 397 C#, 98, 227, 276, 300, 304 ChangeLog, file name, 226, 252 C# keyword, see keyword Changes, file name, 226 C# operator, see operator character expression, 39 %C%, revision-id tag, 206 Character, Java class, 42 .c, file extension, 227 chatter.h, sample, 305 Spinellis main May 6, 2003 17:4

464 Index

check in, 203 code checkError, Java method, 24 as exemplar, 5 checknr.c, sample, 238 as literature, 2 chio.c, sample, 97 assembly, see symbolic code chk, Hungarian prefix, 237 beautifier, 365 chown.c, sample, 230 browser, 365 @cindex, Texinfo command, 263 generation, 212, 334 circular buffer, 108 inspections, 9 circular list, 122 languages, 15 cksum.c, sample, 238 object, 360, 362 cl, program portability, see portability /E, 361 reuse, 320 /Fa, 362 searching, 346 class, 78, 249, 300 standards, see guidelines abstract, 276, 277, 306 symbolic, 360, 362 attribute, see class, property wizard, 328, 330 base, 272, 300, 365 codefind.pl, sample, 14 browser, 300 coding standards, 225, see also guidelines constructor, 226, 302 cohesion, 283, 338 derived, 300, 365 collaboration diagram, 276 destructor, 154, 302 collect.c, sample, 246 diagram, 276, 277 Column.java, sample, 316, 317 field, 78, 301, 303 .com, file extension, 227 finalizer, see class, destructor comma operator, 35 method, 78, 226, 276, 300, 301, 303 commands.c, sample, 122 name, 276 commit, 203 operation, see class, method Common Object Request Broker property, 78, 226, 276, 325 Architecture, 271 variable, see class, property common, directory name, 183 .class, file extension, 227 compile, directory name, 183 class, Java keyword, 300 compiler, 360 classes, directory name, 183 compiler driver, 323 clean, pseudo-target, 194 complete.c, sample, 35 Cleanup–Strategies–T.h, sample, complex numbers, 309 256 component, 180, 325 client-server systems, 269, 338 Component Configurator, design pattern, close, Unix-specific function, 80, 281 336 closed range, 100 compress, program, 227 closedir, Unix-specific function, compress.c, sample, 107 319 networks, 338 CloseHandle, Win32 SDK, 163 concurrent systems, 289 .cmd, file extension, 227 Concurrent Versions System, see CVS cmd, Hungarian prefix, 237 condition, 28 COBOL,16 conf.c, sample, 92, 246 cocoon, sample, 399 conf, directory name, 183 Spinellis main May 6, 2003 17:4

Index 465

conference publications, 259 conventions, see guidelines config.cache, file name, 199 convolve.c, sample, 104 config.h.in, file name, 200 Cookies, directory name, 325 config.h, file name, 199, 200, 226 copy constructor, 303 config.h, sample, 199 Copying, file name, 226 config.log, file name, 199 copyright, 20, 413 config.status, file name, 199 CORBA, 271, 325, 329, 337 config, sample, 211, 215 corruption, 168 config–h.SH, file name, 226 cos, C library, 388 configuration, 197, 210 coupling, 284, 338 configure, file name, 199, 226 CPAN.pm, sample, 299 confpars.c, sample, 334 cpp, program, 323 conjunction, 41 .cpp, file extension, 227 connected, 139 CPP, identifier name, 193 Connector, design pattern, 337 crc24.h, sample, 306 connector, 278 crc32.h, sample, 300 connector, sample, 278 CreateEvent, Win32 SDK, 163 conservative garbage collector, 88 CreateMutex, Win32 SDK, 163 const, keyword, 64, 360 CreateThread, Win32 SDK, 162, constant 163 array size, 113 Critic.java, sample, 299 documentation, 40 critical region, 163 in assertion, 219 cs4231reg.h, sample, 256 in conditional expression, 360 .cs, file extension, 227 naming of, 234 cscope, program, 365 on left side of comparison, 52 csh, program, 227 preprocessor defined, 361 .csh, file extension, 227 constructor, see class, constructor ctags, program, 343 ContainerBase.java, sample, 151, 286 ctags.1, sample, 252 containers, 318 ctags.c, sample, 125 context diff, 209, 331, 355 ctags.pdf, sample, 252 ContextConfig.java, sample, 152 ctime, C library, 389 continue, Java keyword, 38, 39, 152 ctype, C library, 42 continue, keyword, 37, 55, 96 cur, Hungarian prefix, 237 contrib, directory name, 183 currentThread, Java method, 163 control flow, 143 curses.c, sample, 71 control flow statements, 25 cursor, 65, 102 control model, 156, 285 cut.1, sample, 260 boss-worker, 157 CVS, 5, 50, 203, 208, 224, 268, 355 event-driven, 285 CVS, directory name, 183 multiple process, 159 cw, Hungarian prefix, 236 mutual exclusion, 158 CWEB, 263, 266 state transition, 291 .cxx, file extension, 227 system manager, 289 cycle, in graph, 131 work crew, 157 , 376 Spinellis main May 6, 2003 17:4

466 Index

D deep copy, 303 %D%, revision-id tag, 206 .def, file extension, 227 d, Hungarian prefix, 236 default, keyword, 32 daemon, 216, 324 DefaultContext.java, sample, 298 data defensive programming, 33 dictionary, 327 defficiencies, 252 element access, 65 defs.h, sample, 91, 172 flow, 324 del, Unix-specific function, 319 grouping, 75 delete, keyword, 167, 168, 302, 303 link, 336 deliver.c, ex, 246 organization, 76 demoGL, sample, 400 repository, 325 depend, pseudo-target, 194 structure, 95 dependency structure, dynamic allocation, 62 graph, 189 structure, linked, 62 isolation, 198 type, 61, 105, 106, 318 relationship, 13 data-flow architecture, 273 @deprecated, javadoc tag, 263 data-flow diagram, 275 deque, 121 database triggers, 285 derived class, see class, derived Database.java, sample, 235, 395 design pattern, 331, 336, 337 DatabaseInformation.java, sample, design specification, 242 228 Desktop, directory name, 325 $Date:$, revision-id tag, 206 DESTROY, Perl keyword, 310 date.c, sample, 231 destructor, see class, destructor $Date$, revision-id tag, 206 /dev/null, file name, 350 date, Hungarian prefix, 237 Developer Studio, see Microsoft Developer Date, Java class, 387, 396 Studio db, 256 development process standards, 239 db.h, sample, 91 device driver, 155 db, sample, 319 dgl–dllstartupdialog.cpp, sample, 286 DB, Unix-specific function, 319 dhcp, sample, 268 db–load.c, sample, 334 diagram db–update.c, sample, 247 and architecture modeling, 278 dbopen, Unix-specific function, 319 ASCII, 256 DCOM, 271, 337 class, 276, 277 ., troff command, 262 collaboration, 276 De Morgan’s rules, 41 data-flow, 275 dead code, 372 design, 2 debug level, 217 for understanding code, 375 Debug, directory name, 183 in practice, 337 DEBUG, identifier name, 216, 222 modeling hierarchy, 283 debugger, 373 object, 276 debugging output, 216 reverse engineering, 278 decomposition, 180 state transition, 247, 291 Decorator, design pattern, 337 UML, 12, 276 Spinellis main May 6, 2003 17:4

Index 467

dialog box, 239 documentation, 183, 214, 227, 241 diff, program, 51, 355, 357 algorithms, 245 -b, 356 bugs, 251 -c, 209 change, 252 -i, 356 defficiencies, 252 -w, 51, 356 identifiers, 246 differences between files, 355 interfaces, 249 dig.c, sample, 76 non-functional requirements, 247 .digit, 227 overview, 243 direct access to memory, 74 requirements, 247 directional, 139 specifications, 244 directory name system structure, 245 Cookies, 325 test cases, 249 Desktop, 325 tools, 214 doc, 248 Documents and Settings, directory name, Documents and Settings, 325 325 Favorites, 325 doexec.c, sample, 222 include/protocols, 269 domain name system, 247 My Documents, 325 domain-specific net, 186 architectures, 333 src, 181 languages, 181, 212, 330 Start Menu, 325 protocols, 272 see also Table 6.1, 183 tools, 210 DirHandle.pm, sample, 309 domain.h, sample, 78 disjunction, 41 Double Checked Locking, design pattern, disp–asc.c, sample, 212 337 disp–asc.out, 212 double-ended queue, 121 dispatch, 306 doubly linked list, 121 Distributed Component Object Model, 271 down-list, editor command, 346 ditroff, program, 266 Doxygen, 261 division, 53 dry-run, 223 DLL, 322, 323, see also shared library .dsp, file extension, 227 DLL hell, 322 .dsw, file extension, 227 DLL.pm, sample, 311 dt, Hungarian prefix, 237 .dll, file extension, 227 .Dt, troff command, 262 dlutils.c, sample, 323 dump, program, 269 DNS, 247 Dump.h, sample, 308 do, keyword, 51, 174 dumpbin, 363 doc, directory name, 183, 248 dumprestore.h, sample, 269 doc, pseudo-target, 194 .Dv, troff command, 262 doc, sample, 248, 402 .dvi, file extension, 227 DocBook, 261, 265, 266 dw, Hungarian prefix, 236 doclets, 265 dynamic docmd.c, sample, 120 allocation of data structures, 62 {@docRoot}, javadoc tag, 263 dispatch, 180, 306 Spinellis main May 6, 2003 17:4

468 Index

link library, see DLL Ethernet, 279 linking, 322 European Conference on Pattern Languages memory allocation, 84 of Programming, 338 memory allocation pool, 168 eval.c, sample, 31, 125 shared objects, 322 event loop, 286 event pump, 286 E event-driven architecture, 285 %E%, revision-id tag, 206 EventObject, Java class, 289 EBCDIC, 212 @example, Texinfo command, 263 echo.c, sample, 20 exception, 36, 98, 150 Eclipse, 377 Exception, Java class, 150 ed, program, 170, 355 @exception, javadoc tag, 263 ed, sample, 171 exclusive range, 100 edge, 62, 125, 131, 134, 137 exclusive-or, 114 editor, 343 exec, Unix-specific function, 281 editor command, 343 execution profiler, 372 edu, directory name, 183 execve.pdf, sample, 223 eg, directory name, 183 execve, Unix-specific function, 222, 223 egrep, program, 161 exercises, 13 Eiffel, 126, 276, 296, 300 exit, C library, 24, 36, 43, 168 .el, file extension, 227 ExitThread, Win32 SDK, 163 elf.c, sample, 368 expand.c, sample, 25 elf2aout.c, sample, 22 expat-lite, sample, 322 Emacs, 227, 229, 340, 344, 345, 365 exponent, 83 @emph, Texinfo command, 263 export, 299 empty statement, 38 Exporter, Perl module, 299 encapsulation, 320 expr.c, sample, 130, 149 .encoding, 227 expression @end, Texinfo command, 263 boolean, 39 endian.h, sample, 92 character, 39 engine.c, sample, 173, 218 integer, 51 enum, keyword, 234 pointer, 65, 72 envelope.c, ex, 246 ext2, 281 EOF, C library, 24 ext2fs–readwrite.c, sample, 281 Epsilon, 340 ext2fs–vnops.c, sample, 282 eqn, program, 227 ext2fs–write, 281 .eqn, file extension, 227 ExtendableRendererFactory.java, equals, Java method, 23 sample, 332 –errno.c, sample, 320 extended linear hashing, 319 error messages, 215, 360 Extension Interface, design pattern, 337 Error, Java class, 150, 151 extern.h, sample, 92 Errors, manual section, 223 extern, keyword, 363 /etc/inetd.conf, file name, 325 External Polymorphism, design pattern, etc, directory name, 183 337 EtherExpress, 76 extra-functional property, 269 Spinellis main May 6, 2003 17:4

Index 469

extreme programming, 8, 10, 17, 378 configure, 199, 226 exuberant ctags, 344 Copying, 226 Eyes.c, sample, 231 INSTALL, 226 LICENSE, 226 F Makefile.in, 200 %F%, revision-id tag, 206 Makefile.SH, 226 f 771, program, 324 Makefile, 137, 200, 223, 226 f, Hungarian prefix, 236 MANIFEST, 226 fail, C++ library, 24 NEWS, 226 FALLTHROUGH, 32, 231 NUL, 350 FAQ, 260 patchlevel.h, 226 fast file system, 243 README, 226 FastDateFormat.java, sample, 220 tags, 343 fault isolation, 323 TODO, 226 Favorites, directory name, 325 version.h, 226 ferror, C library, 24 file.h, sample, 79 ffs.pdf, sample, 243 @file, Texinfo command, 263 ffs, sample, 243 filename, 225 ffs–vnops.c, sample, 313 filter, 161, 273, 323, 324 fgets, C library, 99 final state, 291 fgrep, program, 352 finalize, Java keyword, 302 field separator, 275 finally, Java keyword, 150, 152, 153 field, class, see class, field find, 14, 353 field, table, 101 find.c, sample, 125 FIFO, 77, 107 First, Hungarian prefix, 236 FigEdgeModelElement.java, sample, 302 fix list, 252 file differences, 355 fixed-width, 275 file extension FIXME, 233 .h, 225 FIXME, identifier name, 354 .info, 265 .Fl, troff command, 264 .ini, 202 floating-point numbers, 97 .man, 227 floppy distribution, 4 .texi, 265 flow, 376 see also Table 7.2, 227 fn, Hungarian prefix, 236 file name folding, 345 /dev/null, 350 for, Java keyword, 38 /etc/inetd.conf, 325 for, keyword, 34, 96, 118 ChangeLog, 226, 252 Fork.C, sample, 166 Changes, 226 fork, Unix-specific function, 160, 166, config.cache, 199 281 config.h.in, 200 formal practices, 180 config.h, 199, 200, 226 formatting, 230 config.log, 199 Fortran, 16, 42 config.status, 199 fortunes2, sample, 457 config–h.SH, 226 forward list traversal, 119 Spinellis main May 6, 2003 17:4

470 Index

forward-list, editor command, 346 generic code, 313 Foundation Classes, see Microsoft generic implementation, 313 Foundation Classes GENERIC, sample, 211 fpu–sqrt.c, sample, 341 get, in method name, 304 fractions, 309 get, Unix-specific function, 319 FrameMaker, 227, 260 GetCurrentThreadId, Win32 SDK, 163 framework, 328, 329 getenv, Unix-specific function, 201 fread, C library, 98 getopt, Unix-specific function, 22, 24, 28, free memory, 87 238, 264, 273 free, C library, 85, 89 getopt–long, Unix-specific function, 238 FreeBSD,89 getProperty, Java method, 201 FreeBSD documentation project, 261 getpwent.c, sample, 72 frexp.c, sample, 83 gets, C library, 98, 99 friend, keyword, 305, 307 getservent.c, sample, 44 .frm, file extension, 227 getTime, Java method, 387 frm, Hungarian prefix, 237 Glimpse, 354 FROM, Modula keyword, 299 global variable, 25 fsplit.c, sample, 34 GNATS, 209 ftp, program, 7 GNU, xxv, 4, 8, 14, 22, 89, 225, 261 FTP, 269 GNU C compiler, 195, 364, see also gcc ftpd.c, sample, 69 .getopt, Java package, 22 func.c, sample, 53, 296 good, C++ library, 24 function, 25, 26 goto, 43, 169 declaration, 25 goto, keyword, 43, 55, 159 pointer, 67 GoToMatchBraceExtend, editor command, return values, 76 346 function.c, sample, 213 GoToMatchBrace, editor command, 346 function.h, sample, 213 gperf, program, 141 functional description, 242 gprof, program, 134, 372, 378 functionality addition, 7 gprof.c, sample, 69 Future–Set.h, sample, 305 gprof.h, sample, 134 fwrite.c, sample, 280 gprof.pdf, sample, 246 fwrite, C library, 98, 280 grammar, 129, 144, 147, 177, 191 fxp–intr, 282 graph, 95, 131 graphics algorithm, 105 G GraphViz, 12 g substitute flag, 348 GregorianCalendar, Java class, 382, 386, g++, program, 323 390 %G%, revision-id tag, 206 , program, 14, 264, 344, 346, 364, 398 garbage collector, 87, 88, 303 -e, 354 gcc, program, 195, 372 -i, 354 -a, 372 -l, 348 GCManager.c, sample, 57 -n, 354 gencode.h, sample, 132 -v, 351 generalization relationship, 13, 277 groff, program, 365 Spinellis main May 6, 2003 17:4

Index 471

grok, 255 $History:$, revision-id tag, 206 gtkdiff, program, 357 history.c, sample, 52 GUI, 236, 274, 285 homedir.c, sample, 86 guidelines Host.java, sample, 298 BSD, 50, 226 hostctlr.h, sample, 213 coding, 225 hp7lc2k.c, sample, 222 data interchange, 129 .hpp, file extension, 227 development process, 239 hSql.html, sample, 380 deviations from, 339 hsqldb, program, 249 formatting, 230 hsqldb, sample, 400 GNU,50 hSqlSyntax.html, sample, 397 identation, 367 HTML, 28, 214, 249, 261, 265, 358, 359 identifier names, 234 HTTP, 244, 269, 271 indentation, 228 http–core.c, sample, 271 Java code, 226 http–protocol.c, sample, 244, 270 naming files, 225 Hungarian naming notation, 225, 235 portability, 237 hunt, 149 programming practices, 237 hunt.c, sample, 147 .gz, file extension, 227 Hypersonic SQL database engine, 249 gzip, program, 162, 227 I H i82365.c, sample, 282 %H%, revision-id tag, 206 %I%, revision-id tag, 206 .h, file extension, 225, 227 i, Hungarian prefix, 236 h, Hungarian prefix, 236 .I, troff command, 262 hack.objnam.c, sample, 40 IBM, 227 Half-Sync/Half-Async, design pattern, 333, IBM 3270, 212 337 IBM VM/CMS, 212 handler.c, sample, 286 .Ic, troff command, 262 hardware interrupt, 286 ICMP, 101 hash, 309 ico.c, sample, 102, 157 hash function, 114 .ico, file extension, 227 hash table, 113 .icon, file extension, 227 hash.c, sample, 229 $Id$, revision-id tag, 206 Hashable, Java class, 392, 395 IDE, 198 Hashtable, Java class, 319 idealized presentation, 254 head, 107, 117 ident, program, 207 $Header:$, revision-id tag, 206 identd.c, sample, 66, 73 header files, 20, 183, 226 identifier name $Header$, revision-id tag, 206 $*, 194 headers.c, sample, 246 $<, 194 heap, 89 $>, 194 help file, 190, 239 $?, 194 hidden structures, 139 $@, 194 hierarchical decomposition, 282 $$, 194 Spinellis main May 6, 2003 17:4

472 Index

argc,20 IN, identifier name, 64 argv,20 in–proto.c, sample, 113 buf,96 inbound.c, sample, 213 CC, 193 include files, see header files CFLAGS, 193 include/protocols, directory name, 269 CPP, 193 include, directory name, 183 DEBUG, 216, 222 INCLUDES, identifier name, 193 FIXME, 354 inclusive range, 100 IN,64 inconsistent, 231 INCLUDES, 193 indent, program, 231, 367 INSTALL, 193 indentation, 228 left, 126 index.html, sample, 249, 379 LFLAGS, 193 inetd, program, 327 LIBS, 193 inetd.conf, sample, 327 NDEBUG, 220 infblock.c, sample, 125 new,63 .info, file extension, 227, 265 next, 118 information hiding, 296 NULL, 20, 35, 42, 60, 118 information-hiding, 304 OBJS, 193 inheritance, 13, 180, 306 OUT,64 inheritance hierarchy, 300 prev, 121 .ini, file extension, 202 right, 126 init.c, sample, 36 SHELL, 193 init, Java method, 20 SRCS, 193 init–main.c, sample, 290 STREQ,22 initial state, 291 usage,26 initialization files, 202 xmalloc,85 inline, keyword, 177 XXX, 233, 354 inode, 114 identifiers, 246 inspections, 9 IDL, 261, 273 INSTALL, file name, 226 .idl, file extension, 227 INSTALL, identifier name, 193 idutils, 344 install, pseudo-target, 194 if–arp.c, sample, 234 installation instructions, 242 if–atm.c, sample, 64 instance, variable, see class, property if, keyword, 23, 55, 360 integer expression, 51 if–cs–isa.c, sample, 230 integer.h, sample, 309 if–ed.c, sample, 96 integrability, 269 if–fxp.c, sample, 282 integrated development environment, see if–fxpreg.h, sample, 76, 77 IDE IIS, see Microsoft Internet Information Intel, 76, 98 Server Interceptor, design pattern, 337 imake, 190, 195, 212 interface, 13, 106, 108, 317 imake, sample, 212 see IDL, 273 implements, Java keyword, 277, 301 interface, Java keyword, 277 import, Java keyword, 299 INTERFACE, Modula keyword, 299 IMPORT, Modula keyword, 299 interfaces, 249 Spinellis main May 6, 2003 17:4

Index 473

intermediate files, 324 Date, 387, 396 internal representation, 82 Error, 150, 151 International Conference on Pattern EventObject, 289 Languages of Programming, 338 Exception, 150 Internet Information Server, see Microsoft GregorianCalendar, 382, 386, 390 Internet Information Server Hashable, 392, 395 Internet Worm, 141 Hashtable, 319 interpreter state, 336 java.lang.Exception, 150 interrupt, 105, 155, 156, 159 RuntimeException, 151 INTR, 281 Stack, 319 intro, sample, 245 String,20 introductory guide, 242 System, 201 invariant, 56 TestCase, 220 IOCCC, 361 Throwable, 150 ioconf.c, 211 Thread, 162, 163 ioctl, Unix-specific function, 80 Vector, 319 iostream, 401 Java interface IP, 269 runnable, 162 .IP, troff command, 262 Java keyword IPX,78 abstract, 276, 306 .IR, troff command, 262 break, 38, 39, 152 ISA, Perl keyword, 311 catch, 150, 151, 152 isapnpres.c, sample, 125 class, 300 isLeapYear, Java method, 386 continue, 38, 39, 152 ISO, 186 finalize, 302 isolation of dependencies, see dependency finally, 150, 152, 153 isolation for,38 issue-tracking database, 259 implements, 277, 301 isupper, C library, 42 import, 299 isUpper, Java method, 42 interface, 277 .It, troff command, 262 package, 283, 298 @item, Texinfo command, 263 private, 226, 276, 304 Iterator, design pattern, 337 protected, 226, 276, 304 public, 226, 276, 304 J return, 152 Jade, 265 static, 276, 303, 332 jam, program, 196 synchronized, 163, 164, 165 jamfile, 196 this, 302, 309 .jar, file extension, 227 throws, 151, 154 JasperLogger.java, sample, 162 try, 150, 152, 153 Java, 42, 98, 276, 365 see also keyword API, 214 Java method SDK, 214 assert, 220 Java class checkError,24 Calendar, 382, 390 currentThread, 163 Character,42 equals,23 Spinellis main May 6, 2003 17:4

474 Index

getProperty, 201 .jsp, file extension, 227 getTime, 387 JspReader.java, sample, 38, 153 init,20 jt4, sample, 401 isLeapYear, 386 JUnit, 220, 224 isUpper,42 $JustDate:$, revision-id tag, 206 length,20 JVM, see Java Virtual Machine main, 220 notify, 163, 164 K run, 162 K&R C, 22 setUp, 220 kbd.out, 213 sleep, 163 kern–descrip.c, sample, 230 start, 162 kern–lkm.c, sample, 322 stop, 163 kern–synch.c, sample, 256 suite, 220 kernel modules, 322 tearDown, 220 key.c, sample, 112, 129 toLowerCase,42 keyword wait, 163, 164 break, 32, 36, 37, 55, 96, 231 yield, 163 case, 32, 219, 231 Java operator const, 64, 360 see also operator continue, 37, 55, 96 >>>,53 default,32 Java package delete, 167, 168, 302, 303 gnu.getopt,22 do, 51, 174 java.util, 80, 319 enum, 234 Math, 388 extern, 363 Java server page, 325 for, 34, 96, 118 Java Virtual Machine, 279 friend, 305, 307 java.util, Java package, 80, 319 goto, 43, 55, 159 .java, file extension, 227 if, 23, 55, 360 JavaBeans, 325 inline, 177 Javac.java, sample, 30 namespace, 283, 293, 297 javadoc, 214, 231, 261, 263, 265, 382 new, 168, 302, 303 JCL, 227 operator, 307 .jcl, file extension, 227 pragma, 360 jdbcConnection.java, sample, 304 private, 304 jdbcDatabaseMetaData.java, sample, 305 protected, 304 jdbcPreparedStatement.java, sample, public, 304 214 return, 36, 159, 169 JDBCStore.java, sample, 150 sig–atomic–t, 168 jobs, shell command, 146 static, 26, 66, 294, 296, 303, 363 jobs.c, sample, 120, 146, 147 struct, 62, 75, 92, 101, 145 join, 203 switch, 32, 212, 231, 360 jot, program, 374 template, 315 journal publications, 259 this, 302, 309 JSP, 325 throw, 154 Spinellis main May 6, 2003 17:4

Index 475

typedef, 91, 92, 296 libcurses, sample, 320 union, 80, 145 libedit, sample, 320 using, 298 libkvm, sample, 320 virtual, 306 libpcap, 132 void, 317 libpcap, sample, 320 volatile, 77, 168 library, 180, 227, 319 while, 30, 174, 360 Library.html, sample, 397 keywords, 205 Library.java, sample, 381, 382, 392, 393, 395 L LIBS, identifier name, 193 %L%, revision-id tag, 206 LICENSE, file name, 226 .l, file extension, 227 license, 20, 413 l, Hungarian prefix, 236 LifecycleException.java, sample, 151 label, 43 LIFO, 105 language, 15, 129 Like.java, sample, 317 block-structured, 105 Lim, Hungarian prefix, 236 markup, 105 line counting, 372 .language-code, 227 {@link}, javadoc tag, 263 large integers, 309 linked data structure, 62 large projects, 179 linked list, 95, 117, 167, 335 laser printer, 264, 375 lint, 33, 129, 231, 361, 377 last, program, 255 lint1.h, sample, 129 last.1, sample, 255 , xxv, 4, 8, 14, 183, 225 last.pdf, sample, 255 Linux documentation project, 266 Last, Hungarian prefix, 236 Lisp, 227 last, Perl keyword, 37 list.c, sample, 107 LaTeX, 228, 261, 265, 266, 359 listing, 360, 361 Law of Demeter, 338 literate programming, 17, 266 layered architecture, 279 localtime.c, sample, 111, 112 lbl, Hungarian prefix, 237 locate, program, 186 ld, program, 323 lock, 203 LDAPTransformer.java, sample, 345 $Locker$, revision-id tag, 206 Leader/Followers, design pattern, 337 $Log:$, revision-id tag, 206 left, identifier name, 126 log4j, 216 length, Java method, 20 $Log$, revision-id tag, 206 LevelDown, editor command, 346 $Logfile:$, revision-id tag, 206 LevelUp, editor command, 346 logging output, 216 , program, 194, 227 logical AND,41 lex.c, sample, 119, 122, 291 logical OR,41 lexical analysis, 333 longjmp, C library, 168, 169 LFLAGS, identifier name, 193 lookup table, 111, 212 lib, directory name, 183 loop, 28, 34, 37, 51, 54 .lib, file extension, 227 loop invariant, 56, 98 libc, sample, 320 lorder.sh, sample, 259 libcrypt, sample, 320 lower bound, 100 Spinellis main May 6, 2003 17:4

476 Index

lpd, sample, 268 Makefile.SH, file name, 226 lpr, program, 160 Makefile.tmpl, sample, 195, 240 .c, sample, 32, 90 makefile.win, sample, 196 ls.h, sample, 90 Makefile, file name, 137, 200, 223, 226 lsearch.c, sample, 317 Makefile, sample, 198, 223, 240 lst, Hungarian prefix, 237 makewhatis, program, 274 LXR, 366 makewhatis.sh, sample, 161, 274 malloc.c, sample, 80, 81, 173 M malloc, C library, 80, 84, 85, 88, 101 -M man, program, 28, 260, 265 gcc option, 195 -t, 265 M-., editor command, 343 man, directory name, 183 M-x outline-mode, editor command, 345 .man, file extension, 227 m4, program, 227, 256 MANIFEST, file name, 226 .m4, file extension, 227 mantissa, 83 %M%, revision-id tag, 206 manual page, 183, 190 Mac, Hungarian prefix, 236 map, 95, 111, 113 machdep.c, sample, 23, 74 MapStackResolver.java, sample, 39 Macintosh, 98 marketing material, 260 macro, 104, 172 markup language, 260 macro.c, ex, 246 marshalling, 273 main program and subroutine, 268 Martian, 256 main.c, sample, 42, 170, 286 master/slave, 157 Main.java, sample, 55 math.c, sample, 106 main, C library, 20, 219 Math.PI, Java method, 388 main, directory name, 183 Math, Java package, 388 main, Java method, 220 mathematical theorems, 3, 17 maintenance matrix, 95, 101, 309 branch, 203 mbuf.9, sample, 249 code beautifier, 367 mbuf.pdf, sample, 249 cost, 17 md2.h, sample, 306 documentation, 252 mdef.h, sample, 256 formatting changes, 50, 367 mdoc, macro package, 260 management, 17 me, macro package, 227 organization, 183 .me, file extension, 227 reason for reading code, 6 member function, see class, method .mak, file extension, 227 member variable, see class, property , program, 137, 139, 186, 192, 224 memcpy, C library, 97, 98 -n, 196 memmove, C library, 97 make.h, sample, 137, 139 memory access, 74 makedepend, program, 212 memory leak, 85, 87, 303 makedepend, sample, 212 memory management, 155 makefile, 192 memset, C library, 97 Makefile.in, file name, 200 Menu.cc, sample, 364 Makefile.nt, sample, 137, 192 message, 300 Spinellis main May 6, 2003 17:4

Index 477

meta-characters, 340 mkhits.c, sample, 213 method, see class, method MKS Toolkit, 377 MFC, see Microsoft Foundation Classes mktables.PL, sample, 37 Microsoft mm, macro package, 227 Access, 357 .mm, file extension, 227 C/C++ compiler, 364, see also cl, program MMDF, 160 C#, see C# mnu, Hungarian prefix, 237 Developer Studio, 227 mod–so.c, sample, 323 DOS, see MS-DOS Model-View-Controller, 329 Foundation Classes, 286, 329 modifications, 7 Internet Information Server, 327 $Modtime:$, revision-id tag, 206 Macro Assembler, 361 Modula, 293 MSDN, 28, 327 Modula keyword .NET platform, 15, 271 AS, 299 OLE automation, 359 FROM, 299 SDK element, see Win32 SDK IMPORT, 299 Visual Basic, 227, 235, 277, 300, 304, INTERFACE, 299 325, 344, 357 MODULE, 299 Visual Basic for Applications, 235 Modula-3, 299 Visual Source Safe, 203 module, 293, 297 Visual Studio, 346, 356, 372 MODULE, Modula keyword, 299 Windows, 8, 20, 160, 189, 190, 202, 216, modulo division, 53 323, 370, 376 Monitor Object, design pattern, 337 Windows Explorer, 186 more, sample, 11, 168 Windows Installer, 190, 240 , 286, 329 Windows NT, 137, 227 mount–nfs.c, sample, 336 Windows SDK, see Win32 SDK move.c, sample, 216 Windows SDK source, 235 MP3, 259 Windows Services for Unix, 377 mp, Hungarian prefix, 236 Windows, resource files, 183 MS-DOS, 77, 227, 370 Word, 260, 345, 359 MSDN, see Microsoft MSDN middleware, 271 msdosfs–write, 281 midnight commander, program, 186 msdosfs–vnops.c, sample, 281 MIF, 265 muldi3.c, sample, 245 .mif, file extension, 227 multiplayer games, 268 Min–Max.h, sample, 315 multiple inheritance, 277 miNCurve.c, sample, 103 multiple precision floating-point numbers, minurbs.c, sample, 103 309 misc.c, sample, 85, 166 multithread.c, sample, 162 mivaltree.c, sample, 125 multithread.h, sample, 162 .mk, file extension, 227 multithreaded, 168 mkastods.c, sample, 212 mutex, 159 mkastosc.c, sample, 213 mutex–clear, Unix-specific function, 162 mkdep, program, 195 mutual exclusion, 159 mkdstoas.c, sample, 212 mutual recursion, 147 Spinellis main May 6, 2003 17:4

478 Index

mv.c, sample, 87 Nil, Hungarian prefix, 236 MVC, 329 NIS, 272 My Documents, directory name, 325 nm, program, 363 .Nm, troff command, 262 N nmake, program, 192 n, Hungarian prefix, 236 node, 62, 125, 131 name mangling, 364 @node, Texinfo command, 263 $Name$, revision-id tag, 206 nodetypes, sample, 145 named, program, 126 noise, 350 namespace, 296 $NoKeywords:$, revision-id tag, 206 namespace pollution, 296 non-function requirements, 247 namespace, keyword, 283, 293, 297 non-software tools, 375 ncr–intr, 282 nonexistshell, sample, 223 ncr.c, sample, 282 notify, blackboard operation, 270 ncr5380sbc.c, sample, 44 notify, Java method, 163, 164 NDEBUG, identifier name, 220 NOTREACHED, 232, 291 ne2100.c, sample, 218 .nr, file extension, 227 .NET, see Microsoft .NET ns–validate.c, sample, 84 net, directory name, 186 NTP, 240 net, sample, 337 ntp–io.c, sample, 201 netatalk, sample, 186 NUL, file name, 350 NETBIOS, 279 NULL, C library, 52, 236 NetBSD, xxvi, 183 NULL, identifier name, 20, 35, 42, 60, netbsdsrc, sample, 400 118 netinet, sample, 186, 337 nullfs, sample, 330 netiso, sample, 186, 337 NumberGuessBean.java, sample, 325 netnatm, sample, 186, 337 numguess.jsp, sample, 325 netpbm, package, 275 nvi, program, 294, 365 network, 336 Network , 272 O Network Information Center, 269 .o, file extension, 227 Network Information System, 272 obj, directory name, 183 network interface, 76 .obj, file extension, 227 network time protocol, 240 object, 78, 300 new, identifier name, 63 browser, 300 new, keyword, 168, 302, 303 code, 319, 360, 362 new, Perl identifier, 309 diagram, 276 NEWS, file name, 226 request broker, 271 Next, Hungarian prefix, 236 see also class next, identifier name, 118 Object Lifetime Manager, design pattern, next, Perl keyword, 37 337 NFS, 272 Object Management Group, 271 nfs–vnops.c, sample, 281 object-oriented, 78, 180 nfsd, sample, 268 object-oriented architecture, 275 nfsspec–write, 281 OBJS, identifier name, 193 Spinellis main May 6, 2003 17:4

Index 479

Observer, design pattern, 337 opt, Hungarian prefix, 237 off-by-one errors, 100, 141 optimize.c, sample, 133 ofisa.c, sample, 89 options.c, sample, 201, 312 ofw.c, sample, 159 OR, logical, 41 .ok, file extension, 227 ORB, 271 OLE automation, see Microsoft OLE org, directory name, 183 automation OS.cpp, sample, 315 OMG, 271 OS/2, 193, 227 on-line messaging, 268 OS/32, 377 .Op, troff command, 262, 264 os2thread.h, sample, 162 open range, 100 os, directory name, 183 open-source software, xxv, 3, 16, 20 .Os, troff command, 262 as scientific communication vehicle, 3 OSI, 336 contributing, 5, 260 OUT, identifier name, 64 languages used, 15 outline mode, 345 reorganising code, 46 output.c, sample, 70 searching, 260 outwit, package, 377 source browsers, 365 overview, 243 see also individual project names open, Unix-specific function, 281 P opencl.h, sample, 306 %P%, revision-id tag, 206 OpenCL, sample, 401 p, Hungarian prefix, 236 opendir, Unix-specific function, 35, .Pa, troff command, 262 319 package, 300 OpenJade, 265 package, Ada keyword, 299 OpenNt, 376 package, Java keyword, 283, 298 , 155, 338 package, Perl keyword, 299, 309 specific code, 183 packaging abstraction, 292 operation, see class, method abstract data type, 318 operator component, 325 ||,41 data repository, 325 ,,35 filter, 323 ->, 102 generic implementation, 313 /**/, 176 library, 319 <<, 53, 308 module, 293 ==,52 namespace, 296 =, 30, 52 object, 300 >>, 53, 58, 308 process, 323 ?:, 46, 174 see also the individual terms ##, 176 page.h, sample, 256 &&, 22, 41 pair programming, 10 &, 53, 64 parallelism, 154 sizeof, 73, 85, 97 @param, javadoc tag, 263 operator overloading, 180, 305, 307 parse tree, 129, 334 operator, keyword, 307 parse.c, sample, 122, 124, 216 Spinellis main May 6, 2003 17:4

480 Index

parseaddr.c, ex, 246 physical, 336 parser generator, 130, 228 physical boundary, 293 Parser.java, sample, 334 pi.c, sample, 38 parsing, 129, 147, 333 pic, program, 227 Pascal, 42, 293 .pic, file extension, 227 patch, program, 137 pic, Hungarian prefix, 237 patchlevel.h, file name, 226 pickmove.c, sample, 97, 125 pattern, see design pattern ping.c, sample, 64 pax.c, sample, 43 pipeline, 157, 161, 274, 324 pax.h, sample, 312 pipes-and-filters architecture, 273 pb, Hungarian prefix, 237 pippen.pl, sample, 309 pcic–intr, 282 pk–subr.c, sample, 256 PclText.c, sample, 104 .pl, file extension, 227 PDF, 261 .pm, file extension, 227 perfect hash function, 141 pmap.c, sample, 218 Perkin-Elmer, 377 PMC–Ruser.cpp, sample, 368 Perl, 42, 98, 201, 214, 227, 276, 300, 309, .png, file extension, 227 330, 348, 349, 377 pod, documentation format, 214 perl .pod, file extension, 227 -e, 349 pod, sample, 214 -i, 349 pointer, 61, 62, 84, 102 -p, 349 aliasing, 70 inheritance, 311 and strings, 72 Perl classes, 309 to function, 67 Perl identifier poll, 156, 286 new, 309 poll, Unix-specific function, 80 self, 309 polymorphic functions, 316 Perl keyword polymorphism, 79 bless, 300, 309 pom.c, sample, 383, 384, 386, 387, 389 DESTROY, 310 pop, 105 ISA, 311 POP-3, 269 last,37 portability, 97, 98, 237, 360 next,37 Makefile, 196 package, 299, 309 POSIX, 15, 201, 280, 319 use, 299 postcondition, 218 see also keyword postincrement operator, 315 Perl module PostInputStream.java, sample, 300 Exporter, 299 postp.me, sample, 246 Perl operator, see operator Postscript, 228, 261, 265, 359 perl, sample, 401 Power PC, 98 perlbug.PL, sample, 224 pr.c, sample, 102 perlguts.pdf, sample, 249 practices, 237 perlguts.pod, sample, 249 formal, 180 pgp–s2k.cpp, sample, 306 pragma, keyword, 360 pgp–s2k.h, sample, 306 precondition, 218 Spinellis main May 6, 2003 17:4

Index 481

preen.c, sample, 62 pthread–mutex–destroy, Unix-specific prep, program, 372 function, 162, 163 preprocessor, 172, 181, 296, 315, 350, 360, pthread–mutex–init, Unix-specific 361, see also header files function, 163 presentation, 336 pthread–mutex–lock, Unix-specific pretty-printer, 359, 368 function, 163 Prev, Hungarian prefix, 236 pthread–mutex–unlock, Unix-specific prev, identifier name, 121 function, 163 print-icmp.c, sample, 101 pthread–self, Unix-specific function, print.c, sample, 64 163 printf.c, sample, 364, 374 pthread–yield, Unix-specific function, printf, C library, 23, 73 163 private, 304 pty.c, sample, 73 private, Java keyword, 226, 276, public, 304 304 public, Java keyword, 226, 276, 304 Proactor, design pattern, 337 publications, 259 process, 155, 323 PulseEvent, Win32 SDK, 163 in UML diagrams, 13 purenum, sample, 401 process standards, 239 push, 105 process.c, sample, 335 put, Unix-specific function, 319 processor architecture, 183 px–intr, 282 program listing, 360, 361 px.c, sample, 282 program slice, 283 @pxref, Texinfo command, 263 program state, 336 .py, file extension, 228 programming practices, 237 Python, 228, 276, 357, 377 project organization, 181 ProjectBrowser.java, sample, 286 Q protected, 304 qry, Hungarian prefix, 237 protected, Java keyword, 226, 276, qsort.c, sample, 374 304 qsort, C library, 69, 98 ps, program, 87, 323 qtchat, sample, 401 .ps, file extension, 228 qualifier, 77, 235 pseudo-target, 194, 195 quarks.c, sample, 158 .psp, file extension, 227 queue, 95, 107 pthread–cond–signal, Unix-specific queue.c, sample, 246 function, 163, 164 queue.h, sample, 319 pthread–cond–wait, Unix-specific Queue.java, sample, 164 function, 163, 164 queue, Unix-specific function, 319 pthread–cond–destroy, Unix-specific quicksort, 143 function, 163 quot.c, sample, 101 pthread–cond–init, Unix-specific function, 163 R pthread–create, Unix-specific function, %R%, revision-id tag, 206 162, 163 race condition, 166 pthread–exit, Unix-specific function, 163 radix.c, sample, 126 Spinellis main May 6, 2003 17:4

482 Index

radixsort.c, sample, 60 regexp.c, sample, 233 random.c, sample, 71 regression testing, 203, 222 range, 100 regular expression, 13, 291, 322, 340, 377 Rational Rose, 279 [ˆ], 341 rayshade, package, 320 [], 341 .rb, file extension, 228 and editors, 340 .RB, troff command, 262 and grep, 346 rc, directory name, 183 building blocks, 340 .rc, file extension, 228 character classes, 342 rcp.c, sample, 161, 175 eliminating noise, 350 RCS, 50, 203, 208, 224, 268, 327, 349, 355 listing matching files, 348 RCS, directory name, 183 locating definitions, 341 $RCSfile$, revision-id tag, 206 metacharacters, 342 rdisc.c, sample, 67, 99 Perl syntax, 344, 352 reactive systems, 274 replacements, 348 Reactor, design pattern, 337 starting with dash, 354 read, blackboard operation, 270 relational database, 101, 269, 327, 377, see read-only access, 305 also SQL read, Unix-specific function, 80, 281 release, 203 readcf.c, sample, 246 Release, directory name, 183 readdir, Unix-specific function, 35, ReleaseMutex, Win32 SDK, 163 319 Remote Method Invocation, 271, 337 README, file name, 226 Remote Procedure Call, 82, 271, 337 README, sample, 346 RemoteAddrValve.java, sample, 277 realization relationship, 13, 277 remove, blackboard operation, 270 realloc, C library, 86 ReportEvent, Win32 SDK, 216 reap, 166 repository, 203 record, 75, 101 RequestFilterValve.java, sample, 276 record.h, sample, 89 requirements, 247 recursion, 105, 143 requirements specification, 4, 241, 242 tail, 147 res, directory name, 183 recursive descent parser, 130, 147 .res, file extension, 228 Red Hat Linux, 190 resource files, 183 reentrancy, 66, 166 resource script, 228 refactoring, 8, 17, 45, 46 return, Java keyword, 152 reference architectures, 336 @return, javadoc tag, 263 reference count, 88 return, keyword, 36, 159, 169 reference manual, 242 reuse reflection, 325 and architecture, 180 RegCloseKey, Win32 SDK, 201 and code reading, 1, 9, 10 RegOpenKey, Win32 SDK, 201 and design patterns, 331 RegQueryValueEx, Win32 SDK, 201 and libraries, 319 regcomp.c, sample, 174, 175 bibliographic references, 17 regedit, program, 328 example, 382 regex, sample, 322 exercise, 357 Spinellis main May 6, 2003 17:4

Index 483

file differences, 355 run, Java method, 162 of architecture, 328 runnable, Java interface, 162 of data transformations, 273 RuntimeException, Java class, 151 of generic implementations, 318 rup.c, sample, 86, 118 of leaky code, 87 rusers–proc.c, sample, 91 of search results, 348 rwhod, program, 269 through processes, 159 rwhod.h, sample, 269 reverse engineering modeling tools, 275, 276, 278 S references, 338 s Perl/ command, 348 slicing, 283 S/Key, 87 $Revision:$, revision-id tag, 206 %S%, revision-id tag, 206 revision control, 202 .s, file extension, 227 revision control system, 183, 203, 252, 254, @samp, Texinfo command, 263 259, 263, 268, 327 save.c, sample, 98 $Revision$, revision-id tag, 206 sbdsp.c, sample, 282 rexx, 227 sbdsp–intr, 282 RFC, 269 scanf, C library, 99 rfc2068.txt, sample, 244 SCCS, 23, 50, 203, 207, 224 rfc793.txt, sample, 247 SCCS, directory name, 183 rg, Hungarian prefix, 236 schema, 327 right, identifier name, 126 Scoped Locking, design pattern, 337 ring buffer, 108 SCSI, 281 rmdir.c, sample, 368 scsipi–done, 281 RMI, 271, 337 scsipi–base.c, sample, 281 rnd.c, sample, 109 sd.c, sample, 281 rnd.h, sample, 297 sdbm, sample, 322 .roff, file extension, 227 sdstrategy, 281 room.c, sample, 70 @section, Texinfo command, 263 round-robin, 289 sed, program, 162, 205, 228, 335, 348, 357, round-trip engineering modeling, 279 377 round.c, sample, 219 .sed, file extension, 228 route, program, 336 sed, sample, 343 route.c, sample, 336 @see, javadoc tag, 263 route, sample, 336 seekdir, Unix-specific function, 319 routed, program, 269, 336 selection, 23, 32, 47 routed.h, sample, 269 Selection.c, sample, 88 routed, sample, 336 selective display, 345 RPC, 82, 271, 337 self, Perl identifier, 309 rpc–msg.h, sample, 82 semantic analysis, 334 RPM, 190, 240 semaphore, 163 RTF, 261, 265, 359 sendmail, xxv, 160, 245 Ruby, 228, 276 sendmail.pdf, sample, 245 run-time configuration, 200 seq, Unix-specific function, 319 run-time tool, 370 Sequence–T.cpp, sample, 252 Spinellis main May 6, 2003 17:4

484 Index

ser.c, sample, 52 SIGSEGV, 165 @serial, javadoc tag, 263 SIGWINCH, 168 @serialData, javadoc tag, 263 silence, 350 @serialField, javadoc tag, 263 sin, C library, 388 server.cpp, sample, 330 @since, javadoc tag, 263 ServerConnection.java, sample, 164 Singleton, design pattern, 332, 337 Service Configurator, design pattern, 337 sizeof, operator, 73, 85, 97 services, 216 skeyinit, 87 servlet, 20 skeyinit.c, sample, 87 session, 336 skipjack.h, sample, 297 set, 95, 116 Sleep(0), Win32 SDK, 163 set foldenable, editor command, 345 sleep, 281 set, in method name, 304 sleep, Java method, 163 set-selective-display, editor command, sleep, Unix-specific function, 163 345 Sleep, Win32 SDK, 163 set.c, sample, 46, 116 slicing, 6, 283 setjmp, C library, 169 slicing criterion, 283 setUp, Java method, 220 smail, package, 160 SGML, 261 Smalltalk, 276, 300, 365 sh, program, 227 smart pointers, 308 -c, 161 smbfs, 252 .sh, file extension, 227 SMTP, 269 .Sh, troff command, 262 smtp.C, sample, 308 .SH, troff command, 262 SNA,78 shallow copy, 303 snake.c, sample, 75 .shar, file extension, 227 snprintf, C library, 99 shared library, 202, 227, 322, see also DLL .so, file extension, 227 sharing, 88 social processes, 3, 17 shell, 146 Socket.pm, sample, 312 SHELL, identifier name, 193 socket, sample, 401 shift, 53, 117 sockunix.C, sample, 303 short-circuit evaluation, 41, 174 software archeology, 17 shutdown, 160 software maintenance, see maintenance sig–atomic–t, keyword, 168 software process, 179 sigaction, Unix-specific function, 167 software requirements specification, see SIGCHLD, 166 requirements specification SIGCONT, 165 Solaris, 8 SIGFPE, 165 SONET, 279 SIGILL, 165 sort, program, 275, 352, 357, 374 SIGINT, 165, 168 source code control system, see revision signal, 150, 165 control system signal handler, 165 source code tree, 181 signal, C library, 168 source examples, see example source signal, Unix-specific function, 167 Source-Navigator, 366 signature, 358 $Source$, revision-id tag, 206 Spinellis main May 6, 2003 17:4

Index 485

SourceForge Bug Tracker, 209 strcpy, C library, 99 SourceForge.net, 16 strcspn.c, sample, 232 , package, 275 strdup, C library, 66 spec–strategy, 281 stream editor, 228, 348, see also sed, spec–vnops.c, sample, 281 program specifications, 244 STREQ, identifier name, 22 spglyph.c, sample, 219 strftime.3, sample, 251 split, 203 strftime.pdf, sample, 251 sprintf, C library, 98, 99 string, 72 Spy++, 372 String, Java class, 20 SQL, 6, 269, 327 StringUtils.java, sample, 34 SQLTransformer.java, sample, 153 strlen.c, sample, 72 src, directory name, 181, 183 strlen, C library, 72 src, sample, 245, 275, 329 strncat, C library, 99 SRCS, identifier name, 193 strncpy, C library, 99 stack, 89, 95, 99, 105 @strong, Texinfo command, 263 stack pointer, 106 struct, keyword, 62, 75, 92, 101, 145 Stack, Java class, 319 structured programming, 54 standard document, 259 stub, 272 standard template library, see STL stubs.c, sample, 121, 122, 125 StandardContext.java, sample, 201 style guide, see guidelines StandardLoader.java, sample, 54, 151 style, sample, 50 standards, see guidelines suffix, 225 StandardWrapperValve.java, sample, 217 .SUFFIX, makefile command, 194 Start Menu, directory name, 325 suite, Java method, 220 start, Java method, 162 Sun, 8 state machine, 291 supplementary material, 14 state transition, 291 Swing, 286, 329 state transition diagram, 291 switch, keyword, 32, 212, 231, 360 $State$, revision-id tag, 206 symbol table, 124 static, Java keyword, 276, 303, 332 symbolic code, 227, 360, 362 static, keyword, 26, 66, 294, 296, 363 symbolic name, 203 stdin, C library, 51 synchronization, 162 stdio.h, sample, 297 synchronized, Java keyword, 163, 164, stdio, C library, 166, 280 165 StdString.h, sample, 309 sys–write, 280 STL, 80, 100, 318 sys, sample, 165, 295, 346, 353, 368 stop, Java method, 163 sys–generic.c, sample, 280 storage efficiency, 80, 322 syscalls.master, sample, 280, 355 str.c, sample, 53 syslog, Unix-specific function, 216 strace, program, 370 system manager, 289 Strategized Locking, design pattern, 337 system specification, see requirements Strategy Bridge, design pattern, 337 specification strcat, C library, 99 system structure, 245, 268 strcmp, C library, 22, 234 System V, 162 Spinellis main May 6, 2003 17:4

486 Index

System, Java class, 201 Test scripts, 183 systime.c, sample, 217 test specification, 242 sz, Hungarian prefix, 236 test suite, 220 test, directory name, 183 T .test, file extension, 228 %T%, revision-id tag, 206 test, pseudo-target, 194 \t,25 TEST, sample, 214, 215 .t, file extension, 228 TestCase, Java class, 220 T, Hungarian prefix, 236 testing, 214, 215 tab, 25, 228 TestRunner, 220 table, 95, 101 TeX, 227, 228, 260, 263, 265, 266 tables.c, sample, 114 .tex, file extension, 228 tag, 203, 235, 354 .texi, file extension, 228, 265 tags, file name, 343 Texinfo, 227, 228, 239, 260 tail, 107 .TH, troff command, 262 tail recursion, 147 THE, 337 talk, program, 268 this, 302, 309 talkd.h, sample, 268 this, Java keyword, 302 TAO–Singleton.h, sample, 332 this, keyword, 309 tape.c, sample, 67, 154 thread, 66, 155, 162, 216 , program, 82 Thread Pool, design pattern, 337 tar.h, sample, 82 Thread-per Request, design pattern, 337 .tar, file extension, 227 Thread-per Session, design pattern, 337 task manager, 87, 323 Thread-Safe Interface, design pattern, 337 tbl, program, 227 thread.h, sample, 162 .tbl, file extension, 227 Thread, Java class, 162, 163 tbl, Hungarian prefix, 237 three-tier, 269 Tcl/, 98, 201, 228, 330 throw, keyword, 154 .tcl, file extension, 228 Throwable, Java class, 150 TCP, 77, 269 throws, Java keyword, 151, 154 tcp.h, sample, 77 @throws, javadoc tag, 263 TCP/IP, 186, 247, 279 tiered architectures, 269 tcp–fsm.h, sample, 246 time, Hungarian prefix, 237 tcpdump, program, 132, 249, 371 timed, program, 269 tcpdump.8, sample, 249 timed.c, sample, 31 tcpdump.pdf, sample, 249 timed.h, sample, 269 tearDown, Java method, 220 TLD, 183 tee, program, 275 tm–year, C library, 390 telldir, Unix-specific function, 319 TMPfunc.out, 213 template, keyword, 315 tmr, Hungarian prefix, 237 temporary files, 274 tn3270, 212 term.c, sample, 42 TODO, 233 Test, 228 TODO, file name, 226 test case, 28, 220, 249, 259 Together ControlCenter, 249, 279 test harness, 220, 374 token, 129, 333 Spinellis main May 6, 2003 17:4

Index 487

Tokenizer.java, sample, 391, 392 typographical conventions, 10 tolower, C library, 42 tzfile.h, sample, 386 toLowerCase, Java method, 42 Tomcat, 277, 278 U tool, 183 %U%, revision-id tag, 206 compiler, 360 UDP/IP, 279 non-software, 375 ufs–strategy, 281 roll your own, 357 ufs–vnops.c, sample, 281 run-time, 370 ufsspec–write, 281 tools, 14, 210, 275, 339 UML, 203, 249, 275, 291, 332, 378, see also tools, directory name, 183 diagram top, program, 87 undo, 105 topological sort, 131, 192 undocumented features, 254 trace, 203, 370 Unicode, 97, 248 trace.c, sample, 67 Unified Modeling Language, see UML Trace.java, sample, 394 uninitialized variables, 23 tracing statement, 216 union–write, 281 transaction monitor, 269 union, keyword, 80, 145 transport, 336 union–vnops.c, sample, 281 traversal, 128, 139 uniq, program, 352, 357 traverse Unix, 160, 371 circular list, 122 Unix-specific function singly linked list, 117 alloca,88 tree, 128 close, 80, 281 tree, 95, 125 closedir, 319 AVL, 130 DB, 319 binary, 126 dbopen, 319 parse, 129 del, 319 tree.c, sample, 127, 128 exec, 281 tree.h, sample, 126 execve, 222, 223 troff, program, 227, 260, 263, 274, 359 fork, 160, 166, 281 try, Java keyword, 150, 152, 153 get, 319 tsleep, 165 getenv, 201 tsort, program, 131, 376 getopt, 22, 24, 28, 238, 264, 273 tsort.c, sample, 131, 139 getopt–long, 238 tsort, sample, 376 ioctl,80 tty noise, 385 mutex–clear, 162 tty.c, sample, 70 open, 281 tv–sec, C library, 76 opendir, 35, 319 tv–usec, C library, 76 poll,80 two-tier, 269 pthread–cond–signal, 163, 164 txt, Hungarian prefix, 237 pthread–cond–wait, 163, 164 type field, 82 pthread–cond–destroy, 163 typedef, keyword, 91, 92, 296 pthread–cond–init, 163 types.h, sample, 92 pthread–create, 162, 163 Spinellis main May 6, 2003 17:4

488 Index

pthread–exit, 163 vector.s, sample, 281 pthread–mutex–destroy, 162, 163 vector, C++ library, 100 pthread–mutex–init, 163 Vector, Java class, 319 pthread–mutex–lock, 163 version, 203 pthread–mutex–unlock, 163 version control system, see revision control pthread–self, 163 system pthread–yield, 163 version.c, sample, 73 put, 319 version.h, file name, 226 queue, 319 @version, javadoc tag, 263 read, 80, 281 vertex, 62, 131 readdir, 35, 319 vfs–bio.c, sample, 281 seekdir, 319 vfs–subr.c, sample, 79, 234 seq, 319 vfs–vnops.c, sample, 280 sigaction, 167 vgrind, program, 368 signal, 167 , program, 253, 340, 344, 385 sleep, 163 vi, sample, 294, 347, 353 syslog, 216 viewres.c, sample, 96 telldir, 319 vim, program, 229, 233, 344, 345, wait, 166 365 write, 80, 166, 280, 281 virtual unix.kbd, sample, 213 function table, 313 upgrade.sh, sample, 20 machine, 113, 279 upper bound, 100 method, 79, 282 usage, identifier name, 26 virtual, keyword, 306 use, Ada keyword, 299 virus, 99 use, Perl keyword, 299 Visitor, design pattern, 337 user documentation, 242 Visual . . . , see Microsoft . . . user reference manual, 242 vixie-security.pdf, sample, 248 using, keyword, 298 vixie-security.ps, sample, 248 util.c, sample, 7, 161 vm86.c, sample, 176 util–win32.c, sample, 234 vm–glue.c, sample, 289 utils.h, sample, 296 vm–swap.c, sample, 174 UWIN, 376 VMS, 227 vn–write, 280 V vnode.h, sample, 313 v–increment.c, sample, 294 vnode–if.c, sample, 313 valves, sample, 277 vnode–if.h, sample, 313 var.c, sample, 52, 233 vnode–if.src, sample, 280, 281, 313 @var, Texinfo command, 263 void, keyword, 317 variable, 25 volatile, keyword, 77, 168 variant, 56 VOP–STRATEGY, 281 .vbp, file extension, 227 VOP–WRITE, 280 vcf, sample, 401 vs–smap.c, sample, 35 vcfLicense.txt, sample, 457 vsnprintf, C library, 99 vector, 95, 96 vsprintf, C library, 99 Spinellis main May 6, 2003 17:4

Index 489

VT-100, 222 window.c, sample, 126 vtbl, 313 window, sample, 268, 294 vttest, 222 Windows . . . , see . . . vttest, sample, 222 WinDump, 371 WinMain, Win32 SDK,20 W with, Ada keyword, 299 %W%, revision-id tag, 206 Word, see Microsoft Word w, Hungarian prefix, 236 work crew, 156, 157 wait, Java method, 163, 164 $Workfile:$, revision-id tag, 206 wait, Unix-specific function, 166 World Wide Web, 268 WaitForSingleObject, Win32 SDK, worm, 99 163 worms.c, sample, 46 wakeup, 281 Wrapper Facade, design pattern, 337 WARDirContextTestCase.java, sample, write, blackboard operation, 270 220 write, Unix-specific function, 80, 166, 280, warning messages, 26, 360 281 wc.c, sample, 283, 372 wd80x3.c, sample, 355 X Web browser, 186 X Window System, 158, 162, 190, 195, 201, WebServer.java, sample, 299 212, 322 what, program, 206, 207 X Window System library while, keyword, 30, 174, 360 XtGetApplicationResources, 201 wildmat.c, sample, 99 X.25, 256 Win32, 15, 376 xargs, program, 353 Win32 SDK .xbm, file extension, 227 CloseHandle, 163 xcalc.c, sample, 201 CreateEvent, 163 xdiff, program, 357 CreateMutex, 163 xdryp.c, sample, 272 CreateThread, 162, 163 Xev, 372 ExitThread, 163 xf86bcache.c, sample, 125 GetCurrentThreadId, 163 xfontsel.c, sample, 286 PulseEvent, 163 XFree86-3.3, sample, 402 RegCloseKey, 201 xmalloc, identifier name, 85 RegOpenKey, 201 Xman.ad, sample, 286 RegQueryValueEx, 201 xmessage, sample, 329 ReleaseMutex, 163 XML, 191, 196, 261, 263, 327 ReportEvent, 216 XMLByteStreamCompiler.java, sample, Sleep, 163 299 WaitForSingleObject, 163 Xpoll.h, sample, 116, 117 WinMain,20 .Xr, troff command, 262 win32thread.c, sample, 162 xref.c, sample, 63, 126 win32thread.h, sample, 162 xref.h, sample, 63 windiff, program, 356 @xref, Texinfo command, 263 window, 294 Xrm.c, sample, 117 window manager, 286 XrmUniqueQuark, 158 Spinellis main May 6, 2003 17:4

490 Index

Xserver, sample, 268 yield, Java method, 163 Xt, 286, 329 yp–first.c, sample, 272 Xt, sample, 313 ypserv.c, sample, 272 XtGetApplicationResources, X-Windows library, 201 Z Xthreads.h, sample, 162 %Z%, revision-id tag, 206 Xtransam.c, sample, 158 .Z, file extension, 227 xxdiff, program, 357 Zc, editor command, 345 xxgdb, program, 374 zic.c, sample, 334 XXX, identifier name, 233, 354 Zm, editor command, 345 Zo, editor command, 345 Y zombie, 166 %Y%, revision-id tag, 206 zopen.c, sample, 35, 65, 74 .y, file extension, 228 Zr, editor command, 345 , 130, 191, 194, 228 zsh, program, 353 yes.c, sample, 11 zutil.h, sample, 296