├── CPYRIGHT ├── LOG ├── README ├── alpha └── osf │ └── tst │ ├── 8q.1bk │ ├── 8q.2bk │ ├── 8q.sbk │ ├── array.1bk │ ├── array.2bk │ ├── array.sbk │ ├── cf.1bk │ ├── cf.2bk │ ├── cf.sbk │ ├── cq.1bk │ ├── cq.2bk │ ├── cq.sbk │ ├── cvt.1bk │ ├── cvt.2bk │ ├── cvt.sbk │ ├── fields.1bk │ ├── fields.2bk │ ├── fields.sbk │ ├── front.2bk │ ├── front.sbk │ ├── incr.1bk │ ├── incr.2bk │ ├── incr.sbk │ ├── init.1bk │ ├── init.2bk │ ├── init.sbk │ ├── limits.1bk │ ├── limits.2bk │ ├── limits.sbk │ ├── paranoia.1bk │ ├── paranoia.2bk │ ├── paranoia.sbk │ ├── sort.1bk │ ├── sort.2bk │ ├── sort.sbk │ ├── spill.1bk │ ├── spill.2bk │ ├── spill.sbk │ ├── stdarg.1bk │ ├── stdarg.2bk │ ├── stdarg.sbk │ ├── struct.1bk │ ├── struct.2bk │ ├── struct.sbk │ ├── switch.1bk │ ├── switch.2bk │ ├── switch.sbk │ ├── wf1.1bk │ ├── wf1.2bk │ ├── wf1.sbk │ ├── yacc.1bk │ ├── yacc.2bk │ └── yacc.sbk ├── cpp ├── cpp.c ├── cpp.h ├── eval.c ├── getopt.c ├── hideset.c ├── include.c ├── lex.c ├── macro.c ├── nlist.c ├── tokens.c └── unix.c ├── custom.mk ├── doc ├── bprint.1 ├── install.html └── lcc.1 ├── etc ├── bprint.c ├── gcc-solaris.c ├── irix.c ├── lcc.c ├── linux.c ├── ops.c ├── osf.c ├── solaris.c └── win32.c ├── include ├── alpha │ └── osf │ │ ├── assert.h │ │ ├── ctype.h │ │ ├── errno.h │ │ ├── float.h │ │ ├── limits.h │ │ ├── locale.h │ │ ├── math.h │ │ ├── setjmp.h │ │ ├── signal.h │ │ ├── stdarg.h │ │ ├── stddef.h │ │ ├── stdio.h │ │ ├── stdlib.h │ │ ├── string.h │ │ └── time.h ├── mips │ └── irix │ │ ├── assert.h │ │ ├── ctype.h │ │ ├── errno.h │ │ ├── float.h │ │ ├── limits.h │ │ ├── locale.h │ │ ├── math.h │ │ ├── setjmp.h │ │ ├── signal.h │ │ ├── stdarg.h │ │ ├── stddef.h │ │ ├── stdio.h │ │ ├── stdlib.h │ │ ├── string.h │ │ └── time.h ├── sparc │ └── solaris │ │ ├── assert.h │ │ ├── ctype.h │ │ ├── errno.h │ │ ├── float.h │ │ ├── limits.h │ │ ├── locale.h │ │ ├── math.h │ │ ├── setjmp.h │ │ ├── signal.h │ │ ├── stdarg.h │ │ ├── stddef.h │ │ ├── stdio.h │ │ ├── stdlib.h │ │ ├── string.h │ │ └── time.h ├── symbolic │ └── irix │ │ ├── assert.h │ │ ├── ctype.h │ │ ├── errno.h │ │ ├── float.h │ │ ├── limits.h │ │ ├── locale.h │ │ ├── math.h │ │ ├── setjmp.h │ │ ├── signal.h │ │ ├── stdarg.h │ │ ├── stddef.h │ │ ├── stdio.h │ │ ├── stdlib.h │ │ ├── string.h │ │ └── time.h └── x86 │ └── linux │ ├── assert.h │ ├── float.h │ ├── limits.h │ ├── math.h │ └── stdarg.h ├── lburg ├── gram.c ├── gram.y ├── lburg.1 ├── lburg.c └── lburg.h ├── lib ├── assert.c ├── bbexit.c └── yynull.c ├── makefile ├── makefile.nt ├── mips └── irix │ └── tst │ ├── 8q.1bk │ ├── 8q.2bk │ ├── 8q.sbk │ ├── array.1bk │ ├── array.2bk │ ├── array.sbk │ ├── cf.1bk │ ├── cf.2bk │ ├── cf.sbk │ ├── cq.1bk │ ├── cq.2bk │ ├── cq.sbk │ ├── cvt.1bk │ ├── cvt.2bk │ ├── cvt.sbk │ ├── fields.1bk │ ├── fields.2bk │ ├── fields.sbk │ ├── front.2bk │ ├── front.sbk │ ├── incr.2bk │ ├── incr.sbk │ ├── init.1bk │ ├── init.2bk │ ├── init.sbk │ ├── limits.1bk │ ├── limits.2bk │ ├── limits.sbk │ ├── paranoia.1bk │ ├── paranoia.2bk │ ├── paranoia.sbk │ ├── sort.1bk │ ├── sort.2bk │ ├── sort.sbk │ ├── spill.2bk │ ├── spill.sbk │ ├── stdarg.1bk │ ├── stdarg.2bk │ ├── stdarg.sbk │ ├── struct.1bk │ ├── struct.2bk │ ├── struct.sbk │ ├── switch.1bk │ ├── switch.2bk │ ├── switch.sbk │ ├── wf1.1bk │ ├── wf1.2bk │ ├── wf1.sbk │ ├── yacc.1bk │ ├── yacc.2bk │ └── yacc.sbk ├── sparc └── solaris │ └── tst │ ├── 8q.1bk │ ├── 8q.2bk │ ├── 8q.sbk │ ├── array.1bk │ ├── array.2bk │ ├── array.sbk │ ├── cf.1bk │ ├── cf.2bk │ ├── cf.sbk │ ├── cq.1bk │ ├── cq.2bk │ ├── cq.sbk │ ├── cvt.1bk │ ├── cvt.2bk │ ├── cvt.sbk │ ├── fields.1bk │ ├── fields.2bk │ ├── fields.sbk │ ├── front.2bk │ ├── front.sbk │ ├── incr.1bk │ ├── incr.2bk │ ├── incr.sbk │ ├── init.1bk │ ├── init.2bk │ ├── init.sbk │ ├── limits.1bk │ ├── limits.2bk │ ├── limits.sbk │ ├── paranoia.1bk │ ├── paranoia.2bk │ ├── paranoia.sbk │ ├── sort.1bk │ ├── sort.2bk │ ├── sort.sbk │ ├── spill.1bk │ ├── spill.2bk │ ├── spill.sbk │ ├── stdarg.1bk │ ├── stdarg.2bk │ ├── stdarg.sbk │ ├── struct.1bk │ ├── struct.2bk │ ├── struct.sbk │ ├── switch.1bk │ ├── switch.2bk │ ├── switch.sbk │ ├── wf1.1bk │ ├── wf1.2bk │ ├── wf1.sbk │ ├── yacc.1bk │ ├── yacc.2bk │ └── yacc.sbk ├── src ├── alloc.c ├── alpha.md ├── bind.c ├── bytecode.c ├── c.h ├── config.h ├── dag.c ├── dagcheck.md ├── decl.c ├── enode.c ├── error.c ├── event.c ├── expr.c ├── gen.c ├── init.c ├── inits.c ├── input.c ├── lex.c ├── list.c ├── main.c ├── mips.md ├── null.c ├── ops.h ├── output.c ├── prof.c ├── profio.c ├── run.sh ├── simp.c ├── sparc.md ├── stab.c ├── stab.h ├── stmt.c ├── string.c ├── sym.c ├── symbolic.c ├── token.h ├── trace.c ├── tree.c ├── types.c ├── x86.md └── x86linux.md ├── tst ├── 8q.0 ├── 8q.c ├── array.0 ├── array.c ├── cf.0 ├── cf.c ├── cq.0 ├── cq.c ├── cvt.0 ├── cvt.c ├── fields.0 ├── fields.c ├── front.0 ├── front.c ├── incr.0 ├── incr.c ├── init.0 ├── init.c ├── limits.0 ├── limits.c ├── paranoia.0 ├── paranoia.c ├── sort.0 ├── sort.c ├── spill.0 ├── spill.c ├── stdarg.0 ├── stdarg.c ├── struct.0 ├── struct.c ├── switch.0 ├── switch.c ├── wf1.0 ├── wf1.c ├── yacc.0 └── yacc.c └── x86 ├── linux └── tst │ ├── 8q.1bk │ ├── 8q.2bk │ ├── 8q.sbk │ ├── array.1bk │ ├── array.2bk │ ├── array.sbk │ ├── cf.1bk │ ├── cf.2bk │ ├── cf.sbk │ ├── cq.1bk │ ├── cq.2bk │ ├── cq.sbk │ ├── cvt.1bk │ ├── cvt.2bk │ ├── cvt.sbk │ ├── fields.1bk │ ├── fields.2bk │ ├── fields.sbk │ ├── front.2bk │ ├── front.sbk │ ├── incr.1bk │ ├── incr.2bk │ ├── incr.sbk │ ├── init.1bk │ ├── init.2bk │ ├── init.sbk │ ├── limits.1bk │ ├── limits.2bk │ ├── limits.sbk │ ├── paranoia.1bk │ ├── paranoia.2bk │ ├── paranoia.sbk │ ├── sort.1bk │ ├── sort.2bk │ ├── sort.sbk │ ├── spill.1bk │ ├── spill.2bk │ ├── spill.sbk │ ├── stdarg.1bk │ ├── stdarg.2bk │ ├── stdarg.sbk │ ├── struct.1bk │ ├── struct.2bk │ ├── struct.sbk │ ├── switch.1bk │ ├── switch.2bk │ ├── switch.sbk │ ├── wf1.1bk │ ├── wf1.2bk │ ├── wf1.sbk │ ├── yacc.1bk │ ├── yacc.2bk │ └── yacc.sbk └── win32 └── tst ├── 8q.1bk ├── 8q.2bk ├── 8q.sbk ├── array.1bk ├── array.2bk ├── array.sbk ├── cf.1bk ├── cf.2bk ├── cf.sbk ├── cq.1bk ├── cq.2bk ├── cq.sbk ├── cvt.1bk ├── cvt.2bk ├── cvt.sbk ├── fields.1bk ├── fields.2bk ├── fields.sbk ├── front.2bk ├── front.sbk ├── incr.1bk ├── incr.2bk ├── incr.sbk ├── init.1bk ├── init.2bk ├── init.sbk ├── limits.1bk ├── limits.2bk ├── limits.sbk ├── paranoia.1bk ├── paranoia.2bk ├── paranoia.sbk ├── sort.1bk ├── sort.2bk ├── sort.sbk ├── spill.1bk ├── spill.2bk ├── spill.sbk ├── stdarg.1bk ├── stdarg.2bk ├── stdarg.sbk ├── struct.1bk ├── struct.2bk ├── struct.sbk ├── switch.1bk ├── switch.2bk ├── switch.sbk ├── wf1.1bk ├── wf1.2bk ├── wf1.sbk ├── yacc.1bk ├── yacc.2bk └── yacc.sbk /README: -------------------------------------------------------------------------------- 1 | This hierarchy is the distribution for lcc version 4.2. 2 | 3 | lcc version 3.x is described in the book "A Retargetable C Compiler: 4 | Design and Implementation" (Addison-Wesley, 1995, ISBN 0-8053-1670-1). 5 | There are significant differences between 3.x and 4.x, most notably in 6 | the intermediate code. For details, see 7 | https://drh.github.io/lcc/documents/interface4.pdf. 8 | 9 | VERSION 4.2 IS INCOMPATIBLE WITH EARLIER VERSIONS OF LCC. DO NOT 10 | UNLOAD THIS DISTRIBUTION ON TOP OF A 3.X DISTRIBUTION. 11 | 12 | LCC is a C89 ("ANSI C") compiler designed to be highly retargetable. 13 | 14 | LOG describes the changes since the last release. 15 | 16 | CPYRIGHT describes the conditions under you can use, copy, modify, and 17 | distribute lcc or works derived from lcc. 18 | 19 | doc/install.html is an HTML file that gives a complete description of 20 | the distribution and installation instructions. 21 | 22 | Chris Fraser / cwf@aya.yale.edu 23 | David Hanson / drh@drhanson.net 24 | -------------------------------------------------------------------------------- /alpha/osf/tst/8q.1bk: -------------------------------------------------------------------------------- 1 | 1 5 8 6 3 7 2 4 2 | 1 6 8 3 7 4 2 5 3 | 1 7 4 6 8 2 5 3 4 | 1 7 5 8 2 4 6 3 5 | 2 4 6 8 3 1 7 5 6 | 2 5 7 1 3 8 6 4 7 | 2 5 7 4 1 8 6 3 8 | 2 6 1 7 4 8 3 5 9 | 2 6 8 3 1 4 7 5 10 | 2 7 3 6 8 5 1 4 11 | 2 7 5 8 1 4 6 3 12 | 2 8 6 1 3 5 7 4 13 | 3 1 7 5 8 2 4 6 14 | 3 5 2 8 1 7 4 6 15 | 3 5 2 8 6 4 7 1 16 | 3 5 7 1 4 2 8 6 17 | 3 5 8 4 1 7 2 6 18 | 3 6 2 5 8 1 7 4 19 | 3 6 2 7 1 4 8 5 20 | 3 6 2 7 5 1 8 4 21 | 3 6 4 1 8 5 7 2 22 | 3 6 4 2 8 5 7 1 23 | 3 6 8 1 4 7 5 2 24 | 3 6 8 1 5 7 2 4 25 | 3 6 8 2 4 1 7 5 26 | 3 7 2 8 5 1 4 6 27 | 3 7 2 8 6 4 1 5 28 | 3 8 4 7 1 6 2 5 29 | 4 1 5 8 2 7 3 6 30 | 4 1 5 8 6 3 7 2 31 | 4 2 5 8 6 1 3 7 32 | 4 2 7 3 6 8 1 5 33 | 4 2 7 3 6 8 5 1 34 | 4 2 7 5 1 8 6 3 35 | 4 2 8 5 7 1 3 6 36 | 4 2 8 6 1 3 5 7 37 | 4 6 1 5 2 8 3 7 38 | 4 6 8 2 7 1 3 5 39 | 4 6 8 3 1 7 5 2 40 | 4 7 1 8 5 2 6 3 41 | 4 7 3 8 2 5 1 6 42 | 4 7 5 2 6 1 3 8 43 | 4 7 5 3 1 6 8 2 44 | 4 8 1 3 6 2 7 5 45 | 4 8 1 5 7 2 6 3 46 | 4 8 5 3 1 7 2 6 47 | 5 1 4 6 8 2 7 3 48 | 5 1 8 4 2 7 3 6 49 | 5 1 8 6 3 7 2 4 50 | 5 2 4 6 8 3 1 7 51 | 5 2 4 7 3 8 6 1 52 | 5 2 6 1 7 4 8 3 53 | 5 2 8 1 4 7 3 6 54 | 5 3 1 6 8 2 4 7 55 | 5 3 1 7 2 8 6 4 56 | 5 3 8 4 7 1 6 2 57 | 5 7 1 3 8 6 4 2 58 | 5 7 1 4 2 8 6 3 59 | 5 7 2 4 8 1 3 6 60 | 5 7 2 6 3 1 4 8 61 | 5 7 2 6 3 1 8 4 62 | 5 7 4 1 3 8 6 2 63 | 5 8 4 1 3 6 2 7 64 | 5 8 4 1 7 2 6 3 65 | 6 1 5 2 8 3 7 4 66 | 6 2 7 1 3 5 8 4 67 | 6 2 7 1 4 8 5 3 68 | 6 3 1 7 5 8 2 4 69 | 6 3 1 8 4 2 7 5 70 | 6 3 1 8 5 2 4 7 71 | 6 3 5 7 1 4 2 8 72 | 6 3 5 8 1 4 2 7 73 | 6 3 7 2 4 8 1 5 74 | 6 3 7 2 8 5 1 4 75 | 6 3 7 4 1 8 2 5 76 | 6 4 1 5 8 2 7 3 77 | 6 4 2 8 5 7 1 3 78 | 6 4 7 1 3 5 2 8 79 | 6 4 7 1 8 2 5 3 80 | 6 8 2 4 1 7 5 3 81 | 7 1 3 8 6 4 2 5 82 | 7 2 4 1 8 5 3 6 83 | 7 2 6 3 1 4 8 5 84 | 7 3 1 6 8 5 2 4 85 | 7 3 8 2 5 1 6 4 86 | 7 4 2 5 8 1 3 6 87 | 7 4 2 8 6 1 3 5 88 | 7 5 3 1 6 8 2 4 89 | 8 2 4 1 7 5 3 6 90 | 8 2 5 3 1 7 4 6 91 | 8 3 1 6 2 5 7 4 92 | 8 4 1 3 6 2 7 5 93 | -------------------------------------------------------------------------------- /alpha/osf/tst/8q.2bk: -------------------------------------------------------------------------------- 1 | tst/8q.c:30: warning: missing return value 2 | tst/8q.c:39: warning: missing return value 3 | -------------------------------------------------------------------------------- /alpha/osf/tst/array.1bk: -------------------------------------------------------------------------------- 1 | 0 1 2 3 1000 1001 1002 1003 2000 2001 2002 2003 2 | 0 1 2 3 1000 1001 1002 1003 2000 2001 2002 2003 3 | 0 1 2 3 1000 1001 1002 1003 2000 2001 2002 2003 4 | 0 1 2 3 1000 1001 1002 1003 2000 2001 2002 2003 5 | -------------------------------------------------------------------------------- /alpha/osf/tst/array.2bk: -------------------------------------------------------------------------------- 1 | tst/array.c:33: warning: missing return value 2 | tst/array.c:48: warning: missing return value 3 | -------------------------------------------------------------------------------- /alpha/osf/tst/cf.1bk: -------------------------------------------------------------------------------- 1 | char freq 2 | 011 8.1 3 | 012 6.1 4 | 040 11.9 5 | ! 0.2 6 | " 1.5 7 | % 0.6 8 | & 0.4 9 | ' 0.4 10 | ( 2.9 11 | ) 2.9 12 | * 0.8 13 | + 1.3 14 | , 1.3 15 | - 0.4 16 | . 0.6 17 | / 1.0 18 | 0 2.5 19 | 1 1.9 20 | 2 0.6 21 | 3 0.2 22 | 7 0.4 23 | 8 0.2 24 | ; 3.8 25 | < 0.8 26 | = 2.7 27 | > 0.2 28 | [ 1.5 29 | \ 0.8 30 | ] 1.5 31 | a 3.1 32 | c 4.4 33 | e 2.3 34 | f 6.0 35 | g 1.3 36 | h 1.0 37 | i 5.0 38 | l 1.0 39 | m 0.2 40 | n 3.3 41 | o 2.1 42 | p 1.0 43 | q 0.4 44 | r 4.2 45 | s 0.6 46 | t 3.8 47 | u 1.2 48 | v 0.6 49 | w 0.2 50 | { 0.6 51 | } 0.6 52 | -------------------------------------------------------------------------------- /alpha/osf/tst/cf.2bk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drh/lcc/2b5cf358d9aa6759923dd7461f2df7f7f2a28471/alpha/osf/tst/cf.2bk -------------------------------------------------------------------------------- /alpha/osf/tst/cq.1bk: -------------------------------------------------------------------------------- 1 | Section s22 returned 0. 2 | s241,er4 3 | Section s241 returned 4. 4 | Section s243 returned 0. 5 | Section s244 returned 0. 6 | Section s25 returned 0. 7 | 8 bits in chars. 8 | 32 bits in ints. 9 | 16 bits in shorts. 10 | 64 bits in longs. 11 | 32 bits in unsigneds. 12 | 32 bits in floats. 13 | 64 bits in doubles. 14 | 1.192093e-07 is the least number that can be added to 1. (float). 15 | 2.220446e-16 is the least number that can be added to 1. (double). 16 | Section s26 returned 0. 17 | Section s4 returned 0. 18 | Section s61 returned 0. 19 | Section s626 returned 0. 20 | Section s71 returned 0. 21 | Section s72 returned 0. 22 | Section s757 returned 0. 23 | Section s7813 returned 0. 24 | Section s714 returned 0. 25 | Section s715 returned 0. 26 | Register count for char is unreliable. 27 | Register count for pointer is unreliable. 28 | Register count for int is unreliable. 29 | Section s81 returned 0. 30 | Section s84 returned 0. 31 | char alignment: 1 32 | short alignment: 2 33 | int alignment: 4 34 | long alignment: 8 35 | unsigned alignment: 4 36 | float alignment: 4 37 | double alignment: 8 38 | Sign extension in fields 39 | Be especially careful with 1-bit fields! 40 | Section s85 returned 0. 41 | Section s86 returned 0. 42 | Section s88 returned 0. 43 | Section s9 returned 0. 44 | 45 | Failed. 46 | -------------------------------------------------------------------------------- /alpha/osf/tst/cq.2bk: -------------------------------------------------------------------------------- 1 | tst/cq.c:533: warning: missing return value 2 | tst/cq.c:1169: warning: missing return value 3 | tst/cq.c:5294: warning: unreachable code 4 | tst/cq.c:5303: warning: missing return value 5 | -------------------------------------------------------------------------------- /alpha/osf/tst/cvt.1bk: -------------------------------------------------------------------------------- 1 | 1 1 1 1 1 1 1 1 1.000000 1.000000 1.000000 2 | 2 2 2 2 2 2 2 2 2.000000 2.000000 2.000000 3 | 3 3 3 3 3 3 3 3 3.000000 3.000000 3.000000 4 | 4 4 4 4 4 4 4 4 4.000000 4.000000 4.000000 5 | 5 5 5 5 5 5 5 5 5.000000 5.000000 5.000000 6 | 6 6 6 6 6 6 6 6 6.000000 6.000000 6.000000 7 | 7 7 7 7 7 7 7 7 7.000000 7.000000 7.000000 8 | 8 8 8 8 8 8 8 8 8.000000 8.000000 8.000000 9 | 9 9 9 9 9 9 9 9 9.000000 9.000000 9.000000 10 | 10 10 10 10 10 10 10 10 10.000000 10.000000 10.000000 11 | 11 11 11 11 11 11 11 11 11.000000 11.000000 11.000000 12 | -------------------------------------------------------------------------------- /alpha/osf/tst/cvt.2bk: -------------------------------------------------------------------------------- 1 | tst/cvt.c:32: warning: conversion from `pointer to void function(void)' to `pointer to void' is compiler dependent 2 | tst/cvt.c:33: warning: conversion from `pointer to void' to `pointer to void function(void)' is compiler dependent 3 | -------------------------------------------------------------------------------- /alpha/osf/tst/fields.1bk: -------------------------------------------------------------------------------- 1 | x = 1 2 3 4 -3 6 2 | y = 3 8 9 3 | x = 1 2 3 0 0 6 4 | y = 2 8 16 5 | p->a = 0x3, p->b = 0xf 6 | -------------------------------------------------------------------------------- /alpha/osf/tst/fields.2bk: -------------------------------------------------------------------------------- 1 | tst/fields.c:6: warning: initializer exceeds bit-field width 2 | tst/fields.c:8: warning: initializer exceeds bit-field width 3 | tst/fields.c:30: warning: missing return value 4 | tst/fields.c:34: warning: missing return value 5 | -------------------------------------------------------------------------------- /alpha/osf/tst/front.2bk: -------------------------------------------------------------------------------- 1 | tst/front.c:3: warning: missing return value 2 | tst/front.c:10: warning: missing return value 3 | tst/front.c:20: type error in argument 1 to `s'; found `pointer to struct D' expected `pointer to incomplete struct D defined at tst/front.c:14' 4 | tst/front.c:21: warning: missing return value 5 | tst/front.c:32: warning: missing return value 6 | tst/front.c:36: operands of = have illegal types `pointer to int' and `pointer to const int' 7 | tst/front.c:38: warning: missing return value 8 | tst/front.c:62: operands of = have illegal types `pointer to char' and `pointer to const void' 9 | tst/front.c:63: warning: missing return value 10 | tst/front.c:68: warning: missing return value 11 | tst/front.c:69: warning: inconsistent linkage for `yy' previously declared at tst/front.c:68 12 | tst/front.c:69: warning: missing return value 13 | tst/front.c:71: invalid storage class `static' for `int function goo' 14 | tst/front.c:71: warning: declaration of `goo' does not match previous declaration at tst/front.c:70 15 | tst/front.c:71: warning: missing return value 16 | tst/front.c:74: warning: declaration of `xr' does not match previous declaration at tst/front.c:72 17 | tst/front.c:74: warning: missing return value 18 | tst/front.c:81: warning: missing return value 19 | tst/front.c:82: warning: declaration of `ss2' does not match previous declaration at tst/front.c:81 20 | tst/front.c:84: warning: inconsistent linkage for `ss5' previously declared at tst/front.c:80 21 | tst/front.c:92: type error in argument 1 to `gx1'; found `pointer to double' expected `double' 22 | tst/front.c:92: warning: missing return value 23 | tst/front.c:95: redeclaration of `hx1' previously declared at tst/front.c:94 24 | tst/front.c:98: warning: missing return value 25 | tst/front.c:101: conflicting argument declarations for function `gg1' 26 | tst/front.c:101: warning: missing return value 27 | tst/front.c:112: type error in argument 4 to `qsort'; found `pointer to int function(pointer to pointer to char,pointer to pointer to char)' expected `pointer to int function(pointer to const void,pointer to const void)' 28 | tst/front.c:113: warning: missing return value 29 | tst/front.c:120: warning: missing return value 30 | -------------------------------------------------------------------------------- /alpha/osf/tst/incr.1bk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drh/lcc/2b5cf358d9aa6759923dd7461f2df7f7f2a28471/alpha/osf/tst/incr.1bk -------------------------------------------------------------------------------- /alpha/osf/tst/incr.2bk: -------------------------------------------------------------------------------- 1 | tst/incr.c:1: warning: missing return value 2 | tst/incr.c:6: warning: expression with no effect elided 3 | tst/incr.c:6: warning: expression with no effect elided 4 | tst/incr.c:11: warning: missing return value 5 | tst/incr.c:16: warning: expression with no effect elided 6 | tst/incr.c:16: warning: expression with no effect elided 7 | tst/incr.c:21: warning: missing return value 8 | tst/incr.c:30: warning: missing return value 9 | tst/incr.c:39: warning: missing return value 10 | -------------------------------------------------------------------------------- /alpha/osf/tst/init.1bk: -------------------------------------------------------------------------------- 1 | 1 2 3 4 2 | 5 6 3 | 7 4 | if 5 | for 6 | else 7 | while 8 | 1 2 3 if 9 | 4 5 0 for 10 | 6 7 8 else 11 | 9 10 11 while 12 | 1 2 3 if 13 | 4 5 0 for 14 | 6 7 8 else 15 | 9 10 11 while 16 | 0 0 0 17 | -------------------------------------------------------------------------------- /alpha/osf/tst/init.2bk: -------------------------------------------------------------------------------- 1 | tst/init.c:36: warning: missing return value 2 | tst/init.c:49: warning: missing return value 3 | tst/init.c:59: warning: missing return value 4 | -------------------------------------------------------------------------------- /alpha/osf/tst/limits.1bk: -------------------------------------------------------------------------------- 1 | UCHAR_MAX: 000000ff=255 2 | USHRT_MAX: 0000ffff=65535 3 | UINT_MAX: ffffffff=-1 4 | ULONG_MAX: ffffffffffffffff=-1 5 | CHAR_MAX: 0000007f=127 6 | SCHAR_MAX: 0000007f=127 7 | SHRT_MAX: 00007fff=32767 8 | INT_MAX: 7fffffff=2147483647 9 | LONG_MAX: 7fffffffffffffff=9223372036854775807 10 | CHAR_MIN: ffffff80=-128 11 | SCHAR_MIN: ffffff80=-128 12 | SHRT_MIN: ffff8000=-32768 13 | INT_MIN: 80000000=-2147483648 14 | LONG_MIN: 8000000000000000=-9223372036854775808 15 | -------------------------------------------------------------------------------- /alpha/osf/tst/limits.2bk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drh/lcc/2b5cf358d9aa6759923dd7461f2df7f7f2a28471/alpha/osf/tst/limits.2bk -------------------------------------------------------------------------------- /alpha/osf/tst/paranoia.2bk: -------------------------------------------------------------------------------- 1 | tst/paranoia.c:1867: warning: missing return value 2 | tst/paranoia.c:1874: warning: missing return value 3 | tst/paranoia.c:1884: warning: missing return value 4 | tst/paranoia.c:1924: warning: missing return value 5 | tst/paranoia.c:1939: warning: missing return value 6 | tst/paranoia.c:1956: warning: missing return value 7 | tst/paranoia.c:1975: warning: missing return value 8 | tst/paranoia.c:1988: warning: missing return value 9 | tst/paranoia.c:1995: warning: missing return value 10 | tst/paranoia.c:2055: warning: missing return value 11 | tst/paranoia.c:2062: warning: missing return value 12 | tst/paranoia.c:2070: warning: missing return value 13 | tst/paranoia.c:2087: warning: missing return value 14 | tst/paranoia.c:2115: warning: missing return value 15 | tst/paranoia.c:2144: warning: missing return value 16 | tst/paranoia.c:2173: warning: missing return value 17 | -------------------------------------------------------------------------------- /alpha/osf/tst/sort.1bk: -------------------------------------------------------------------------------- 1 | exchange(1,9) 2 | exchange(3,7) 3 | exchange(5,6) 4 | exchange(0,5) 5 | exchange(0,3) 6 | exchange(0,0) 7 | exchange(1,2) 8 | exchange(6,6) 9 | exchange(8,9) 10 | exchange(7,8) 11 | -51 12 | -1 13 | 0 14 | 1 15 | 3 16 | 10 17 | 18 18 | 32 19 | 567 20 | 789 21 | -------------------------------------------------------------------------------- /alpha/osf/tst/sort.2bk: -------------------------------------------------------------------------------- 1 | tst/sort.c:23: warning: missing return value 2 | tst/sort.c:30: warning: missing return value 3 | tst/sort.c:37: warning: missing return value 4 | tst/sort.c:41: warning: missing return value 5 | tst/sort.c:65: warning: missing return value 6 | -------------------------------------------------------------------------------- /alpha/osf/tst/spill.1bk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drh/lcc/2b5cf358d9aa6759923dd7461f2df7f7f2a28471/alpha/osf/tst/spill.1bk -------------------------------------------------------------------------------- /alpha/osf/tst/spill.2bk: -------------------------------------------------------------------------------- 1 | tst/spill.c:1: warning: missing return value 2 | tst/spill.c:3: warning: missing return value 3 | tst/spill.c:5: warning: missing return value 4 | tst/spill.c:7: warning: missing return value 5 | tst/spill.c:9: warning: missing return value 6 | tst/spill.c:17: warning: missing return value 7 | -------------------------------------------------------------------------------- /alpha/osf/tst/stdarg.1bk: -------------------------------------------------------------------------------- 1 | test 1 2 | test 2 3 | test 3 4 | test 4 5 | test 5.000000 6 | {1 2 3 4} {1 2 3 4} {1 2 3 4} {1 2 3 4} {1 2 3 4} {1 2 3 4} 7 | -------------------------------------------------------------------------------- /alpha/osf/tst/stdarg.2bk: -------------------------------------------------------------------------------- 1 | tst/stdarg.c:51: warning: missing return value 2 | -------------------------------------------------------------------------------- /alpha/osf/tst/struct.1bk: -------------------------------------------------------------------------------- 1 | (-1,-1) is not within [10,10; 310,310] 2 | (1,1) is not within [10,10; 310,310] 3 | (20,300) is within [10,10; 310,310] 4 | (500,400) is not within [10,10; 310,310] 5 | ab 6 | -------------------------------------------------------------------------------- /alpha/osf/tst/struct.2bk: -------------------------------------------------------------------------------- 1 | tst/struct.c:49: warning: missing return value 2 | tst/struct.c:68: warning: missing return value 3 | -------------------------------------------------------------------------------- /alpha/osf/tst/switch.1bk: -------------------------------------------------------------------------------- 1 | b = 0x8 2 | f = 0xc 3 | n = 0xa 4 | r = 0xd 5 | t = 0x9 6 | v = 0xb 7 | x = 0x78 8 | f: 9 | x = 0 10 | x = 1 11 | x = 2 12 | x = 2 13 | x = 2 14 | x = 2 15 | x = 2 16 | x = 7 17 | x = 8 18 | x = 9 19 | x = 9 20 | x = 9 21 | x = 9 22 | x = 9 23 | x = 9 24 | x = 9 25 | x = 16 26 | x = 17 27 | x = 18 28 | x = 19 29 | x = 20 30 | g: 31 | 1 1 32 | 1 2 33 | 2 3 34 | 2 4 35 | 2 5 36 | 3 6 37 | d 6 38 | 3 7 39 | d 7 40 | 3 8 41 | d 8 42 | d 9 43 | d 10 44 | h: 45 | i = 8 46 | i = 16 47 | i = 120 48 | i = 128 49 | i = 248 50 | i = 264 51 | i = 272 52 | i = 280 53 | i = 288 54 | i = 296 55 | i = 304 56 | i = 312 57 | 488 defaults 58 | x = 0x1000000 59 | x = 0x2000000 60 | x = 0x3000000 61 | x = 0x4000000 62 | x = 0x5000000 63 | x = 0x6000000 (default) 64 | x = 0x7000000 (default) 65 | 0 66 | 1 67 | 2 68 | 3 69 | 4 70 | 5 71 | 0 72 | 1 73 | 2 74 | 3 75 | 4 76 | 5 77 | -------------------------------------------------------------------------------- /alpha/osf/tst/switch.2bk: -------------------------------------------------------------------------------- 1 | tst/switch.c:55: warning: missing return value 2 | tst/switch.c:73: warning: missing return value 3 | tst/switch.c:97: warning: missing return value 4 | tst/switch.c:101: warning: overflow in converting constant expression from `int' to `unsigned int' 5 | tst/switch.c:102: warning: overflow in converting constant expression from `int' to `unsigned int' 6 | tst/switch.c:112: warning: missing return value 7 | tst/switch.c:137: warning: missing return value 8 | -------------------------------------------------------------------------------- /alpha/osf/tst/wf1.1bk: -------------------------------------------------------------------------------- 1 | 5 a 2 | 2 and 3 | 5 buf 4 | 16 c 5 | 8 char 6 | 1 compare 7 | 4 cond 8 | 5 count 9 | 1 d 10 | 1 die 11 | 3 else 12 | 1 entry 13 | 1 eof 14 | 4 err 15 | 1 error 16 | 1 exit 17 | 1 folded 18 | 1 for 19 | 1 free 20 | 1 frequencies 21 | 1 frequency 22 | 1 get 23 | 2 getchar 24 | 3 getword 25 | 14 if 26 | 2 in 27 | 1 index 28 | 1 input 29 | 1 install 30 | 8 int 31 | 1 into 32 | 1 is 33 | 4 isletter 34 | 1 it 35 | 1 itself 36 | 5 left 37 | 1 letter 38 | 7 lookup 39 | 1 main 40 | 2 malloc 41 | 1 message 42 | 2 n 43 | 1 necessary 44 | 12 next 45 | 9 node 46 | 4 of 47 | 1 on 48 | 1 or 49 | 1 otherwise 50 | 2 out 51 | 8 p 52 | 3 print 53 | 2 printf 54 | 16 return 55 | 5 right 56 | 4 root 57 | 25 s 58 | 2 storage 59 | 3 strcmp 60 | 1 strcpy 61 | 1 strlen 62 | 8 struct 63 | 1 structures 64 | 2 subtree 65 | 1 t 66 | 5 tprint 67 | 9 tree 68 | 1 uses 69 | 1 version 70 | 1 wf 71 | 3 while 72 | 21 word 73 | 9 words 74 | 2 z 75 | -------------------------------------------------------------------------------- /alpha/osf/tst/wf1.2bk: -------------------------------------------------------------------------------- 1 | tst/wf1.c:29: warning: missing return value 2 | tst/wf1.c:87: warning: missing return value 3 | -------------------------------------------------------------------------------- /alpha/osf/tst/yacc.1bk: -------------------------------------------------------------------------------- 1 | a 2 | b 3 | load 4 | negate 5 | push 5 6 | c 7 | load 8 | multiply 9 | add 10 | store 11 | -------------------------------------------------------------------------------- /alpha/osf/tst/yacc.2bk: -------------------------------------------------------------------------------- 1 | tst/yacc.c:345: warning: missing return value 2 | tst/yacc.c:349: warning: missing return value 3 | tst/yacc.c:360: warning: missing return value 4 | -------------------------------------------------------------------------------- /cpp/getopt.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #define EPR fprintf(stderr, 4 | #define ERR(str, chr) if(opterr){EPR "%s%c\n", str, chr);} 5 | int opterr = 1; 6 | int optind = 1; 7 | int optopt; 8 | char *optarg; 9 | 10 | int 11 | getopt (int argc, char *const argv[], const char *opts) 12 | { 13 | static int sp = 1; 14 | int c; 15 | char *cp; 16 | 17 | if (sp == 1) 18 | if (optind >= argc || 19 | argv[optind][0] != '-' || argv[optind][1] == '\0') 20 | return -1; 21 | else if (strcmp(argv[optind], "--") == 0) { 22 | optind++; 23 | return -1; 24 | } 25 | optopt = c = argv[optind][sp]; 26 | if (c == ':' || (cp=strchr(opts, c)) == 0) { 27 | ERR (": illegal option -- ", c); 28 | if (argv[optind][++sp] == '\0') { 29 | optind++; 30 | sp = 1; 31 | } 32 | return '?'; 33 | } 34 | if (*++cp == ':') { 35 | if (argv[optind][sp+1] != '\0') 36 | optarg = &argv[optind++][sp+1]; 37 | else if (++optind >= argc) { 38 | ERR (": option requires an argument -- ", c); 39 | sp = 1; 40 | return '?'; 41 | } else 42 | optarg = argv[optind++]; 43 | sp = 1; 44 | } else { 45 | if (argv[optind][++sp] == '\0') { 46 | sp = 1; 47 | optind++; 48 | } 49 | optarg = 0; 50 | } 51 | return c; 52 | } 53 | -------------------------------------------------------------------------------- /cpp/hideset.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include "cpp.h" 5 | 6 | /* 7 | * A hideset is a null-terminated array of Nlist pointers. 8 | * They are referred to by indices in the hidesets array. 9 | * Hideset 0 is empty. 10 | */ 11 | 12 | #define HSSIZ 32 13 | typedef Nlist **Hideset; 14 | Hideset *hidesets; 15 | int nhidesets = 0; 16 | int maxhidesets = 3; 17 | int inserths(Hideset, Hideset, Nlist *); 18 | 19 | /* 20 | * Test for membership in a hideset 21 | */ 22 | int 23 | checkhideset(int hs, Nlist *np) 24 | { 25 | Hideset hsp; 26 | 27 | if (hs>=nhidesets) 28 | abort(); 29 | for (hsp = hidesets[hs]; *hsp; hsp++) { 30 | if (*hsp == np) 31 | return 1; 32 | } 33 | return 0; 34 | } 35 | 36 | /* 37 | * Return the (possibly new) hideset obtained by adding np to hs. 38 | */ 39 | int 40 | newhideset(int hs, Nlist *np) 41 | { 42 | int i, len; 43 | Nlist *nhs[HSSIZ+3]; 44 | Hideset hs1, hs2; 45 | 46 | len = inserths(nhs, hidesets[hs], np); 47 | for (i=0; i=HSSIZ) 53 | return hs; 54 | if (nhidesets >= maxhidesets) { 55 | maxhidesets = 3*maxhidesets/2+1; 56 | hidesets = (Hideset *)realloc(hidesets, (sizeof (Hideset *))*maxhidesets); 57 | if (hidesets == NULL) 58 | error(FATAL, "Out of memory from realloc"); 59 | } 60 | hs1 = (Hideset)domalloc(len*sizeof *hs1); 61 | memmove(hs1, nhs, len*sizeof *hs1); 62 | hidesets[nhidesets] = hs1; 63 | return nhidesets++; 64 | } 65 | 66 | int 67 | inserths(Hideset dhs, Hideset shs, Nlist *np) 68 | { 69 | Hideset odhs = dhs; 70 | 71 | while (*shs && *shs < np) 72 | *dhs++ = *shs++; 73 | if (*shs != np) 74 | *dhs++ = np; 75 | do { 76 | *dhs++ = *shs; 77 | } while (*shs++); 78 | return dhs - odhs; 79 | } 80 | 81 | /* 82 | * Hideset union 83 | */ 84 | int 85 | unionhideset(int hs1, int hs2) 86 | { 87 | Hideset hp; 88 | 89 | for (hp = hidesets[hs2]; *hp; hp++) 90 | hs1 = newhideset(hs1, *hp); 91 | return hs1; 92 | } 93 | 94 | void 95 | iniths(void) 96 | { 97 | hidesets = (Hideset *)domalloc(maxhidesets*sizeof(Hideset *)); 98 | hidesets[0] = (Hideset)domalloc(sizeof *hidesets[0]); 99 | *hidesets[0] = NULL; 100 | nhidesets++; 101 | } 102 | 103 | void 104 | prhideset(int hs) 105 | { 106 | Hideset np; 107 | 108 | for (np = hidesets[hs]; *np; np++) { 109 | fprintf(stderr, (char*)(*np)->name, (*np)->len); 110 | fprintf(stderr, " "); 111 | } 112 | } 113 | -------------------------------------------------------------------------------- /cpp/nlist.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include "cpp.h" 5 | 6 | extern int getopt(int, char *const *, const char *); 7 | extern char *optarg; 8 | extern int optind; 9 | extern int verbose; 10 | extern int Cplusplus; 11 | Nlist *kwdefined; 12 | 13 | #define NLSIZE 128 14 | 15 | static Nlist *nlist[NLSIZE]; 16 | 17 | struct kwtab { 18 | char *kw; 19 | int val; 20 | int flag; 21 | } kwtab[] = { 22 | "if", KIF, ISKW, 23 | "ifdef", KIFDEF, ISKW, 24 | "ifndef", KIFNDEF, ISKW, 25 | "elif", KELIF, ISKW, 26 | "else", KELSE, ISKW, 27 | "endif", KENDIF, ISKW, 28 | "include", KINCLUDE, ISKW, 29 | "define", KDEFINE, ISKW, 30 | "undef", KUNDEF, ISKW, 31 | "line", KLINE, ISKW, 32 | "error", KERROR, ISKW, 33 | "pragma", KPRAGMA, ISKW, 34 | "eval", KEVAL, ISKW, 35 | "defined", KDEFINED, ISDEFINED+ISUNCHANGE, 36 | "ident", KPRAGMA, ISKW, /* treat like pragma (ignored) */ 37 | "__LINE__", KLINENO, ISMAC+ISUNCHANGE, 38 | "__FILE__", KFILE, ISMAC+ISUNCHANGE, 39 | "__DATE__", KDATE, ISMAC+ISUNCHANGE, 40 | "__TIME__", KTIME, ISMAC+ISUNCHANGE, 41 | "__STDC__", KSTDC, ISUNCHANGE, 42 | NULL 43 | }; 44 | 45 | unsigned long namebit[077+1]; 46 | Nlist *np; 47 | 48 | void 49 | setup_kwtab(void) 50 | { 51 | struct kwtab *kp; 52 | Nlist *np; 53 | Token t; 54 | static Token deftoken[1] = {{ NAME, 0, 0, 0, 7, (uchar*)"defined" }}; 55 | static Tokenrow deftr = { deftoken, deftoken, deftoken+1, 1 }; 56 | 57 | for (kp=kwtab; kp->kw; kp++) { 58 | t.t = (uchar*)kp->kw; 59 | t.len = strlen(kp->kw); 60 | np = lookup(&t, 1); 61 | np->flag = kp->flag; 62 | np->val = kp->val; 63 | if (np->val == KDEFINED) { 64 | kwdefined = np; 65 | np->val = NAME; 66 | np->vp = &deftr; 67 | np->ap = 0; 68 | } 69 | } 70 | } 71 | 72 | Nlist * 73 | lookup(Token *tp, int install) 74 | { 75 | unsigned int h; 76 | Nlist *np; 77 | uchar *cp, *cpe; 78 | 79 | h = 0; 80 | for (cp=tp->t, cpe=cp+tp->len; cpt==*np->name && tp->len==np->len 86 | && strncmp((char*)tp->t, (char*)np->name, tp->len)==0) 87 | return np; 88 | np = np->next; 89 | } 90 | if (install) { 91 | np = new(Nlist); 92 | np->vp = NULL; 93 | np->ap = NULL; 94 | np->flag = 0; 95 | np->val = 0; 96 | np->len = tp->len; 97 | np->name = newstring(tp->t, tp->len, 0); 98 | np->next = nlist[h]; 99 | nlist[h] = np; 100 | quickset(tp->t[0], tp->len>1? tp->t[1]:0); 101 | return np; 102 | } 103 | return NULL; 104 | } 105 | -------------------------------------------------------------------------------- /custom.mk: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /doc/bprint.1: -------------------------------------------------------------------------------- 1 | .\" $Id$ 2 | .TH BPRINT 1 "local \- $Date$" 3 | .SH NAME 4 | bprint \- expression profiler 5 | .SH SYNOPSIS 6 | .B bprint 7 | [ 8 | .I option ... 9 | ] 10 | [ 11 | .I file ... 12 | ] 13 | .SH DESCRIPTION 14 | .I bprint 15 | produces on the standard output a listing of the programs compiled by 16 | .I lcc 17 | with the 18 | .B \-b 19 | option. 20 | Executing an 21 | .B a.out 22 | so compiled appends profiling data to 23 | .BR prof.out . 24 | The first token of each expression in the listing is preceded 25 | by the number of times it was executed 26 | enclosed in angle brackets as determined from the data in 27 | .BR prof.out . 28 | .I bprint 29 | interprets the following options. 30 | .TP 31 | .B \-c 32 | Compress the 33 | .B prof.out 34 | file, which otherwise grows with every execution of 35 | .BR a.out . 36 | .TP 37 | .B \-b 38 | Print an annotated listing as described above. 39 | .TP 40 | .B \-n 41 | Include line numbers in the listing. 42 | .TP 43 | .B \-f 44 | Print only the number of invocations of each function. 45 | A second 46 | .B \-f 47 | summarizes call sites instead of callers. 48 | .TP 49 | .BI \-I \*Sdir 50 | specifies additional directories in which to seek 51 | files given in 52 | .B prof.out 53 | that do not begin with `/'. 54 | .PP 55 | If any file names are given, only the requested data for those files are printed 56 | in the order presented. 57 | If no options are given, 58 | .B \-b 59 | is assumed. 60 | .SH FILES 61 | .PP 62 | .ta \w'$LCCDIR/liblcc.{a,lib}XX'u 63 | .nf 64 | prof.out profiling data 65 | $LCCDIR/liblcc.{a,lib} \fIlcc\fP-specific library 66 | .SH "SEE ALSO" 67 | .IR lcc (1), 68 | .IR prof (1) 69 | .SH BUGS 70 | Macros and comments can confuse 71 | .I bprint 72 | because it uses post-expansion source coordinates 73 | to annotate pre-expansion source files. 74 | If 75 | .I bprint 76 | sees that it's about to print a statement count 77 | .I inside 78 | a number or identifier, it moves the count to just 79 | .I before 80 | the token. 81 | .PP 82 | Can't cope with an ill-formed 83 | .BR prof.out . 84 | -------------------------------------------------------------------------------- /etc/gcc-solaris.c: -------------------------------------------------------------------------------- 1 | /* SPARCs running Solaris 2.5.1 w/GCC tools 2 | at CS Dept., Princeton University */ 3 | 4 | #include 5 | 6 | static char rcsid[] = "$Id$"; 7 | 8 | #ifndef LCCDIR 9 | #define LCCDIR "/usr/local/lib/lcc/" 10 | #endif 11 | #ifndef GCCDIR 12 | #define GCCDIR "/usr/local/gnu/bin/" 13 | #endif 14 | #ifndef GCCLIB 15 | #define GCCLIB "/usr/local/gnu/lib/gcc-lib/sparc-sun-solaris2.5/2.7.2/" 16 | #endif 17 | 18 | char *suffixes[] = { ".c", ".i", ".s", ".o", ".out", 0 }; 19 | char inputs[256] = ""; 20 | char *cpp[] = { LCCDIR "cpp", 21 | "-D__STDC__=1", "-Dsparc", "-D__sparc__", "-Dsun", "-D__sun__", "-Dunix", 22 | "$1", "$2", "$3", 0 }; 23 | char *include[] = { "-I" LCCDIR "include", "-I/usr/local/include", 24 | "-I" GCCLIB "include", "-I/usr/include", 0 }; 25 | char *com[] = { LCCDIR "rcc", "-target=sparc/solaris", 26 | "$1", "$2", "$3", 0 }; 27 | char *as[] = { GCCDIR "as", "-f", "-o", "$3", "$1", "$2", 0 }; 28 | char *ld[] = { GCCDIR "ld", "-o", "$3", "$1", 29 | GCCLIB "crti.o", GCCLIB "crt1.o", 30 | GCCLIB "crtbegin.o", "$2", "", "", "-L" LCCDIR, "-llcc", 31 | "-L" GCCLIB, "-lgcc", "-lm", "-lc", "", 32 | GCCLIB "crtend.o", GCCLIB "crtn.o", 0 }; 33 | 34 | extern char *concat(char *, char *); 35 | 36 | int option(char *arg) { 37 | if (strncmp(arg, "-lccdir=", 8) == 0) { 38 | cpp[0] = concat(&arg[8], "/cpp"); 39 | include[0] = concat("-I", concat(&arg[8], "/include")); 40 | ld[10] = concat("-L", &arg[8]); 41 | com[0] = concat(&arg[8], "/rcc"); 42 | } else if (strcmp(arg, "-g") == 0) 43 | ; 44 | else if (strcmp(arg, "-pg") == 0) { 45 | ld[8] = GCCLIB "gmon.o"; 46 | } else if (strcmp(arg, "-b") == 0) 47 | ; 48 | else 49 | return 0; 50 | return 1; 51 | } 52 | -------------------------------------------------------------------------------- /etc/irix.c: -------------------------------------------------------------------------------- 1 | /* SGI big endian MIPSes running IRIX 6.2 at CS Dept., Princeton University */ 2 | 3 | #include 4 | 5 | static char rcsid[] = "$Id$"; 6 | 7 | #ifndef LCCDIR 8 | #define LCCDIR "/usr/local/lib/lcc/" 9 | #endif 10 | #ifndef LIBDIR 11 | #define LIBDIR "/usr/lib/" 12 | #endif 13 | 14 | char *suffixes[] = { ".c", ".i", ".s", ".o", ".out", 0 }; 15 | char inputs[256] = ""; 16 | char *cpp[] = { LCCDIR "cpp", "-D__STDC__=1", 17 | "-DLANGUAGE_C", 18 | "-DMIPSEB", 19 | "-DSYSTYPE_SVR4", 20 | "-D_LONGLONG", /* some SGI header files assume this */ 21 | "-D_CFE", 22 | "-D_LANGUAGE_C", 23 | "-D_MIPSEB", 24 | "-D_MIPS_FPSET=16", 25 | "-D_MIPS_ISA=_MIPS_ISA_MIPS1", 26 | "-D_MIPS_SIM=_MIPS_SIM_ABI32", 27 | "-D_MIPS_SZINT=32", 28 | "-D_MIPS_SZLONG=32", 29 | "-D_MIPS_SZPTR=32", 30 | "-D_SGI_SOURCE", 31 | "-D_SVR4_SOURCE", 32 | "-D_SYSTYPE_SVR4", 33 | "-D__host_mips", 34 | "-D__mips=1", 35 | "-D__sgi", 36 | "-D__unix", 37 | "-Dhost_mips", 38 | "-Dmips", 39 | "-Dsgi", 40 | "-Dunix", 41 | "$1", "$2", "$3", 0 }; 42 | char *com[] = { LCCDIR "rcc", "-target=mips/irix", "$1", "$2", "$3", "", 0 }; 43 | char *include[] = { "-I" LCCDIR "include", "-I/usr/local/include", 44 | "-I/usr/include", 0 }; 45 | char *as[] = { "/usr/bin/as", "-32", "-o", "$3", "$1", "-nocpp", "-KPIC", "$2", 0 }; 46 | char *ld[] = { "/usr/bin/ld", "-require_dynamic_link", "_rld_new_interface", "-32", 47 | "-elf", "-_SYSTYPE_SVR4", "-Wx,-G", "0", "-g0", "-KPIC", "-dont_warn_unused", 48 | "-o", "$3", LIBDIR "crt1.o", "-L/usr/local/lib", 49 | "$1", "$2", "", "-L" LCCDIR, "-llcc", "-lc", "-lm", LIBDIR "crtn.o", 0 50 | }; 51 | 52 | extern char *concat(char *, char *); 53 | 54 | int option(char *arg) { 55 | if (strncmp(arg, "-lccdir=", 8) == 0) { 56 | cpp[0] = concat(&arg[8], "/cpp"); 57 | include[0] = concat("-I", concat(&arg[8], "/include")); 58 | com[0] = concat(&arg[8], "/rcc"); 59 | ld[18] = concat("-L", &arg[8]); 60 | } else if (strcmp(arg, "-g") == 0) 61 | ; 62 | else if (strcmp(arg, "-p") == 0) 63 | ld[13] = LIBDIR "mcrt1.o"; 64 | else if (strcmp(arg, "-b") == 0) 65 | ; 66 | else 67 | return 0; 68 | return 1; 69 | } 70 | -------------------------------------------------------------------------------- /etc/linux.c: -------------------------------------------------------------------------------- 1 | /* x86s running Linux */ 2 | 3 | #include 4 | 5 | static char rcsid[] = "$Id$"; 6 | 7 | #ifndef LCCDIR 8 | #define LCCDIR "/usr/local/lib/lcc/" 9 | #endif 10 | 11 | char *suffixes[] = { ".c", ".i", ".s", ".o", ".out", 0 }; 12 | char inputs[256] = ""; 13 | char *cpp[] = { LCCDIR "gcc/cpp", 14 | "-U__GNUC__", "-D_POSIX_SOURCE", "-D__STDC__=1", "-D__STRICT_ANSI__", 15 | "-Dunix", "-Di386", "-Dlinux", 16 | "-D__unix__", "-D__i386__", "-D__linux__", "-D__signed__=signed", 17 | "$1", "$2", "$3", 0 }; 18 | char *include[] = {"-I" LCCDIR "include", "-I" LCCDIR "gcc/include", "-I/usr/include", 0 }; 19 | char *com[] = {LCCDIR "rcc", "-target=x86/linux", "$1", "$2", "$3", 0 }; 20 | char *as[] = { "/usr/bin/as", "-o", "$3", "$1", "$2", 0 }; 21 | char *ld[] = { 22 | /* 0 */ "/usr/bin/ld", "-m", "elf_i386", "-dynamic-linker", 23 | /* 4 */ "/lib/ld-linux.so.2", "-o", "$3", 24 | /* 7 */ "/usr/lib/crt1.o", "/usr/lib/crti.o", 25 | /* 9 */ LCCDIR "/gcc/crtbegin.o", 26 | "$1", "$2", 27 | /* 12 */ "-L" LCCDIR, 28 | /* 13 */ "-llcc", 29 | /* 14 */ "-L" LCCDIR "/gcc", "-lgcc", "-lc", "-lm", 30 | /* 18 */ "", 31 | /* 19 */ LCCDIR "/gcc/crtend.o", "/usr/lib/crtn.o", 32 | 0 }; 33 | 34 | extern char *concat(char *, char *); 35 | 36 | int option(char *arg) { 37 | if (strncmp(arg, "-lccdir=", 8) == 0) { 38 | if (strcmp(cpp[0], LCCDIR "gcc/cpp") == 0) 39 | cpp[0] = concat(&arg[8], "/gcc/cpp"); 40 | include[0] = concat("-I", concat(&arg[8], "/include")); 41 | include[1] = concat("-I", concat(&arg[8], "/gcc/include")); 42 | ld[9] = concat(&arg[8], "/gcc/crtbegin.o"); 43 | ld[12] = concat("-L", &arg[8]); 44 | ld[14] = concat("-L", concat(&arg[8], "/gcc")); 45 | ld[19] = concat(&arg[8], "/gcc/crtend.o"); 46 | com[0] = concat(&arg[8], "/rcc"); 47 | } else if (strcmp(arg, "-p") == 0 || strcmp(arg, "-pg") == 0) { 48 | ld[7] = "/usr/lib/gcrt1.o"; 49 | ld[18] = "-lgmon"; 50 | } else if (strcmp(arg, "-b") == 0) 51 | ; 52 | else if (strcmp(arg, "-g") == 0) 53 | ; 54 | else if (strncmp(arg, "-ld=", 4) == 0) 55 | ld[0] = &arg[4]; 56 | else if (strcmp(arg, "-static") == 0) { 57 | ld[3] = "-static"; 58 | ld[4] = ""; 59 | } else 60 | return 0; 61 | return 1; 62 | } 63 | -------------------------------------------------------------------------------- /etc/ops.c: -------------------------------------------------------------------------------- 1 | #include "c.h" 2 | 3 | /* ops [ {csilhfdxp}=n ]... 4 | * prints lcc dag operator set for a given set of type sizes. 5 | */ 6 | 7 | static char rcsid[] = "$Id$"; 8 | 9 | static char list[] = { 'c', 's', 'i', 'l', 'h', 'f', 'd', 'x', 'p', 0 }; 10 | static int sizes[] = { 1, 2, 4, 4, 8, 4, 8, 16, 8 }; 11 | 12 | static int doop(int op, int type, const char *sz, const char *opname) { 13 | int count = 0; 14 | static int last; 15 | 16 | if (op == LOAD) 17 | return 0; 18 | if (last != 0 && last != op) 19 | printf("\n"); 20 | last = op; 21 | if (type == B || type == V) { 22 | printf(" %s=%d", opname, op + type); 23 | count++; 24 | } else { 25 | int i, done = 0; 26 | const char *s; 27 | for (i = 0; sz[i] != '\0' && (s = strchr(list, sz[i])) != NULL; i++) { 28 | int n = sizes[s-list]; 29 | if ((done&(1< 0 && (s = strchr(list, c)) != NULL) 48 | sizes[s-list] = n; 49 | else { 50 | fprintf(stderr, "usage: %s [ {csilhfdxp}=n ]...\n", argv[0]); 51 | exit(EXIT_FAILURE); 52 | } 53 | } 54 | #define gop(x,n) 55 | #define op(x,t,s) count += doop(x,t,#s,#x #t); 56 | #include "ops.h" 57 | #undef gop 58 | #undef op 59 | fprintf(stderr, "%d operators\n", count); 60 | return EXIT_SUCCESS; 61 | } 62 | -------------------------------------------------------------------------------- /etc/osf.c: -------------------------------------------------------------------------------- 1 | /* DEC ALPHAs running OSF/1 V3.2A (Rev. 17) at Princeton University */ 2 | 3 | #include 4 | 5 | static char rcsid[] = "$Id$"; 6 | 7 | #ifndef LCCDIR 8 | #define LCCDIR "/usr/local/lib/lcc/" 9 | #endif 10 | 11 | char *suffixes[] = { ".c", ".i", ".s", ".o", ".out", 0 }; 12 | char inputs[256] = ""; 13 | char *cpp[] = { 14 | LCCDIR "cpp", "-D__STDC__=1", 15 | "-DLANGUAGE_C", "-D__LANGUAGE_C__", 16 | "-D_unix", "-D__unix__", "-D_osf", "-D__osf__", "-Dunix", 17 | "-Dalpha", "-D_alpha", "-D__alpha", 18 | "-D__SYSTYPE_BSD", "-D_SYSTYPE_BSD", 19 | "$1", "$2", "$3", 0 }; 20 | char *com[] = { LCCDIR "rcc", "-target=alpha/osf", "$1", "$2", "$3", "", 0 }; 21 | char *include[] = { "-I" LCCDIR "include", "-I/usr/local/include", 22 | "-I/usr/include", 0 }; 23 | char *as[] = { "/bin/as", "-o", "$3", "", "$1", "-nocpp", "$2", 0 }; 24 | char *ld[] = { "/usr/bin/ld", "-o", "$3", "/usr/lib/cmplrs/cc/crt0.o", 25 | "$1", "$2", "", "", "-L" LCCDIR, "-llcc", "-lm", "-lc", 0 }; 26 | 27 | extern char *concat(char *, char *); 28 | extern int access(const char *, int); 29 | 30 | int option(char *arg) { 31 | if (strncmp(arg, "-lccdir=", 8) == 0) { 32 | cpp[0] = concat(&arg[8], "/cpp"); 33 | include[0] = concat("-I", concat(&arg[8], "/include")); 34 | com[0] = concat(&arg[8], "/rcc"); 35 | ld[8] = concat("-L", &arg[8]); 36 | } else if (strcmp(arg, "-g4") == 0 37 | && access("/u/drh/lib/alpha/rcc", 4) == 0 38 | && access("/u/drh/book/cdb/alpha/osf/cdbld", 4) == 0) { 39 | com[0] = "/u/drh/lib/alpha/rcc"; 40 | com[5] = "-g4"; 41 | ld[0] = "/u/drh/book/cdb/alpha/osf/cdbld"; 42 | ld[1] = "-o"; 43 | ld[2] = "$3"; 44 | ld[3] = "$1"; 45 | ld[4] = "$2"; 46 | ld[5] = 0; 47 | } else if (strcmp(arg, "-g") == 0) 48 | return 1; 49 | else if (strcmp(arg, "-b") == 0) 50 | ; 51 | else 52 | return 0; 53 | return 1; 54 | } 55 | -------------------------------------------------------------------------------- /etc/solaris.c: -------------------------------------------------------------------------------- 1 | /* SPARCs running Solaris 2.5.1 at CS Dept., Princeton University */ 2 | 3 | #include 4 | 5 | static char rcsid[] = "$Id$"; 6 | 7 | #ifndef LCCDIR 8 | #define LCCDIR "/usr/local/lib/lcc/" 9 | #endif 10 | #ifndef SUNDIR 11 | #define SUNDIR "/opt/SUNWspro/SC4.2/lib/" 12 | #endif 13 | 14 | char *suffixes[] = { ".c", ".i", ".s", ".o", ".out", 0 }; 15 | char inputs[256] = ""; 16 | char *cpp[] = { LCCDIR "cpp", 17 | "-D__STDC__=1", "-Dsparc", "-D__sparc__", "-Dsun", "-D__sun__", "-Dunix", 18 | "$1", "$2", "$3", 0 }; 19 | char *include[] = { "-I" LCCDIR "include", "-I/usr/local/include", 20 | "-I/usr/include", 0 }; 21 | char *com[] = { LCCDIR "rcc", "-target=sparc/solaris", 22 | "$1", "$2", "$3", 0 }; 23 | char *as[] = { "/usr/ccs/bin/as", "-Qy", "-s", "-o", "$3", "$1", "$2", 0 }; 24 | char *ld[] = { "/usr/ccs/bin/ld", "-o", "$3", "$1", 25 | SUNDIR "crti.o", SUNDIR "crt1.o", 26 | SUNDIR "values-xa.o", "$2", "", 27 | "-Y", "P," SUNDIR ":/usr/ccs/lib:/usr/lib", "-Qy", 28 | "-L" LCCDIR, "-llcc", "-lm", "-lc", SUNDIR "crtn.o", 0 }; 29 | 30 | extern char *concat(char *, char *); 31 | 32 | int option(char *arg) { 33 | if (strncmp(arg, "-lccdir=", 8) == 0) { 34 | cpp[0] = concat(&arg[8], "/cpp"); 35 | include[0] = concat("-I", concat(&arg[8], "/include")); 36 | ld[12] = concat("-L", &arg[8]); 37 | com[0] = concat(&arg[8], "/rcc"); 38 | } else if (strcmp(arg, "-g") == 0) 39 | ; 40 | else if (strcmp(arg, "-p") == 0) { 41 | ld[5] = SUNDIR "mcrt1.o"; 42 | ld[10] = "P," SUNDIR "libp:/usr/ccs/lib/libp:/usr/lib/libp:" 43 | SUNDIR ":/usr/ccs/lib:/usr/lib"; 44 | } else if (strcmp(arg, "-b") == 0) 45 | ; 46 | else if (strncmp(arg, "-ld=", 4) == 0) 47 | ld[0] = &arg[4]; 48 | else 49 | return 0; 50 | return 1; 51 | } 52 | -------------------------------------------------------------------------------- /etc/win32.c: -------------------------------------------------------------------------------- 1 | /* x86s running MS Windows NT 4.0 */ 2 | 3 | #include 4 | 5 | static char rcsid[] = "$Id$"; 6 | 7 | #ifndef LCCDIR 8 | #define LCCDIR "\\progra~1\\lcc\\4.1\\bin\\" 9 | #endif 10 | 11 | char *suffixes[] = { ".c;.C", ".i;.I", ".asm;.ASM;.s;.S", ".obj;.OBJ", ".exe", 0 }; 12 | char inputs[256] = ""; 13 | char *cpp[] = { LCCDIR "cpp", "-D__STDC__=1", "-Dwin32", "-D_WIN32", "-D_M_IX86", 14 | "$1", "$2", "$3", 0 }; 15 | char *include[] = { "-I" LCCDIR "include", 0 }; 16 | char *com[] = { LCCDIR "rcc", "-target=x86/win32", "$1", "$2", "$3", 0 }; 17 | char *as[] = { "ml", "-nologo", "-c", "-Cp", "-coff", "-Fo$3", "$1", "$2", 0 }; 18 | char *ld[] = { "link", "-nologo", 19 | "", "-subsystem:console", "-entry:mainCRTStartup", 20 | "$2", "-OUT:$3", "$1", LCCDIR "liblcc.lib", "oldnames.lib", "libc.lib", "kernel32.lib", 0 }; 21 | 22 | extern char *concat(char *, char *); 23 | extern char *replace(const char *, int, int); 24 | 25 | int option(char *arg) { 26 | if (strncmp(arg, "-lccdir=", 8) == 0) { 27 | arg = replace(arg + 8, '/', '\\'); 28 | if (arg[strlen(arg)-1] == '\\') 29 | arg[strlen(arg)-1] = '\0'; 30 | cpp[0] = concat(arg, "\\cpp.exe"); 31 | include[0] = concat("-I", concat(arg, "\\include")); 32 | com[0] = concat(arg, "\\rcc.exe"); 33 | ld[8] = concat(arg, "\\liblcc.lib"); 34 | } else if (strcmp(arg, "-b") == 0) 35 | ; 36 | else if (strncmp(arg, "-ld=", 4) == 0) 37 | ld[0] = &arg[4]; 38 | else 39 | return 0; 40 | return 1; 41 | } 42 | -------------------------------------------------------------------------------- /include/alpha/osf/assert.h: -------------------------------------------------------------------------------- 1 | #ifndef __ASSERT 2 | #define __ASSERT 3 | 4 | void assert(int); 5 | 6 | #endif /* __ASSERT */ 7 | 8 | #undef assert 9 | #ifdef NDEBUG 10 | #define assert(ignore) ((void)0) 11 | #else 12 | extern void __assert(char *, char *, unsigned); 13 | #define assert(e) ((void)((e)||(__assert(#e, __FILE__, __LINE__),0))) 14 | #endif /* NDEBUG */ 15 | -------------------------------------------------------------------------------- /include/alpha/osf/ctype.h: -------------------------------------------------------------------------------- 1 | #ifndef __CTYPE 2 | #define __CTYPE 3 | 4 | extern int isalnum(int); 5 | extern int isalpha(int); 6 | extern int iscntrl(int); 7 | extern int isdigit(int); 8 | extern int isgraph(int); 9 | extern int islower(int); 10 | extern int isprint(int); 11 | extern int ispunct(int); 12 | extern int isspace(int); 13 | extern int isupper(int); 14 | extern int isxdigit(int); 15 | extern int tolower(int); 16 | extern int toupper(int); 17 | 18 | #define __U 01 19 | #define __L 02 20 | #define __N 04 21 | #define __S 010 22 | #define __P 020 23 | #define __C 040 24 | 25 | #endif /* __CTYPE */ 26 | -------------------------------------------------------------------------------- /include/alpha/osf/errno.h: -------------------------------------------------------------------------------- 1 | #ifndef __ERRNO 2 | #define __ERRNO 3 | 4 | #define EDOM 33 5 | #define ERANGE 34 6 | extern int errno; 7 | 8 | #endif /* __ERRNO */ 9 | -------------------------------------------------------------------------------- /include/alpha/osf/float.h: -------------------------------------------------------------------------------- 1 | #ifndef __FLOAT 2 | #define __FLOAT 3 | 4 | #define FLT_ROUNDS 1 5 | #define FLT_RADIX 2 6 | 7 | #define FLT_DIG 6 8 | #define FLT_EPSILON 1.19209289550781250000e-07 9 | #define FLT_MANT_DIG 24 10 | #define FLT_MAX 3.40282346638528860000e+38 11 | #define FLT_MAX_10_EXP 38 12 | #define FLT_MAX_EXP 128 13 | #define FLT_MIN 1.17549435082228750000e-38 14 | #define FLT_MIN_10_EXP -37 15 | #define FLT_MIN_EXP -125 16 | 17 | #define DBL_DIG 15 18 | #define DBL_EPSILON 2.22044604925031310000e-16 19 | #define DBL_MANT_DIG 53 20 | #define DBL_MAX 1.79769313486231570000e+308 21 | #define DBL_MAX_10_EXP 308 22 | #define DBL_MAX_EXP 1024 23 | #define DBL_MIN 2.22507385850720140000e-308 24 | #define DBL_MIN_10_EXP -307 25 | #define DBL_MIN_EXP -1021 26 | 27 | #define LDBL_MANT_DIG DBL_MANT_DIG 28 | #define LDBL_EPSILON DBL_EPSILON 29 | #define LDBL_DIG DBL_DIG 30 | #define LDBL_MIN_EXP DBL_MIN_EXP 31 | #define LDBL_MIN DBL_MIN 32 | #define LDBL_MIN_10_EXP DBL_MIN_10_EXP 33 | #define LDBL_MAX_EXP DBL_MAX_EXP 34 | #define LDBL_MAX DBL_MAX 35 | #define LDBL_MAX_10_EXP DBL_MAX_10_EXP 36 | 37 | #endif /* __FLOAT */ 38 | -------------------------------------------------------------------------------- /include/alpha/osf/limits.h: -------------------------------------------------------------------------------- 1 | #ifndef __LIMITS 2 | #define __LIMITS 3 | 4 | #define CHAR_BIT 8 5 | #define MB_LEN_MAX 1 6 | 7 | #define UCHAR_MAX 0xff 8 | #define USHRT_MAX 0xffff 9 | #define UINT_MAX (~0U) 10 | #define ULONG_MAX (~0UL) 11 | 12 | #define SCHAR_MAX 0x7f 13 | #define SHRT_MAX 0x7fff 14 | #define INT_MAX 0x7fffffff 15 | #define LONG_MAX 0x7fffffffffffffffL 16 | 17 | #define SCHAR_MIN (-SCHAR_MAX-1) 18 | #define SHRT_MIN (-SHRT_MAX-1) 19 | #define INT_MIN (-INT_MAX-1) 20 | #define LONG_MIN (-LONG_MAX-1) 21 | 22 | #ifdef __CHAR_UNSIGNED__ 23 | #define CHAR_MAX UCHAR_MAX 24 | #define CHAR_MIN 0 25 | #else 26 | #define CHAR_MAX SCHAR_MAX 27 | #define CHAR_MIN SCHAR_MIN 28 | #endif 29 | 30 | #endif /* __LIMITS */ 31 | -------------------------------------------------------------------------------- /include/alpha/osf/locale.h: -------------------------------------------------------------------------------- 1 | #ifndef __LOCALE 2 | #define __LOCALE 3 | 4 | #define LC_ALL 0 5 | #define LC_COLLATE 1 6 | #define LC_CTYPE 2 7 | #define LC_MONETARY 3 8 | #define LC_NUMERIC 4 9 | #define LC_TIME 5 10 | #ifndef NULL 11 | #define NULL ((void*)0) 12 | #endif 13 | 14 | struct lconv { 15 | char *decimal_point; 16 | char *thousands_sep; 17 | char *grouping; 18 | char *int_curr_symbol; 19 | char *currency_symbol; 20 | char *mon_decimal_point; 21 | char *mon_thousands_sep; 22 | char *mon_grouping; 23 | char *positive_sign; 24 | char *negative_sign; 25 | char int_frac_digits; 26 | char frac_digits; 27 | char p_cs_precedes; 28 | char p_sep_by_space; 29 | char n_cs_precedes; 30 | char n_sep_by_space; 31 | char p_sign_posn; 32 | char n_sign_posn; 33 | }; 34 | 35 | char *setlocale(int, const char *); 36 | struct lconv *localeconv(void); 37 | 38 | #endif /* __LOCALE */ 39 | -------------------------------------------------------------------------------- /include/alpha/osf/math.h: -------------------------------------------------------------------------------- 1 | #ifndef __MATH 2 | #define __MATH 3 | 4 | #define HUGE_VAL 1.79769313486231570000e+308 5 | 6 | extern double acos(double); 7 | extern double asin(double); 8 | extern double atan(double); 9 | extern double atan2(double, double); 10 | extern double cos(double); 11 | extern double sin(double); 12 | extern double tan(double); 13 | extern double cosh(double); 14 | extern double sinh(double); 15 | extern double tanh(double); 16 | extern double exp(double); 17 | extern double frexp(double, int *); 18 | extern double ldexp(double, int); 19 | extern double log(double); 20 | extern double log10(double); 21 | extern double modf(double, double *); 22 | extern double pow(double, double); 23 | extern double sqrt(double); 24 | extern double ceil(double); 25 | extern double fabs(double); 26 | extern double floor(double); 27 | extern double fmod(double, double); 28 | 29 | #endif /* __MATH */ 30 | -------------------------------------------------------------------------------- /include/alpha/osf/setjmp.h: -------------------------------------------------------------------------------- 1 | #ifndef __SETJMP 2 | #define __SETJMP 3 | 4 | 5 | 6 | 7 | typedef int jmp_buf[35+1+48]; 8 | int setjmp(jmp_buf); 9 | void longjmp(jmp_buf, int); 10 | 11 | #endif /* __SETJMP */ 12 | -------------------------------------------------------------------------------- /include/alpha/osf/signal.h: -------------------------------------------------------------------------------- 1 | #ifndef __SIGNAL 2 | #define __SIGNAL 3 | 4 | typedef int sig_atomic_t; 5 | 6 | #define SIG_DFL ((void (*)(int))0) 7 | #define SIG_ERR ((void (*)(int))-1) 8 | #define SIG_IGN ((void (*)(int))1) 9 | 10 | #define SIGABRT 6 11 | #define SIGFPE 8 12 | #define SIGILL 4 13 | #define SIGINT 2 14 | #define SIGSEGV 11 15 | #define SIGTERM 15 16 | 17 | void (*signal(int, void (*)(int)))(int); 18 | int raise(int); 19 | 20 | #endif /* __SIGNAL */ 21 | -------------------------------------------------------------------------------- /include/alpha/osf/stdarg.h: -------------------------------------------------------------------------------- 1 | #ifndef __STDARG 2 | #define __STDARG 3 | 4 | #if !defined(_VA_LIST) && !defined(__VA_LIST_DEFINED) 5 | #define _VA_LIST 6 | #define _VA_LIST_DEFINED 7 | typedef struct { 8 | char *_a0; /* pointer to first homed integer arg */ 9 | int _offset; /* byte offset of next param */ 10 | float _tmp; 11 | } __va_list; 12 | #endif 13 | static float __va_arg_tmp; 14 | typedef __va_list va_list; 15 | 16 | #define va_start(list, start) ((void)( \ 17 | (list)._a0 = (__typecode(__firstarg)==1 ? \ 18 | (char*)&__firstarg+48 : (char *)&__firstarg), \ 19 | (list)._offset = (__typecode(start)==1 ? \ 20 | (char*)&start+56 : (char *)&start+8)-(list)._a0)) 21 | #define va_arg(list, mode) (*(mode *)( \ 22 | (list)._offset += (int)((sizeof(mode)+7)&~7), \ 23 | (__typecode(mode)==1 && sizeof(mode)==4) ? \ 24 | ((list)._tmp = (float)*(double *)((list)._a0 + (list)._offset - \ 25 | ((list)._offset <= 48 ? 56 : 8))), (char *)&(list)._tmp : \ 26 | (__typecode(mode)==1 && (list)._offset <= 48) ? \ 27 | (list)._a0 + (list)._offset - 56 : \ 28 | (list)._a0 + (list)._offset - (int)((sizeof(mode)+7)&~7))) 29 | #define va_end(list) ((void)0) 30 | #endif 31 | -------------------------------------------------------------------------------- /include/alpha/osf/stddef.h: -------------------------------------------------------------------------------- 1 | #ifndef __STDDEF 2 | #define __STDDEF 3 | 4 | /* $Id$ */ 5 | 6 | #ifndef NULL 7 | #define NULL ((void*)0) 8 | #endif 9 | #define offsetof(ty,mem) ((size_t)((char*)&((ty*)0)->mem - (char*)0)) 10 | 11 | typedef long ptrdiff_t; 12 | 13 | #if !defined(_SIZE_T) && !defined(_SIZE_T_) && !defined(_SIZE_T_DEFINED) 14 | #define _SIZE_T 15 | #define _SIZE_T_ 16 | #define _SIZE_T_DEFINED 17 | typedef unsigned long size_t; 18 | #endif 19 | 20 | #if !defined(_WCHAR_T) && !defined(_WCHAR_T_) && !defined(_WCHAR_T_DEFINED) 21 | #define _WCHAR_T 22 | #define _WCHAR_T_ 23 | #define _WCHAR_T_DEFINED 24 | #if (_WCHAR_T_SIZE + 0) == 1 25 | typedef unsigned char wchar_t; 26 | #elif (_WCHAR_T_SIZE + 0) == 2 27 | typedef unsigned short wchar_t; 28 | #elif (_WCHAR_T_SIZE + 0) == 4 29 | typedef unsigned int wchar_t; 30 | #else 31 | typedef unsigned short wchar_t; 32 | #endif 33 | #endif 34 | 35 | #endif /* __STDDEF */ 36 | -------------------------------------------------------------------------------- /include/alpha/osf/stdlib.h: -------------------------------------------------------------------------------- 1 | #ifndef __STDLIB 2 | #define __STDLIB 3 | 4 | #define EXIT_FAILURE 1 5 | #define EXIT_SUCCESS 0 6 | #define MB_CUR_MAX 1 7 | #ifndef NULL 8 | #define NULL ((void*)0) 9 | #endif 10 | #define RAND_MAX 32767 11 | 12 | typedef struct { int quot, rem; } div_t; 13 | typedef struct { long quot, rem; } ldiv_t; 14 | 15 | #if !defined(_SIZE_T) && !defined(_SIZE_T_) && !defined(_SIZE_T_DEFINED) 16 | #define _SIZE_T 17 | #define _SIZE_T_ 18 | #define _SIZE_T_DEFINED 19 | typedef unsigned long size_t; 20 | #endif 21 | 22 | #if !defined(_WCHAR_T) && !defined(_WCHAR_T_) && !defined(_WCHAR_T_DEFINED) 23 | #define _WCHAR_T 24 | #define _WCHAR_T_ 25 | #define _WCHAR_T_DEFINED 26 | #if (_WCHAR_T_SIZE + 0) == 1 27 | typedef unsigned char wchar_t; 28 | #elif (_WCHAR_T_SIZE + 0) == 2 29 | typedef unsigned short wchar_t; 30 | #elif (_WCHAR_T_SIZE + 0) == 4 31 | typedef unsigned int wchar_t; 32 | #else 33 | typedef unsigned short wchar_t; 34 | #endif 35 | #endif 36 | 37 | extern double atof(const char *); 38 | extern int atoi(const char *); 39 | extern long int atol(const char *); 40 | extern double strtod(const char *, char **); 41 | extern long int strtol(const char *, char **, int); 42 | extern unsigned long int strtoul(const char *, char **, int); 43 | extern int rand(void); 44 | extern void srand(unsigned int); 45 | extern void *calloc(size_t, size_t); 46 | extern void free(void *); 47 | extern void *malloc(size_t); 48 | extern void *realloc(void *, size_t); 49 | extern void abort(void); 50 | extern int atexit(void (*)(void)); 51 | extern void exit(int); 52 | extern char *getenv(const char *); 53 | extern int system(const char *); 54 | extern void *bsearch(const void *, const void *, size_t, size_t, int (*)(const void *, const void *)); 55 | extern void qsort(void *, size_t, size_t, int (*)(const void *, const void *)); 56 | extern int abs(int); 57 | extern div_t div(int, int); 58 | extern long int labs(long int); 59 | extern ldiv_t ldiv(long int, long int); 60 | extern int mblen(const char *, size_t); 61 | extern int mbtowc(wchar_t *, const char *, size_t); 62 | extern int wctomb(char *, wchar_t); 63 | extern size_t mbstowcs(wchar_t *, const char *, size_t); 64 | extern size_t wcstombs(char *, const wchar_t *, size_t); 65 | 66 | #endif /* __STDLIB */ 67 | -------------------------------------------------------------------------------- /include/alpha/osf/string.h: -------------------------------------------------------------------------------- 1 | #ifndef __STRING 2 | #define __STRING 3 | 4 | #ifndef NULL 5 | #define NULL ((void*)0) 6 | #endif 7 | 8 | #if !defined(_SIZE_T) && !defined(_SIZE_T_) && !defined(_SIZE_T_DEFINED) 9 | #define _SIZE_T 10 | #define _SIZE_T_ 11 | #define _SIZE_T_DEFINED 12 | typedef unsigned long size_t; 13 | #endif 14 | 15 | void *memcpy(void *, const void *, size_t); 16 | void *memmove(void *, const void *, size_t); 17 | char *strcpy(char *, const char *); 18 | char *strncpy(char *, const char *, size_t); 19 | char *strcat(char *, const char *); 20 | char *strncat(char *, const char *, size_t); 21 | int memcmp(const void *, const void *, size_t); 22 | int strcmp(const char *, const char *); 23 | int strcoll(const char *, const char *); 24 | int strncmp(const char *, const char *, size_t); 25 | size_t strxfrm(char *, const char *, size_t); 26 | void *memchr(const void *, int, size_t); 27 | char *strchr(const char *, int); 28 | size_t strcspn(const char *, const char *); 29 | char *strpbrk(const char *, const char *); 30 | char *strrchr(const char *, int); 31 | size_t strspn(const char *, const char *); 32 | char *strstr(const char *, const char *); 33 | char *strtok(char *, const char *); 34 | void *memset(void *, int, size_t); 35 | char *strerror(int); 36 | size_t strlen(const char *); 37 | 38 | #endif /* __STRING */ 39 | -------------------------------------------------------------------------------- /include/alpha/osf/time.h: -------------------------------------------------------------------------------- 1 | #ifndef __TIME 2 | #define __TIME 3 | 4 | #define CLOCKS_PER_SEC 1000000 5 | #ifndef NULL 6 | #define NULL ((void*)0) 7 | #endif 8 | 9 | #if !defined(_CLOCK_T) && !defined(_CLOCK_T_) && !defined(_CLOCK_T_DEFINED) 10 | #define _CLOCK_T 11 | #define _CLOCK_T_ 12 | #define _CLOCK_T_DEFINED 13 | typedef long clock_t; 14 | #endif 15 | 16 | #if !defined(_TIME_T) && !defined(_TIME_T_) && !defined(_TIME_T_DEFINED) 17 | #define _TIME_T 18 | #define _TIME_T_ 19 | #define _TIME_T_DEFINED 20 | typedef long time_t; 21 | #endif 22 | 23 | #if !defined(_SIZE_T) && !defined(_SIZE_T_) && !defined(_SIZE_T_DEFINED) 24 | #define _SIZE_T 25 | #define _SIZE_T_ 26 | #define _SIZE_T_DEFINED 27 | typedef unsigned long size_t; 28 | #endif 29 | 30 | struct tm { 31 | int tm_sec; 32 | int tm_min; 33 | int tm_hour; 34 | int tm_mday; 35 | int tm_mon; 36 | int tm_year; 37 | int tm_wday; 38 | int tm_yday; 39 | int tm_isdst; 40 | long __tm_gmtoff; 41 | char *__tm_zone; 42 | }; 43 | extern clock_t clock(void); 44 | extern double difftime(time_t, time_t); 45 | extern time_t mktime(struct tm *); 46 | extern time_t time(time_t *); 47 | extern char *asctime(const struct tm *); 48 | extern char *ctime(const time_t *); 49 | extern struct tm *gmtime(const time_t *); 50 | extern struct tm *localtime(const time_t *); 51 | extern size_t strftime(char *, size_t, const char *, const struct tm *); 52 | 53 | #endif /* __TIME */ 54 | -------------------------------------------------------------------------------- /include/mips/irix/assert.h: -------------------------------------------------------------------------------- 1 | #ifndef __ASSERT 2 | #define __ASSERT 3 | 4 | void assert(int); 5 | 6 | #endif /* __ASSERT */ 7 | 8 | #undef assert 9 | #ifdef NDEBUG 10 | #define assert(ignore) ((void)0) 11 | #else 12 | extern int _assert(char *, char *, unsigned); 13 | #define assert(e) ((void)((e)||_assert(#e, __FILE__, __LINE__))) 14 | #endif /* NDEBUG */ 15 | -------------------------------------------------------------------------------- /include/mips/irix/ctype.h: -------------------------------------------------------------------------------- 1 | #ifndef __CTYPE 2 | #define __CTYPE 3 | 4 | extern int isalnum(int); 5 | extern int isalpha(int); 6 | extern int iscntrl(int); 7 | extern int isdigit(int); 8 | extern int isgraph(int); 9 | extern int islower(int); 10 | extern int isprint(int); 11 | extern int ispunct(int); 12 | extern int isspace(int); 13 | extern int isupper(int); 14 | extern int isxdigit(int); 15 | extern int tolower(int); 16 | extern int toupper(int); 17 | 18 | #define __U 01 19 | #define __L 02 20 | #define __N 04 21 | #define __S 010 22 | #define __P 020 23 | #define __C 040 24 | #define __B 0100 25 | #define __X 0200 26 | 27 | extern unsigned char _ctype[]; 28 | #define isalnum(c) ((_ctype+1)[c]&(__U|__L|__N)) 29 | #define isalpha(c) ((_ctype+1)[c]&(__U|__L)) 30 | #define iscntrl(c) ((_ctype+1)[c]&__C) 31 | #define isdigit(c) ((_ctype+1)[c]&__N) 32 | #define isgraph(c) ((_ctype+1)[c]&(__P|__U|__L|__N)) 33 | #define islower(c) ((_ctype+1)[c]&__L) 34 | #define isprint(c) ((_ctype+1)[c]&(__P|__U|__L|__N|__B)) 35 | #define ispunct(c) ((_ctype+1)[c]&__P) 36 | #define isspace(c) ((_ctype+1)[c]&__S) 37 | #define isupper(c) ((_ctype+1)[c]&__U) 38 | #define isxdigit(c) ((_ctype+1)[c]&__X) 39 | 40 | #endif /* __CTYPE */ 41 | -------------------------------------------------------------------------------- /include/mips/irix/errno.h: -------------------------------------------------------------------------------- 1 | #ifndef __ERRNO 2 | #define __ERRNO 3 | 4 | #define EDOM 33 5 | #define ERANGE 34 6 | extern int errno; 7 | 8 | #endif /* __ERRNO */ 9 | -------------------------------------------------------------------------------- /include/mips/irix/float.h: -------------------------------------------------------------------------------- 1 | #ifndef __FLOAT 2 | #define __FLOAT 3 | 4 | #define FLT_ROUNDS 1 5 | #define FLT_RADIX 2 6 | 7 | #define FLT_DIG 6 8 | #define FLT_EPSILON 1.19209289550781250000e-07 9 | #define FLT_MANT_DIG 24 10 | #define FLT_MAX 3.40282346638528860000e+38 11 | #define FLT_MAX_10_EXP 38 12 | #define FLT_MAX_EXP 128 13 | #define FLT_MIN 1.17549435082228750000e-38 14 | #define FLT_MIN_10_EXP -37 15 | #define FLT_MIN_EXP -125 16 | 17 | #define DBL_DIG 15 18 | #define DBL_EPSILON 2.22044604925031310000e-16 19 | #define DBL_MANT_DIG 53 20 | #define DBL_MAX 1.79769313486231570000e+308 21 | #define DBL_MAX_10_EXP 308 22 | #define DBL_MAX_EXP 1024 23 | #define DBL_MIN 2.22507385850720140000e-308 24 | #define DBL_MIN_10_EXP -307 25 | #define DBL_MIN_EXP -1021 26 | 27 | #define LDBL_MANT_DIG DBL_MANT_DIG 28 | #define LDBL_EPSILON DBL_EPSILON 29 | #define LDBL_DIG DBL_DIG 30 | #define LDBL_MIN_EXP DBL_MIN_EXP 31 | #define LDBL_MIN DBL_MIN 32 | #define LDBL_MIN_10_EXP DBL_MIN_10_EXP 33 | #define LDBL_MAX_EXP DBL_MAX_EXP 34 | #define LDBL_MAX DBL_MAX 35 | #define LDBL_MAX_10_EXP DBL_MAX_10_EXP 36 | 37 | #endif /* __FLOAT */ 38 | -------------------------------------------------------------------------------- /include/mips/irix/limits.h: -------------------------------------------------------------------------------- 1 | #ifndef __LIMITS 2 | #define __LIMITS 3 | 4 | #define CHAR_BIT 8 5 | #define MB_LEN_MAX 1 6 | 7 | #define UCHAR_MAX 0xff 8 | #define USHRT_MAX 0xffff 9 | #define UINT_MAX (~0U) 10 | #define ULONG_MAX (~0UL) 11 | 12 | #define SCHAR_MAX 0x7f 13 | #define SHRT_MAX 0x7fff 14 | #define INT_MAX 0x7fffffff 15 | #define LONG_MAX 0x7fffffffL 16 | 17 | #define SCHAR_MIN (-SCHAR_MAX-1) 18 | #define SHRT_MIN (-SHRT_MAX-1) 19 | #define INT_MIN (-INT_MAX-1) 20 | #define LONG_MIN (-LONG_MAX-1) 21 | 22 | #ifdef __CHAR_UNSIGNED__ 23 | #define CHAR_MAX UCHAR_MAX 24 | #define CHAR_MIN 0 25 | #else 26 | #define CHAR_MAX SCHAR_MAX 27 | #define CHAR_MIN SCHAR_MIN 28 | #endif 29 | 30 | #endif /* __LIMITS */ 31 | -------------------------------------------------------------------------------- /include/mips/irix/locale.h: -------------------------------------------------------------------------------- 1 | #ifndef __LOCALE 2 | #define __LOCALE 3 | 4 | #define LC_ALL 0 5 | #define LC_COLLATE 1 6 | #define LC_CTYPE 2 7 | #define LC_MONETARY 3 8 | #define LC_NUMERIC 4 9 | #define LC_TIME 5 10 | #ifndef NULL 11 | #define NULL ((void*)0) 12 | #endif 13 | 14 | struct lconv { 15 | char *decimal_point; 16 | char *thousands_sep; 17 | char *grouping; 18 | char *int_curr_symbol; 19 | char *currency_symbol; 20 | char *mon_decimal_point; 21 | char *mon_thousands_sep; 22 | char *mon_grouping; 23 | char *positive_sign; 24 | char *negative_sign; 25 | char int_frac_digits; 26 | char frac_digits; 27 | char p_cs_precedes; 28 | char p_sep_by_space; 29 | char n_cs_precedes; 30 | char n_sep_by_space; 31 | char p_sign_posn; 32 | char n_sign_posn; 33 | }; 34 | 35 | char *setlocale(int, const char *); 36 | struct lconv *localeconv(void); 37 | 38 | #endif /* __LOCALE */ 39 | -------------------------------------------------------------------------------- /include/mips/irix/math.h: -------------------------------------------------------------------------------- 1 | #ifndef __MATH 2 | #define __MATH 3 | 4 | #define HUGE_VAL 1.79769313486231570000e+308 5 | 6 | extern double acos(double); 7 | extern double asin(double); 8 | extern double atan(double); 9 | extern double atan2(double, double); 10 | extern double cos(double); 11 | extern double sin(double); 12 | extern double tan(double); 13 | extern double cosh(double); 14 | extern double sinh(double); 15 | extern double tanh(double); 16 | extern double exp(double); 17 | extern double frexp(double, int *); 18 | extern double ldexp(double, int); 19 | extern double log(double); 20 | extern double log10(double); 21 | extern double modf(double, double *); 22 | extern double pow(double, double); 23 | extern double sqrt(double); 24 | extern double ceil(double); 25 | extern double fabs(double); 26 | extern double floor(double); 27 | extern double fmod(double, double); 28 | 29 | #endif /* __MATH */ 30 | -------------------------------------------------------------------------------- /include/mips/irix/setjmp.h: -------------------------------------------------------------------------------- 1 | #ifndef __SETJMP 2 | #define __SETJMP 3 | 4 | 5 | 6 | 7 | typedef int jmp_buf[28]; 8 | int setjmp(jmp_buf); 9 | void longjmp(jmp_buf, int); 10 | 11 | #endif /* __SETJMP */ 12 | -------------------------------------------------------------------------------- /include/mips/irix/signal.h: -------------------------------------------------------------------------------- 1 | #ifndef __SIGNAL 2 | #define __SIGNAL 3 | 4 | typedef int sig_atomic_t; 5 | 6 | #define SIG_DFL ((void (*)(int))0) 7 | #define SIG_ERR ((void (*)(int))-1) 8 | #define SIG_IGN ((void (*)(int))1) 9 | 10 | #define SIGABRT 6 11 | #define SIGFPE 8 12 | #define SIGILL 4 13 | #define SIGINT 2 14 | #define SIGSEGV 11 15 | #define SIGTERM 15 16 | 17 | void (*signal(int, void (*)(int)))(int); 18 | int raise(int); 19 | 20 | #endif /* __SIGNAL */ 21 | -------------------------------------------------------------------------------- /include/mips/irix/stdarg.h: -------------------------------------------------------------------------------- 1 | #ifndef __STDARG 2 | #define __STDARG 3 | 4 | #if !defined(_VA_LIST) && !defined(__VA_LIST_DEFINED) 5 | #define _VA_LIST 6 | #define _VA_LIST_DEFINED 7 | typedef char *__va_list; 8 | #endif 9 | static float __va_arg_tmp; 10 | typedef __va_list va_list; 11 | 12 | #define va_start(list, start) ((void)((list) = (sizeof(start)<4 ? \ 13 | (char *)((int *)&(start)+1) : (char *)(&(start)+1)))) 14 | #define __va_arg(list, mode, n) (\ 15 | __typecode(mode)==1 && sizeof(mode)==4 ? \ 16 | (__va_arg_tmp = *(double *)(&(list += ((sizeof(double)+n)&~n))[-(int)((sizeof(double)+n)&~n)]), \ 17 | *(mode *)&__va_arg_tmp) : \ 18 | *(mode *)(&(list += ((sizeof(mode)+n)&~n))[-(int)((sizeof(mode)+n)&~n)])) 19 | #define _bigendian_va_arg(list, mode, n) (\ 20 | sizeof(mode)==1 ? *(mode *)(&(list += 4)[-1]) : \ 21 | sizeof(mode)==2 ? *(mode *)(&(list += 4)[-2]) : __va_arg(list, mode, n)) 22 | #define _littleendian_va_arg(list, mode, n) __va_arg(list, mode, n) 23 | #define va_end(list) ((void)0) 24 | #define va_arg(list, mode) (sizeof(mode)==8 ? \ 25 | *(mode *)(&(list = (char*)(((int)list + 15)&~7U))[-8]) : \ 26 | _bigendian_va_arg(list, mode, 3U)) 27 | #endif 28 | -------------------------------------------------------------------------------- /include/mips/irix/stddef.h: -------------------------------------------------------------------------------- 1 | #ifndef __STDDEF 2 | #define __STDDEF 3 | 4 | /* $Id$ */ 5 | 6 | #ifndef NULL 7 | #define NULL ((void*)0) 8 | #endif 9 | #define offsetof(ty,mem) ((size_t)((char*)&((ty*)0)->mem - (char*)0)) 10 | 11 | typedef long ptrdiff_t; 12 | 13 | #if !defined(_SIZE_T) && !defined(_SIZE_T_) && !defined(_SIZE_T_DEFINED) 14 | #define _SIZE_T 15 | #define _SIZE_T_ 16 | #define _SIZE_T_DEFINED 17 | typedef unsigned long size_t; 18 | #endif 19 | 20 | #if !defined(_WCHAR_T) && !defined(_WCHAR_T_) && !defined(_WCHAR_T_DEFINED) 21 | #define _WCHAR_T 22 | #define _WCHAR_T_ 23 | #define _WCHAR_T_DEFINED 24 | #if (_WCHAR_T_SIZE + 0) == 1 25 | typedef unsigned char wchar_t; 26 | #elif (_WCHAR_T_SIZE + 0) == 2 27 | typedef unsigned short wchar_t; 28 | #elif (_WCHAR_T_SIZE + 0) == 4 29 | typedef unsigned int wchar_t; 30 | #else 31 | typedef unsigned short wchar_t; 32 | #endif 33 | #endif 34 | 35 | #endif /* __STDDEF */ 36 | -------------------------------------------------------------------------------- /include/mips/irix/stdlib.h: -------------------------------------------------------------------------------- 1 | #ifndef __STDLIB 2 | #define __STDLIB 3 | 4 | #define EXIT_FAILURE 1 5 | #define EXIT_SUCCESS 0 6 | #define MB_CUR_MAX 1 7 | #ifndef NULL 8 | #define NULL ((void*)0) 9 | #endif 10 | #define RAND_MAX 32767 11 | 12 | typedef struct { int quot, rem; } div_t; 13 | typedef struct { long quot, rem; } ldiv_t; 14 | 15 | #if !defined(_SIZE_T) && !defined(_SIZE_T_) && !defined(_SIZE_T_DEFINED) 16 | #define _SIZE_T 17 | #define _SIZE_T_ 18 | #define _SIZE_T_DEFINED 19 | typedef unsigned long size_t; 20 | #endif 21 | 22 | #if !defined(_WCHAR_T) && !defined(_WCHAR_T_) && !defined(_WCHAR_T_DEFINED) 23 | #define _WCHAR_T 24 | #define _WCHAR_T_ 25 | #define _WCHAR_T_DEFINED 26 | #if (_WCHAR_T_SIZE + 0) == 1 27 | typedef unsigned char wchar_t; 28 | #elif (_WCHAR_T_SIZE + 0) == 2 29 | typedef unsigned short wchar_t; 30 | #elif (_WCHAR_T_SIZE + 0) == 4 31 | typedef unsigned int wchar_t; 32 | #else 33 | typedef unsigned short wchar_t; 34 | #endif 35 | #endif 36 | 37 | extern double atof(const char *); 38 | extern int atoi(const char *); 39 | extern long int atol(const char *); 40 | extern double strtod(const char *, char **); 41 | extern long int strtol(const char *, char **, int); 42 | extern unsigned long int strtoul(const char *, char **, int); 43 | extern int rand(void); 44 | extern void srand(unsigned int); 45 | extern void *calloc(size_t, size_t); 46 | extern void free(void *); 47 | extern void *malloc(size_t); 48 | extern void *realloc(void *, size_t); 49 | extern void abort(void); 50 | extern int atexit(void (*)(void)); 51 | extern void exit(int); 52 | extern char *getenv(const char *); 53 | extern int system(const char *); 54 | extern void *bsearch(const void *, const void *, size_t, size_t, int (*)(const void *, const void *)); 55 | extern void qsort(void *, size_t, size_t, int (*)(const void *, const void *)); 56 | extern int abs(int); 57 | extern div_t div(int, int); 58 | extern long int labs(long int); 59 | extern ldiv_t ldiv(long int, long int); 60 | extern int mblen(const char *, size_t); 61 | extern int mbtowc(wchar_t *, const char *, size_t); 62 | extern int wctomb(char *, wchar_t); 63 | extern size_t mbstowcs(wchar_t *, const char *, size_t); 64 | extern size_t wcstombs(char *, const wchar_t *, size_t); 65 | 66 | #endif /* __STDLIB */ 67 | -------------------------------------------------------------------------------- /include/mips/irix/string.h: -------------------------------------------------------------------------------- 1 | #ifndef __STRING 2 | #define __STRING 3 | 4 | #ifndef NULL 5 | #define NULL ((void*)0) 6 | #endif 7 | 8 | #if !defined(_SIZE_T) && !defined(_SIZE_T_) && !defined(_SIZE_T_DEFINED) 9 | #define _SIZE_T 10 | #define _SIZE_T_ 11 | #define _SIZE_T_DEFINED 12 | typedef unsigned long size_t; 13 | #endif 14 | 15 | void *memcpy(void *, const void *, size_t); 16 | void *memmove(void *, const void *, size_t); 17 | char *strcpy(char *, const char *); 18 | char *strncpy(char *, const char *, size_t); 19 | char *strcat(char *, const char *); 20 | char *strncat(char *, const char *, size_t); 21 | int memcmp(const void *, const void *, size_t); 22 | int strcmp(const char *, const char *); 23 | int strcoll(const char *, const char *); 24 | int strncmp(const char *, const char *, size_t); 25 | size_t strxfrm(char *, const char *, size_t); 26 | void *memchr(const void *, int, size_t); 27 | char *strchr(const char *, int); 28 | size_t strcspn(const char *, const char *); 29 | char *strpbrk(const char *, const char *); 30 | char *strrchr(const char *, int); 31 | size_t strspn(const char *, const char *); 32 | char *strstr(const char *, const char *); 33 | char *strtok(char *, const char *); 34 | void *memset(void *, int, size_t); 35 | char *strerror(int); 36 | size_t strlen(const char *); 37 | 38 | #endif /* __STRING */ 39 | -------------------------------------------------------------------------------- /include/mips/irix/time.h: -------------------------------------------------------------------------------- 1 | #ifndef __TIME 2 | #define __TIME 3 | 4 | #define CLOCKS_PER_SEC 1000000 5 | #ifndef NULL 6 | #define NULL ((void*)0) 7 | #endif 8 | 9 | #if !defined(_CLOCK_T) && !defined(_CLOCK_T_) && !defined(_CLOCK_T_DEFINED) 10 | #define _CLOCK_T 11 | #define _CLOCK_T_ 12 | #define _CLOCK_T_DEFINED 13 | typedef long clock_t; 14 | #endif 15 | 16 | #if !defined(_TIME_T) && !defined(_TIME_T_) && !defined(_TIME_T_DEFINED) 17 | #define _TIME_T 18 | #define _TIME_T_ 19 | #define _TIME_T_DEFINED 20 | typedef long time_t; 21 | #endif 22 | 23 | #if !defined(_SIZE_T) && !defined(_SIZE_T_) && !defined(_SIZE_T_DEFINED) 24 | #define _SIZE_T 25 | #define _SIZE_T_ 26 | #define _SIZE_T_DEFINED 27 | typedef unsigned long size_t; 28 | #endif 29 | 30 | struct tm { 31 | int tm_sec; 32 | int tm_min; 33 | int tm_hour; 34 | int tm_mday; 35 | int tm_mon; 36 | int tm_year; 37 | int tm_wday; 38 | int tm_yday; 39 | int tm_isdst; 40 | }; 41 | extern clock_t clock(void); 42 | extern double difftime(time_t, time_t); 43 | extern time_t mktime(struct tm *); 44 | extern time_t time(time_t *); 45 | extern char *asctime(const struct tm *); 46 | extern char *ctime(const time_t *); 47 | extern struct tm *gmtime(const time_t *); 48 | extern struct tm *localtime(const time_t *); 49 | extern size_t strftime(char *, size_t, const char *, const struct tm *); 50 | 51 | #endif /* __TIME */ 52 | -------------------------------------------------------------------------------- /include/sparc/solaris/assert.h: -------------------------------------------------------------------------------- 1 | #ifndef __ASSERT 2 | #define __ASSERT 3 | 4 | void assert(int); 5 | 6 | #endif /* __ASSERT */ 7 | 8 | #undef assert 9 | #ifdef NDEBUG 10 | #define assert(ignore) ((void)0) 11 | #else 12 | extern void __assert(char *, char *, unsigned); 13 | #define assert(e) ((void)((e)||(__assert(#e, __FILE__, __LINE__),0))) 14 | #endif /* NDEBUG */ 15 | -------------------------------------------------------------------------------- /include/sparc/solaris/ctype.h: -------------------------------------------------------------------------------- 1 | #ifndef __CTYPE 2 | #define __CTYPE 3 | 4 | extern int isalnum(int); 5 | extern int isalpha(int); 6 | extern int iscntrl(int); 7 | extern int isdigit(int); 8 | extern int isgraph(int); 9 | extern int islower(int); 10 | extern int isprint(int); 11 | extern int ispunct(int); 12 | extern int isspace(int); 13 | extern int isupper(int); 14 | extern int isxdigit(int); 15 | extern int tolower(int); 16 | extern int toupper(int); 17 | 18 | #define __U 01 19 | #define __L 02 20 | #define __N 04 21 | #define __S 010 22 | #define __P 020 23 | #define __C 040 24 | #define _U 01 25 | #define _L 02 26 | #define _N 04 27 | #define _S 010 28 | #define _P 020 29 | #define _C 040 30 | #define _B 0100 31 | #define _X 0200 32 | 33 | extern unsigned char __ctype[]; 34 | #define isalpha(c) ((__ctype + 1)[c] & (_U | _L)) 35 | #define isupper(c) ((__ctype + 1)[c] & _U) 36 | #define islower(c) ((__ctype + 1)[c] & _L) 37 | #define isdigit(c) ((__ctype + 1)[c] & _N) 38 | #define isxdigit(c) ((__ctype + 1)[c] & _X) 39 | #define isalnum(c) ((__ctype + 1)[c] & (_U | _L | _N)) 40 | #define isspace(c) ((__ctype + 1)[c] & _S) 41 | #define ispunct(c) ((__ctype + 1)[c] & _P) 42 | #define isprint(c) ((__ctype + 1)[c] & (_P | _U | _L | _N | _B)) 43 | #define isgraph(c) ((__ctype + 1)[c] & (_P | _U | _L | _N)) 44 | #define iscntrl(c) ((__ctype + 1)[c] & _C) 45 | 46 | #endif /* __CTYPE */ 47 | -------------------------------------------------------------------------------- /include/sparc/solaris/errno.h: -------------------------------------------------------------------------------- 1 | #ifndef __ERRNO 2 | #define __ERRNO 3 | 4 | #define EDOM 33 5 | #define ERANGE 34 6 | extern int errno; 7 | 8 | #endif /* __ERRNO */ 9 | -------------------------------------------------------------------------------- /include/sparc/solaris/float.h: -------------------------------------------------------------------------------- 1 | #ifndef __FLOAT 2 | #define __FLOAT 3 | 4 | #define FLT_ROUNDS 1 5 | #define FLT_RADIX 2 6 | 7 | #define FLT_DIG 6 8 | #define FLT_EPSILON 1.19209289550781250000e-07 9 | #define FLT_MANT_DIG 24 10 | #define FLT_MAX 3.40282346638528860000e+38 11 | #define FLT_MAX_10_EXP 38 12 | #define FLT_MAX_EXP 128 13 | #define FLT_MIN 1.17549435082228750000e-38 14 | #define FLT_MIN_10_EXP -37 15 | #define FLT_MIN_EXP -125 16 | 17 | #define DBL_DIG 15 18 | #define DBL_EPSILON 2.22044604925031310000e-16 19 | #define DBL_MANT_DIG 53 20 | #define DBL_MAX 1.79769313486231570000e+308 21 | #define DBL_MAX_10_EXP 308 22 | #define DBL_MAX_EXP 1024 23 | #define DBL_MIN 2.22507385850720140000e-308 24 | #define DBL_MIN_10_EXP -307 25 | #define DBL_MIN_EXP -1021 26 | 27 | #define LDBL_MANT_DIG DBL_MANT_DIG 28 | #define LDBL_EPSILON DBL_EPSILON 29 | #define LDBL_DIG DBL_DIG 30 | #define LDBL_MIN_EXP DBL_MIN_EXP 31 | #define LDBL_MIN DBL_MIN 32 | #define LDBL_MIN_10_EXP DBL_MIN_10_EXP 33 | #define LDBL_MAX_EXP DBL_MAX_EXP 34 | #define LDBL_MAX DBL_MAX 35 | #define LDBL_MAX_10_EXP DBL_MAX_10_EXP 36 | 37 | #endif /* __FLOAT */ 38 | -------------------------------------------------------------------------------- /include/sparc/solaris/limits.h: -------------------------------------------------------------------------------- 1 | #ifndef __LIMITS 2 | #define __LIMITS 3 | 4 | #define CHAR_BIT 8 5 | #define MB_LEN_MAX 1 6 | 7 | #define UCHAR_MAX 0xff 8 | #define USHRT_MAX 0xffff 9 | #define UINT_MAX (~0U) 10 | #define ULONG_MAX (~0UL) 11 | 12 | #define SCHAR_MAX 0x7f 13 | #define SHRT_MAX 0x7fff 14 | #define INT_MAX 0x7fffffff 15 | #define LONG_MAX 0x7fffffffL 16 | 17 | #define SCHAR_MIN (-SCHAR_MAX-1) 18 | #define SHRT_MIN (-SHRT_MAX-1) 19 | #define INT_MIN (-INT_MAX-1) 20 | #define LONG_MIN (-LONG_MAX-1) 21 | 22 | #ifdef __CHAR_UNSIGNED__ 23 | #define CHAR_MAX UCHAR_MAX 24 | #define CHAR_MIN 0 25 | #else 26 | #define CHAR_MAX SCHAR_MAX 27 | #define CHAR_MIN SCHAR_MIN 28 | #endif 29 | 30 | #endif /* __LIMITS */ 31 | -------------------------------------------------------------------------------- /include/sparc/solaris/locale.h: -------------------------------------------------------------------------------- 1 | #ifndef __LOCALE 2 | #define __LOCALE 3 | 4 | #define LC_ALL 0 5 | #define LC_COLLATE 1 6 | #define LC_CTYPE 2 7 | #define LC_MONETARY 3 8 | #define LC_NUMERIC 4 9 | #define LC_TIME 5 10 | #ifndef NULL 11 | #define NULL ((void*)0) 12 | #endif 13 | 14 | struct lconv { 15 | char *decimal_point; 16 | char *thousands_sep; 17 | char *grouping; 18 | char *int_curr_symbol; 19 | char *currency_symbol; 20 | char *mon_decimal_point; 21 | char *mon_thousands_sep; 22 | char *mon_grouping; 23 | char *positive_sign; 24 | char *negative_sign; 25 | char int_frac_digits; 26 | char frac_digits; 27 | char p_cs_precedes; 28 | char p_sep_by_space; 29 | char n_cs_precedes; 30 | char n_sep_by_space; 31 | char p_sign_posn; 32 | char n_sign_posn; 33 | }; 34 | 35 | char *setlocale(int, const char *); 36 | struct lconv *localeconv(void); 37 | 38 | #endif /* __LOCALE */ 39 | -------------------------------------------------------------------------------- /include/sparc/solaris/math.h: -------------------------------------------------------------------------------- 1 | #ifndef __MATH 2 | #define __MATH 3 | 4 | extern double infinity(void); 5 | #define HUGE_VAL (infinity()) 6 | 7 | extern double acos(double); 8 | extern double asin(double); 9 | extern double atan(double); 10 | extern double atan2(double, double); 11 | extern double cos(double); 12 | extern double sin(double); 13 | extern double tan(double); 14 | extern double cosh(double); 15 | extern double sinh(double); 16 | extern double tanh(double); 17 | extern double exp(double); 18 | extern double frexp(double, int *); 19 | extern double ldexp(double, int); 20 | extern double log(double); 21 | extern double log10(double); 22 | extern double modf(double, double *); 23 | extern double pow(double, double); 24 | extern double sqrt(double); 25 | extern double ceil(double); 26 | extern double fabs(double); 27 | extern double floor(double); 28 | extern double fmod(double, double); 29 | 30 | #endif /* __MATH */ 31 | -------------------------------------------------------------------------------- /include/sparc/solaris/setjmp.h: -------------------------------------------------------------------------------- 1 | #ifndef __SETJMP 2 | #define __SETJMP 3 | 4 | 5 | 6 | 7 | typedef int jmp_buf[12]; 8 | int setjmp(jmp_buf); 9 | void longjmp(jmp_buf, int); 10 | 11 | #endif /* __SETJMP */ 12 | -------------------------------------------------------------------------------- /include/sparc/solaris/signal.h: -------------------------------------------------------------------------------- 1 | #ifndef __SIGNAL 2 | #define __SIGNAL 3 | 4 | typedef int sig_atomic_t; 5 | 6 | #define SIG_DFL ((void (*)(int))0) 7 | #define SIG_ERR ((void (*)(int))-1) 8 | #define SIG_IGN ((void (*)(int))1) 9 | 10 | #define SIGABRT 6 11 | #define SIGFPE 8 12 | #define SIGILL 4 13 | #define SIGINT 2 14 | #define SIGSEGV 11 15 | #define SIGTERM 15 16 | 17 | void (*signal(int, void (*)(int)))(int); 18 | int raise(int); 19 | 20 | #endif /* __SIGNAL */ 21 | -------------------------------------------------------------------------------- /include/sparc/solaris/stdarg.h: -------------------------------------------------------------------------------- 1 | #ifndef __STDARG 2 | #define __STDARG 3 | 4 | #if !defined(_VA_LIST) && !defined(__VA_LIST_DEFINED) 5 | #define _VA_LIST 6 | #define _VA_LIST_DEFINED 7 | typedef char *__va_list; 8 | #endif 9 | static float __va_arg_tmp; 10 | typedef __va_list va_list; 11 | 12 | #define va_start(list, start) ((void)((list) = (sizeof(start)<4 ? \ 13 | (char *)((int *)&(start)+1) : (char *)(&(start)+1)))) 14 | #define __va_arg(list, mode, n) (\ 15 | __typecode(mode)==1 && sizeof(mode)==4 ? \ 16 | (__va_arg_tmp = *(double *)(&(list += ((sizeof(double)+n)&~n))[-(int)((sizeof(double)+n)&~n)]), \ 17 | *(mode *)&__va_arg_tmp) : \ 18 | *(mode *)(&(list += ((sizeof(mode)+n)&~n))[-(int)((sizeof(mode)+n)&~n)])) 19 | #define _bigendian_va_arg(list, mode, n) (\ 20 | sizeof(mode)==1 ? *(mode *)(&(list += 4)[-1]) : \ 21 | sizeof(mode)==2 ? *(mode *)(&(list += 4)[-2]) : __va_arg(list, mode, n)) 22 | #define _littleendian_va_arg(list, mode, n) __va_arg(list, mode, n) 23 | #define va_end(list) ((void)0) 24 | #define va_arg(list, mode) (sizeof(mode)>8 ? \ 25 | **(mode **)(&(list += 4)[-4]) : \ 26 | _bigendian_va_arg(list, mode, 3U)) 27 | #endif 28 | -------------------------------------------------------------------------------- /include/sparc/solaris/stddef.h: -------------------------------------------------------------------------------- 1 | #ifndef __STDDEF 2 | #define __STDDEF 3 | 4 | /* $Id$ */ 5 | 6 | #ifndef NULL 7 | #define NULL ((void*)0) 8 | #endif 9 | #define offsetof(ty,mem) ((size_t)((char*)&((ty*)0)->mem - (char*)0)) 10 | 11 | typedef long ptrdiff_t; 12 | 13 | #if !defined(_SIZE_T) && !defined(_SIZE_T_) && !defined(_SIZE_T_DEFINED) 14 | #define _SIZE_T 15 | #define _SIZE_T_ 16 | #define _SIZE_T_DEFINED 17 | typedef unsigned long size_t; 18 | #endif 19 | 20 | #if !defined(_WCHAR_T) && !defined(_WCHAR_T_) && !defined(_WCHAR_T_DEFINED) 21 | #define _WCHAR_T 22 | #define _WCHAR_T_ 23 | #define _WCHAR_T_DEFINED 24 | #if (_WCHAR_T_SIZE + 0) == 1 25 | typedef unsigned char wchar_t; 26 | #elif (_WCHAR_T_SIZE + 0) == 2 27 | typedef unsigned short wchar_t; 28 | #elif (_WCHAR_T_SIZE + 0) == 4 29 | typedef unsigned int wchar_t; 30 | #else 31 | typedef unsigned short wchar_t; 32 | #endif 33 | #endif 34 | 35 | #endif /* __STDDEF */ 36 | -------------------------------------------------------------------------------- /include/sparc/solaris/stdlib.h: -------------------------------------------------------------------------------- 1 | #ifndef __STDLIB 2 | #define __STDLIB 3 | 4 | #define EXIT_FAILURE 1 5 | #define EXIT_SUCCESS 0 6 | #define MB_CUR_MAX 1 7 | #ifndef NULL 8 | #define NULL ((void*)0) 9 | #endif 10 | #define RAND_MAX 32767 11 | 12 | typedef struct { int quot, rem; } div_t; 13 | typedef struct { long quot, rem; } ldiv_t; 14 | 15 | #if !defined(_SIZE_T) && !defined(_SIZE_T_) && !defined(_SIZE_T_DEFINED) 16 | #define _SIZE_T 17 | #define _SIZE_T_ 18 | #define _SIZE_T_DEFINED 19 | typedef unsigned long size_t; 20 | #endif 21 | 22 | #if !defined(_WCHAR_T) && !defined(_WCHAR_T_) && !defined(_WCHAR_T_DEFINED) 23 | #define _WCHAR_T 24 | #define _WCHAR_T_ 25 | #define _WCHAR_T_DEFINED 26 | #if (_WCHAR_T_SIZE + 0) == 1 27 | typedef unsigned char wchar_t; 28 | #elif (_WCHAR_T_SIZE + 0) == 2 29 | typedef unsigned short wchar_t; 30 | #elif (_WCHAR_T_SIZE + 0) == 4 31 | typedef unsigned int wchar_t; 32 | #else 33 | typedef unsigned short wchar_t; 34 | #endif 35 | #endif 36 | 37 | extern double atof(const char *); 38 | extern int atoi(const char *); 39 | extern long int atol(const char *); 40 | extern double strtod(const char *, char **); 41 | extern long int strtol(const char *, char **, int); 42 | extern unsigned long int strtoul(const char *, char **, int); 43 | extern int rand(void); 44 | extern void srand(unsigned int); 45 | extern void *calloc(size_t, size_t); 46 | extern void free(void *); 47 | extern void *malloc(size_t); 48 | extern void *realloc(void *, size_t); 49 | extern void abort(void); 50 | extern int atexit(void (*)(void)); 51 | extern void exit(int); 52 | extern char *getenv(const char *); 53 | extern int system(const char *); 54 | extern void *bsearch(const void *, const void *, size_t, size_t, int (*)(const void *, const void *)); 55 | extern void qsort(void *, size_t, size_t, int (*)(const void *, const void *)); 56 | extern int abs(int); 57 | extern div_t div(int, int); 58 | extern long int labs(long int); 59 | extern ldiv_t ldiv(long int, long int); 60 | extern int mblen(const char *, size_t); 61 | extern int mbtowc(wchar_t *, const char *, size_t); 62 | extern int wctomb(char *, wchar_t); 63 | extern size_t mbstowcs(wchar_t *, const char *, size_t); 64 | extern size_t wcstombs(char *, const wchar_t *, size_t); 65 | 66 | #endif /* __STDLIB */ 67 | -------------------------------------------------------------------------------- /include/sparc/solaris/string.h: -------------------------------------------------------------------------------- 1 | #ifndef __STRING 2 | #define __STRING 3 | 4 | #ifndef NULL 5 | #define NULL ((void*)0) 6 | #endif 7 | 8 | #if !defined(_SIZE_T) && !defined(_SIZE_T_) && !defined(_SIZE_T_DEFINED) 9 | #define _SIZE_T 10 | #define _SIZE_T_ 11 | #define _SIZE_T_DEFINED 12 | typedef unsigned long size_t; 13 | #endif 14 | 15 | void *memcpy(void *, const void *, size_t); 16 | void *memmove(void *, const void *, size_t); 17 | char *strcpy(char *, const char *); 18 | char *strncpy(char *, const char *, size_t); 19 | char *strcat(char *, const char *); 20 | char *strncat(char *, const char *, size_t); 21 | int memcmp(const void *, const void *, size_t); 22 | int strcmp(const char *, const char *); 23 | int strcoll(const char *, const char *); 24 | int strncmp(const char *, const char *, size_t); 25 | size_t strxfrm(char *, const char *, size_t); 26 | void *memchr(const void *, int, size_t); 27 | char *strchr(const char *, int); 28 | size_t strcspn(const char *, const char *); 29 | char *strpbrk(const char *, const char *); 30 | char *strrchr(const char *, int); 31 | size_t strspn(const char *, const char *); 32 | char *strstr(const char *, const char *); 33 | char *strtok(char *, const char *); 34 | void *memset(void *, int, size_t); 35 | char *strerror(int); 36 | size_t strlen(const char *); 37 | 38 | #endif /* __STRING */ 39 | -------------------------------------------------------------------------------- /include/sparc/solaris/time.h: -------------------------------------------------------------------------------- 1 | #ifndef __TIME 2 | #define __TIME 3 | 4 | #define CLOCKS_PER_SEC 1000000 5 | #ifndef NULL 6 | #define NULL ((void*)0) 7 | #endif 8 | 9 | #if !defined(_CLOCK_T) && !defined(_CLOCK_T_) && !defined(_CLOCK_T_DEFINED) 10 | #define _CLOCK_T 11 | #define _CLOCK_T_ 12 | #define _CLOCK_T_DEFINED 13 | typedef long clock_t; 14 | #endif 15 | 16 | #if !defined(_TIME_T) && !defined(_TIME_T_) && !defined(_TIME_T_DEFINED) 17 | #define _TIME_T 18 | #define _TIME_T_ 19 | #define _TIME_T_DEFINED 20 | typedef long time_t; 21 | #endif 22 | 23 | #if !defined(_SIZE_T) && !defined(_SIZE_T_) && !defined(_SIZE_T_DEFINED) 24 | #define _SIZE_T 25 | #define _SIZE_T_ 26 | #define _SIZE_T_DEFINED 27 | typedef unsigned long size_t; 28 | #endif 29 | 30 | struct tm { 31 | int tm_sec; 32 | int tm_min; 33 | int tm_hour; 34 | int tm_mday; 35 | int tm_mon; 36 | int tm_year; 37 | int tm_wday; 38 | int tm_yday; 39 | int tm_isdst; 40 | }; 41 | extern clock_t clock(void); 42 | extern double difftime(time_t, time_t); 43 | extern time_t mktime(struct tm *); 44 | extern time_t time(time_t *); 45 | extern char *asctime(const struct tm *); 46 | extern char *ctime(const time_t *); 47 | extern struct tm *gmtime(const time_t *); 48 | extern struct tm *localtime(const time_t *); 49 | extern size_t strftime(char *, size_t, const char *, const struct tm *); 50 | 51 | #endif /* __TIME */ 52 | -------------------------------------------------------------------------------- /include/symbolic/irix/assert.h: -------------------------------------------------------------------------------- 1 | #ifndef __ASSERT 2 | #define __ASSERT 3 | 4 | void assert(int); 5 | 6 | #endif /* __ASSERT */ 7 | 8 | #undef assert 9 | #ifdef NDEBUG 10 | #define assert(ignore) ((void)0) 11 | #else 12 | extern int _assert(char *, char *, unsigned); 13 | #define assert(e) ((void)((e)||_assert(#e, __FILE__, __LINE__))) 14 | #endif /* NDEBUG */ 15 | -------------------------------------------------------------------------------- /include/symbolic/irix/ctype.h: -------------------------------------------------------------------------------- 1 | #ifndef __CTYPE 2 | #define __CTYPE 3 | 4 | extern int isalnum(int); 5 | extern int isalpha(int); 6 | extern int iscntrl(int); 7 | extern int isdigit(int); 8 | extern int isgraph(int); 9 | extern int islower(int); 10 | extern int isprint(int); 11 | extern int ispunct(int); 12 | extern int isspace(int); 13 | extern int isupper(int); 14 | extern int isxdigit(int); 15 | extern int tolower(int); 16 | extern int toupper(int); 17 | 18 | #define __U 01 19 | #define __L 02 20 | #define __N 04 21 | #define __S 010 22 | #define __P 020 23 | #define __C 040 24 | #define __B 0100 25 | #define __X 0200 26 | 27 | extern unsigned char _ctype[]; 28 | #define isalnum(c) ((_ctype+1)[c]&(__U|__L|__N)) 29 | #define isalpha(c) ((_ctype+1)[c]&(__U|__L)) 30 | #define iscntrl(c) ((_ctype+1)[c]&__C) 31 | #define isdigit(c) ((_ctype+1)[c]&__N) 32 | #define isgraph(c) ((_ctype+1)[c]&(__P|__U|__L|__N)) 33 | #define islower(c) ((_ctype+1)[c]&__L) 34 | #define isprint(c) ((_ctype+1)[c]&(__P|__U|__L|__N|__B)) 35 | #define ispunct(c) ((_ctype+1)[c]&__P) 36 | #define isspace(c) ((_ctype+1)[c]&__S) 37 | #define isupper(c) ((_ctype+1)[c]&__U) 38 | #define isxdigit(c) ((_ctype+1)[c]&__X) 39 | 40 | #endif /* __CTYPE */ 41 | -------------------------------------------------------------------------------- /include/symbolic/irix/errno.h: -------------------------------------------------------------------------------- 1 | #ifndef __ERRNO 2 | #define __ERRNO 3 | 4 | #define EDOM 33 5 | #define ERANGE 34 6 | extern int errno; 7 | 8 | #endif /* __ERRNO */ 9 | -------------------------------------------------------------------------------- /include/symbolic/irix/float.h: -------------------------------------------------------------------------------- 1 | #ifndef __FLOAT 2 | #define __FLOAT 3 | 4 | #define FLT_ROUNDS 1 5 | #define FLT_RADIX 2 6 | 7 | #define FLT_DIG 6 8 | #define FLT_EPSILON 1.19209289550781250000e-07 9 | #define FLT_MANT_DIG 24 10 | #define FLT_MAX 3.40282346638528860000e+38 11 | #define FLT_MAX_10_EXP 38 12 | #define FLT_MAX_EXP 128 13 | #define FLT_MIN 1.17549435082228750000e-38 14 | #define FLT_MIN_10_EXP -37 15 | #define FLT_MIN_EXP -125 16 | 17 | #define DBL_DIG 15 18 | #define DBL_EPSILON 2.22044604925031310000e-16 19 | #define DBL_MANT_DIG 53 20 | #define DBL_MAX 1.79769313486231570000e+308 21 | #define DBL_MAX_10_EXP 308 22 | #define DBL_MAX_EXP 1024 23 | #define DBL_MIN 2.22507385850720140000e-308 24 | #define DBL_MIN_10_EXP -307 25 | #define DBL_MIN_EXP -1021 26 | 27 | #define LDBL_MANT_DIG DBL_MANT_DIG 28 | #define LDBL_EPSILON DBL_EPSILON 29 | #define LDBL_DIG DBL_DIG 30 | #define LDBL_MIN_EXP DBL_MIN_EXP 31 | #define LDBL_MIN DBL_MIN 32 | #define LDBL_MIN_10_EXP DBL_MIN_10_EXP 33 | #define LDBL_MAX_EXP DBL_MAX_EXP 34 | #define LDBL_MAX DBL_MAX 35 | #define LDBL_MAX_10_EXP DBL_MAX_10_EXP 36 | 37 | #endif /* __FLOAT */ 38 | -------------------------------------------------------------------------------- /include/symbolic/irix/limits.h: -------------------------------------------------------------------------------- 1 | #ifndef __LIMITS 2 | #define __LIMITS 3 | 4 | #define CHAR_BIT 8 5 | #define MB_LEN_MAX 1 6 | 7 | #define UCHAR_MAX 0xff 8 | #define USHRT_MAX 0xffff 9 | #define UINT_MAX (~0U) 10 | #define ULONG_MAX (~0UL) 11 | 12 | #define SCHAR_MAX 0x7f 13 | #define SHRT_MAX 0x7fff 14 | #define INT_MAX 0x7fffffff 15 | #define LONG_MAX 0x7fffffffL 16 | 17 | #define SCHAR_MIN (-SCHAR_MAX-1) 18 | #define SHRT_MIN (-SHRT_MAX-1) 19 | #define INT_MIN (-INT_MAX-1) 20 | #define LONG_MIN (-LONG_MAX-1) 21 | 22 | #ifdef __CHAR_UNSIGNED__ 23 | #define CHAR_MAX UCHAR_MAX 24 | #define CHAR_MIN 0 25 | #else 26 | #define CHAR_MAX SCHAR_MAX 27 | #define CHAR_MIN SCHAR_MIN 28 | #endif 29 | 30 | #endif /* __LIMITS */ 31 | -------------------------------------------------------------------------------- /include/symbolic/irix/locale.h: -------------------------------------------------------------------------------- 1 | #ifndef __LOCALE 2 | #define __LOCALE 3 | 4 | #define LC_ALL 0 5 | #define LC_COLLATE 1 6 | #define LC_CTYPE 2 7 | #define LC_MONETARY 3 8 | #define LC_NUMERIC 4 9 | #define LC_TIME 5 10 | #ifndef NULL 11 | #define NULL ((void*)0) 12 | #endif 13 | 14 | struct lconv { 15 | char *decimal_point; 16 | char *thousands_sep; 17 | char *grouping; 18 | char *int_curr_symbol; 19 | char *currency_symbol; 20 | char *mon_decimal_point; 21 | char *mon_thousands_sep; 22 | char *mon_grouping; 23 | char *positive_sign; 24 | char *negative_sign; 25 | char int_frac_digits; 26 | char frac_digits; 27 | char p_cs_precedes; 28 | char p_sep_by_space; 29 | char n_cs_precedes; 30 | char n_sep_by_space; 31 | char p_sign_posn; 32 | char n_sign_posn; 33 | }; 34 | 35 | char *setlocale(int, const char *); 36 | struct lconv *localeconv(void); 37 | 38 | #endif /* __LOCALE */ 39 | -------------------------------------------------------------------------------- /include/symbolic/irix/math.h: -------------------------------------------------------------------------------- 1 | #ifndef __MATH 2 | #define __MATH 3 | 4 | #define HUGE_VAL 1.79769313486231570000e+308 5 | 6 | extern double acos(double); 7 | extern double asin(double); 8 | extern double atan(double); 9 | extern double atan2(double, double); 10 | extern double cos(double); 11 | extern double sin(double); 12 | extern double tan(double); 13 | extern double cosh(double); 14 | extern double sinh(double); 15 | extern double tanh(double); 16 | extern double exp(double); 17 | extern double frexp(double, int *); 18 | extern double ldexp(double, int); 19 | extern double log(double); 20 | extern double log10(double); 21 | extern double modf(double, double *); 22 | extern double pow(double, double); 23 | extern double sqrt(double); 24 | extern double ceil(double); 25 | extern double fabs(double); 26 | extern double floor(double); 27 | extern double fmod(double, double); 28 | 29 | #endif /* __MATH */ 30 | -------------------------------------------------------------------------------- /include/symbolic/irix/setjmp.h: -------------------------------------------------------------------------------- 1 | #ifndef __SETJMP 2 | #define __SETJMP 3 | 4 | 5 | 6 | 7 | typedef int jmp_buf[28]; 8 | int setjmp(jmp_buf); 9 | void longjmp(jmp_buf, int); 10 | 11 | #endif /* __SETJMP */ 12 | -------------------------------------------------------------------------------- /include/symbolic/irix/signal.h: -------------------------------------------------------------------------------- 1 | #ifndef __SIGNAL 2 | #define __SIGNAL 3 | 4 | typedef int sig_atomic_t; 5 | 6 | #define SIG_DFL ((void (*)(int))0) 7 | #define SIG_ERR ((void (*)(int))-1) 8 | #define SIG_IGN ((void (*)(int))1) 9 | 10 | #define SIGABRT 6 11 | #define SIGFPE 8 12 | #define SIGILL 4 13 | #define SIGINT 2 14 | #define SIGSEGV 11 15 | #define SIGTERM 15 16 | 17 | void (*signal(int, void (*)(int)))(int); 18 | int raise(int); 19 | 20 | #endif /* __SIGNAL */ 21 | -------------------------------------------------------------------------------- /include/symbolic/irix/stdarg.h: -------------------------------------------------------------------------------- 1 | #ifndef __STDARG 2 | #define __STDARG 3 | 4 | #if !defined(_VA_LIST) && !defined(__VA_LIST_DEFINED) 5 | #define _VA_LIST 6 | #define _VA_LIST_DEFINED 7 | typedef char *__va_list; 8 | #endif 9 | static float __va_arg_tmp; 10 | typedef __va_list va_list; 11 | 12 | #define va_start(list, start) ((void)((list) = (sizeof(start)<4 ? \ 13 | (char *)((int *)&(start)+1) : (char *)(&(start)+1)))) 14 | #define __va_arg(list, mode, n) (\ 15 | __typecode(mode)==1 && sizeof(mode)==4 ? \ 16 | (__va_arg_tmp = *(double *)(&(list += ((sizeof(double)+n)&~n))[-(int)((sizeof(double)+n)&~n)]), \ 17 | *(mode *)&__va_arg_tmp) : \ 18 | *(mode *)(&(list += ((sizeof(mode)+n)&~n))[-(int)((sizeof(mode)+n)&~n)])) 19 | #define _bigendian_va_arg(list, mode, n) (\ 20 | sizeof(mode)==1 ? *(mode *)(&(list += 4)[-1]) : \ 21 | sizeof(mode)==2 ? *(mode *)(&(list += 4)[-2]) : __va_arg(list, mode, n)) 22 | #define _littleendian_va_arg(list, mode, n) __va_arg(list, mode, n) 23 | #define va_end(list) ((void)0) 24 | #define va_arg(list, mode) (sizeof(mode)==8 ? \ 25 | *(mode *)(&(list = (char*)(((int)list + 15)&~7U))[-8]) : \ 26 | _bigendian_va_arg(list, mode, 3U)) 27 | #endif 28 | -------------------------------------------------------------------------------- /include/symbolic/irix/stddef.h: -------------------------------------------------------------------------------- 1 | #ifndef __STDDEF 2 | #define __STDDEF 3 | 4 | /* $Id$ */ 5 | 6 | #ifndef NULL 7 | #define NULL ((void*)0) 8 | #endif 9 | #define offsetof(ty,mem) ((size_t)((char*)&((ty*)0)->mem - (char*)0)) 10 | 11 | typedef long ptrdiff_t; 12 | 13 | #if !defined(_SIZE_T) && !defined(_SIZE_T_) && !defined(_SIZE_T_DEFINED) 14 | #define _SIZE_T 15 | #define _SIZE_T_ 16 | #define _SIZE_T_DEFINED 17 | typedef unsigned long size_t; 18 | #endif 19 | 20 | #if !defined(_WCHAR_T) && !defined(_WCHAR_T_) && !defined(_WCHAR_T_DEFINED) 21 | #define _WCHAR_T 22 | #define _WCHAR_T_ 23 | #define _WCHAR_T_DEFINED 24 | #if (_WCHAR_T_SIZE + 0) == 1 25 | typedef unsigned char wchar_t; 26 | #elif (_WCHAR_T_SIZE + 0) == 2 27 | typedef unsigned short wchar_t; 28 | #elif (_WCHAR_T_SIZE + 0) == 4 29 | typedef unsigned int wchar_t; 30 | #else 31 | typedef unsigned short wchar_t; 32 | #endif 33 | #endif 34 | 35 | #endif /* __STDDEF */ 36 | -------------------------------------------------------------------------------- /include/symbolic/irix/stdlib.h: -------------------------------------------------------------------------------- 1 | #ifndef __STDLIB 2 | #define __STDLIB 3 | 4 | #define EXIT_FAILURE 1 5 | #define EXIT_SUCCESS 0 6 | #define MB_CUR_MAX 1 7 | #ifndef NULL 8 | #define NULL ((void*)0) 9 | #endif 10 | #define RAND_MAX 32767 11 | 12 | typedef struct { int quot, rem; } div_t; 13 | typedef struct { long quot, rem; } ldiv_t; 14 | 15 | #if !defined(_SIZE_T) && !defined(_SIZE_T_) && !defined(_SIZE_T_DEFINED) 16 | #define _SIZE_T 17 | #define _SIZE_T_ 18 | #define _SIZE_T_DEFINED 19 | typedef unsigned long size_t; 20 | #endif 21 | 22 | #if !defined(_WCHAR_T) && !defined(_WCHAR_T_) && !defined(_WCHAR_T_DEFINED) 23 | #define _WCHAR_T 24 | #define _WCHAR_T_ 25 | #define _WCHAR_T_DEFINED 26 | #if (_WCHAR_T_SIZE + 0) == 1 27 | typedef unsigned char wchar_t; 28 | #elif (_WCHAR_T_SIZE + 0) == 2 29 | typedef unsigned short wchar_t; 30 | #elif (_WCHAR_T_SIZE + 0) == 4 31 | typedef unsigned int wchar_t; 32 | #else 33 | typedef unsigned short wchar_t; 34 | #endif 35 | #endif 36 | 37 | extern double atof(const char *); 38 | extern int atoi(const char *); 39 | extern long int atol(const char *); 40 | extern double strtod(const char *, char **); 41 | extern long int strtol(const char *, char **, int); 42 | extern unsigned long int strtoul(const char *, char **, int); 43 | extern int rand(void); 44 | extern void srand(unsigned int); 45 | extern void *calloc(size_t, size_t); 46 | extern void free(void *); 47 | extern void *malloc(size_t); 48 | extern void *realloc(void *, size_t); 49 | extern void abort(void); 50 | extern int atexit(void (*)(void)); 51 | extern void exit(int); 52 | extern char *getenv(const char *); 53 | extern int system(const char *); 54 | extern void *bsearch(const void *, const void *, size_t, size_t, int (*)(const void *, const void *)); 55 | extern void qsort(void *, size_t, size_t, int (*)(const void *, const void *)); 56 | extern int abs(int); 57 | extern div_t div(int, int); 58 | extern long int labs(long int); 59 | extern ldiv_t ldiv(long int, long int); 60 | extern int mblen(const char *, size_t); 61 | extern int mbtowc(wchar_t *, const char *, size_t); 62 | extern int wctomb(char *, wchar_t); 63 | extern size_t mbstowcs(wchar_t *, const char *, size_t); 64 | extern size_t wcstombs(char *, const wchar_t *, size_t); 65 | 66 | #endif /* __STDLIB */ 67 | -------------------------------------------------------------------------------- /include/symbolic/irix/string.h: -------------------------------------------------------------------------------- 1 | #ifndef __STRING 2 | #define __STRING 3 | 4 | #ifndef NULL 5 | #define NULL ((void*)0) 6 | #endif 7 | 8 | #if !defined(_SIZE_T) && !defined(_SIZE_T_) && !defined(_SIZE_T_DEFINED) 9 | #define _SIZE_T 10 | #define _SIZE_T_ 11 | #define _SIZE_T_DEFINED 12 | typedef unsigned long size_t; 13 | #endif 14 | 15 | void *memcpy(void *, const void *, size_t); 16 | void *memmove(void *, const void *, size_t); 17 | char *strcpy(char *, const char *); 18 | char *strncpy(char *, const char *, size_t); 19 | char *strcat(char *, const char *); 20 | char *strncat(char *, const char *, size_t); 21 | int memcmp(const void *, const void *, size_t); 22 | int strcmp(const char *, const char *); 23 | int strcoll(const char *, const char *); 24 | int strncmp(const char *, const char *, size_t); 25 | size_t strxfrm(char *, const char *, size_t); 26 | void *memchr(const void *, int, size_t); 27 | char *strchr(const char *, int); 28 | size_t strcspn(const char *, const char *); 29 | char *strpbrk(const char *, const char *); 30 | char *strrchr(const char *, int); 31 | size_t strspn(const char *, const char *); 32 | char *strstr(const char *, const char *); 33 | char *strtok(char *, const char *); 34 | void *memset(void *, int, size_t); 35 | char *strerror(int); 36 | size_t strlen(const char *); 37 | 38 | #endif /* __STRING */ 39 | -------------------------------------------------------------------------------- /include/symbolic/irix/time.h: -------------------------------------------------------------------------------- 1 | #ifndef __TIME 2 | #define __TIME 3 | 4 | #define CLOCKS_PER_SEC 1000000 5 | #ifndef NULL 6 | #define NULL ((void*)0) 7 | #endif 8 | 9 | #if !defined(_CLOCK_T) && !defined(_CLOCK_T_) && !defined(_CLOCK_T_DEFINED) 10 | #define _CLOCK_T 11 | #define _CLOCK_T_ 12 | #define _CLOCK_T_DEFINED 13 | typedef long clock_t; 14 | #endif 15 | 16 | #if !defined(_TIME_T) && !defined(_TIME_T_) && !defined(_TIME_T_DEFINED) 17 | #define _TIME_T 18 | #define _TIME_T_ 19 | #define _TIME_T_DEFINED 20 | typedef long time_t; 21 | #endif 22 | 23 | #if !defined(_SIZE_T) && !defined(_SIZE_T_) && !defined(_SIZE_T_DEFINED) 24 | #define _SIZE_T 25 | #define _SIZE_T_ 26 | #define _SIZE_T_DEFINED 27 | typedef unsigned long size_t; 28 | #endif 29 | 30 | struct tm { 31 | int tm_sec; 32 | int tm_min; 33 | int tm_hour; 34 | int tm_mday; 35 | int tm_mon; 36 | int tm_year; 37 | int tm_wday; 38 | int tm_yday; 39 | int tm_isdst; 40 | }; 41 | extern clock_t clock(void); 42 | extern double difftime(time_t, time_t); 43 | extern time_t mktime(struct tm *); 44 | extern time_t time(time_t *); 45 | extern char *asctime(const struct tm *); 46 | extern char *ctime(const time_t *); 47 | extern struct tm *gmtime(const time_t *); 48 | extern struct tm *localtime(const time_t *); 49 | extern size_t strftime(char *, size_t, const char *, const struct tm *); 50 | 51 | #endif /* __TIME */ 52 | -------------------------------------------------------------------------------- /include/x86/linux/assert.h: -------------------------------------------------------------------------------- 1 | #ifndef __ASSERT 2 | #define __ASSERT 3 | 4 | void assert(int); 5 | 6 | #endif /* __ASSERT */ 7 | 8 | #undef assert 9 | #ifdef NDEBUG 10 | #define assert(ignore) ((void)0) 11 | #else 12 | extern int _assert(char *, char *, unsigned); 13 | #define assert(e) ((void)((e)||_assert(#e, __FILE__, __LINE__))) 14 | #endif /* NDEBUG */ 15 | -------------------------------------------------------------------------------- /include/x86/linux/float.h: -------------------------------------------------------------------------------- 1 | #ifndef __FLOAT 2 | #define __FLOAT 3 | 4 | #define FLT_ROUNDS (__flt_rounds()) 5 | #define FLT_RADIX 2 6 | 7 | #define FLT_DIG 6 8 | #define FLT_EPSILON 1.19209289550781250000e-07 9 | #define FLT_MANT_DIG 24 10 | #define FLT_MAX 3.40282346638528860000e+38 11 | #define FLT_MAX_10_EXP 38 12 | #define FLT_MAX_EXP 128 13 | #define FLT_MIN 1.17549435082228750000e-38 14 | #define FLT_MIN_10_EXP -37 15 | #define FLT_MIN_EXP -125 16 | 17 | #define DBL_DIG 15 18 | #define DBL_EPSILON 2.22044604925031310000e-16 19 | #define DBL_MANT_DIG 53 20 | #define DBL_MAX 1.79769313486231570000e+308 21 | #define DBL_MAX_10_EXP 308 22 | #define DBL_MAX_EXP 1024 23 | #define DBL_MIN 2.22507385850720140000e-308 24 | #define DBL_MIN_10_EXP -307 25 | #define DBL_MIN_EXP -1021 26 | 27 | #define LDBL_MANT_DIG DBL_MANT_DIG 28 | #define LDBL_EPSILON DBL_EPSILON 29 | #define LDBL_DIG DBL_DIG 30 | #define LDBL_MIN_EXP DBL_MIN_EXP 31 | #define LDBL_MIN DBL_MIN 32 | #define LDBL_MIN_10_EXP DBL_MIN_10_EXP 33 | #define LDBL_MAX_EXP DBL_MAX_EXP 34 | #define LDBL_MAX DBL_MAX 35 | #define LDBL_MAX_10_EXP DBL_MAX_10_EXP 36 | 37 | #endif /* __FLOAT */ 38 | -------------------------------------------------------------------------------- /include/x86/linux/limits.h: -------------------------------------------------------------------------------- 1 | #ifndef __LIMITS 2 | #define __LIMITS 3 | 4 | #define CHAR_BIT 8 5 | #define MB_LEN_MAX 1 6 | 7 | #define UCHAR_MAX 0xff 8 | #define USHRT_MAX 0xffff 9 | #define UINT_MAX (~0U) 10 | #define ULONG_MAX (~0UL) 11 | 12 | #define SCHAR_MAX 0x7f 13 | #define SHRT_MAX 0x7fff 14 | #define INT_MAX 0x7fffffff 15 | #define LONG_MAX 0x7fffffffL 16 | 17 | #define SCHAR_MIN (-SCHAR_MAX-1) 18 | #define SHRT_MIN (-SHRT_MAX-1) 19 | #define INT_MIN (-INT_MAX-1) 20 | #define LONG_MIN (-LONG_MAX-1) 21 | 22 | #ifdef __CHAR_UNSIGNED__ 23 | #define CHAR_MAX UCHAR_MAX 24 | #define CHAR_MIN 0 25 | #else 26 | #define CHAR_MAX SCHAR_MAX 27 | #define CHAR_MIN SCHAR_MIN 28 | #endif 29 | 30 | #endif /* __LIMITS */ 31 | -------------------------------------------------------------------------------- /include/x86/linux/math.h: -------------------------------------------------------------------------------- 1 | #ifndef __MATH 2 | #define __MATH 3 | 4 | #define HUGE_VAL 1.79769313486231570000e+308 5 | 6 | extern double acos(double); 7 | extern double asin(double); 8 | extern double atan(double); 9 | extern double atan2(double, double); 10 | extern double cos(double); 11 | extern double sin(double); 12 | extern double tan(double); 13 | extern double cosh(double); 14 | extern double sinh(double); 15 | extern double tanh(double); 16 | extern double exp(double); 17 | extern double frexp(double, int *); 18 | extern double ldexp(double, int); 19 | extern double log(double); 20 | extern double log10(double); 21 | extern double modf(double, double *); 22 | extern double pow(double, double); 23 | extern double sqrt(double); 24 | extern double ceil(double); 25 | extern double fabs(double); 26 | extern double floor(double); 27 | extern double fmod(double, double); 28 | 29 | #endif /* __MATH */ 30 | -------------------------------------------------------------------------------- /include/x86/linux/stdarg.h: -------------------------------------------------------------------------------- 1 | #ifndef __STDARG 2 | #define __STDARG 3 | 4 | #if !defined(_VA_LIST) && !defined(__VA_LIST_DEFINED) 5 | #define _VA_LIST 6 | #define _VA_LIST_DEFINED 7 | typedef char *__va_list; 8 | #endif 9 | static float __va_arg_tmp; 10 | typedef __va_list va_list; 11 | 12 | #define va_start(list, start) ((void)((list) = (sizeof(start)<4 ? \ 13 | (char *)((int *)&(start)+1) : (char *)(&(start)+1)))) 14 | #define __va_arg(list, mode, n) (\ 15 | __typecode(mode)==1 && sizeof(mode)==4 ? \ 16 | (__va_arg_tmp = *(double *)(&(list += ((sizeof(double)+n)&~n))[-(int)((sizeof(double)+n)&~n)]), \ 17 | *(mode *)&__va_arg_tmp) : \ 18 | *(mode *)(&(list += ((sizeof(mode)+n)&~n))[-(int)((sizeof(mode)+n)&~n)])) 19 | #define _bigendian_va_arg(list, mode, n) (\ 20 | sizeof(mode)==1 ? *(mode *)(&(list += 4)[-1]) : \ 21 | sizeof(mode)==2 ? *(mode *)(&(list += 4)[-2]) : __va_arg(list, mode, n)) 22 | #define _littleendian_va_arg(list, mode, n) __va_arg(list, mode, n) 23 | #define va_end(list) ((void)0) 24 | #define va_arg(list, mode) _littleendian_va_arg(list, mode, 3U) 25 | typedef void *__gnuc_va_list; 26 | #endif 27 | -------------------------------------------------------------------------------- /lburg/lburg.h: -------------------------------------------------------------------------------- 1 | #ifndef BURG_INCLUDED 2 | #define BURG_INCLUDED 3 | 4 | /* $Id$ */ 5 | /* iburg.c: */ 6 | extern void *alloc(int nbytes); 7 | 8 | typedef enum { TERM=1, NONTERM } Kind; 9 | typedef struct rule *Rule; 10 | typedef struct term *Term; 11 | struct term { /* terminals: */ 12 | char *name; /* terminal name */ 13 | Kind kind; /* TERM */ 14 | int esn; /* external symbol number */ 15 | int arity; /* operator arity */ 16 | Term link; /* next terminal in esn order */ 17 | Rule rules; /* rules whose pattern starts with term */ 18 | }; 19 | 20 | typedef struct nonterm *Nonterm; 21 | struct nonterm { /* nonterminals: */ 22 | char *name; /* nonterminal name */ 23 | Kind kind; /* NONTERM */ 24 | int number; /* identifying number */ 25 | int lhscount; /* # times nt appears in a rule lhs */ 26 | int reached; /* 1 iff reached from start nonterminal */ 27 | Rule rules; /* rules w/nonterminal on lhs */ 28 | Rule chain; /* chain rules w/nonterminal on rhs */ 29 | Nonterm link; /* next terminal in number order */ 30 | }; 31 | extern Nonterm nonterm(char *id); 32 | extern Term term(char *id, int esn); 33 | 34 | typedef struct tree *Tree; 35 | struct tree { /* tree patterns: */ 36 | void *op; /* a terminal or nonterminal */ 37 | Tree left, right; /* operands */ 38 | int nterms; /* number of terminal nodes in this tree */ 39 | }; 40 | extern Tree tree(char *op, Tree left, Tree right); 41 | 42 | struct rule { /* rules: */ 43 | Nonterm lhs; /* lefthand side nonterminal */ 44 | Tree pattern; /* rule pattern */ 45 | int ern; /* external rule number */ 46 | int packed; /* packed external rule number */ 47 | int cost; /* cost, if a constant */ 48 | char *code; /* cost, if an expression */ 49 | char *template; /* assembler template */ 50 | Rule link; /* next rule in ern order */ 51 | Rule next; /* next rule with same pattern root */ 52 | Rule chain; /* next chain rule with same rhs */ 53 | Rule decode; /* next rule with same lhs */ 54 | Rule kids; /* next rule with same _kids pattern */ 55 | }; 56 | extern Rule rule(char *id, Tree pattern, char *template, char *code); 57 | 58 | /* gram.y: */ 59 | void yyerror(char *fmt, ...); 60 | int yyparse(void); 61 | void yywarn(char *fmt, ...); 62 | extern int errcnt; 63 | extern FILE *infp; 64 | extern FILE *outfp; 65 | 66 | #endif 67 | -------------------------------------------------------------------------------- /lib/assert.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #ifndef EXPORT 4 | #define EXPORT 5 | #endif 6 | 7 | static char rcsid[] = "$Id$"; 8 | 9 | EXPORT int _assert(char *e, char *file, int line) { 10 | fprintf(stderr, "assertion failed:"); 11 | if (e) 12 | fprintf(stderr, " %s", e); 13 | if (file) 14 | fprintf(stderr, " file %s", file); 15 | fprintf(stderr, " line %d\n", line); 16 | fflush(stderr); 17 | abort(); 18 | return 0; 19 | } 20 | -------------------------------------------------------------------------------- /lib/yynull.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #ifndef EXPORT 4 | #define EXPORT 5 | #endif 6 | 7 | static char rcsid[] = "$Id$"; 8 | 9 | EXPORT void _YYnull(char *file, int line) { 10 | fprintf(stderr, "null pointer dereferenced:"); 11 | if (file) 12 | fprintf(stderr, " file %s,", file); 13 | fprintf(stderr, " line %d\n", line); 14 | fflush(stderr); 15 | abort(); 16 | } 17 | -------------------------------------------------------------------------------- /mips/irix/tst/8q.1bk: -------------------------------------------------------------------------------- 1 | 1 5 8 6 3 7 2 4 2 | 1 6 8 3 7 4 2 5 3 | 1 7 4 6 8 2 5 3 4 | 1 7 5 8 2 4 6 3 5 | 2 4 6 8 3 1 7 5 6 | 2 5 7 1 3 8 6 4 7 | 2 5 7 4 1 8 6 3 8 | 2 6 1 7 4 8 3 5 9 | 2 6 8 3 1 4 7 5 10 | 2 7 3 6 8 5 1 4 11 | 2 7 5 8 1 4 6 3 12 | 2 8 6 1 3 5 7 4 13 | 3 1 7 5 8 2 4 6 14 | 3 5 2 8 1 7 4 6 15 | 3 5 2 8 6 4 7 1 16 | 3 5 7 1 4 2 8 6 17 | 3 5 8 4 1 7 2 6 18 | 3 6 2 5 8 1 7 4 19 | 3 6 2 7 1 4 8 5 20 | 3 6 2 7 5 1 8 4 21 | 3 6 4 1 8 5 7 2 22 | 3 6 4 2 8 5 7 1 23 | 3 6 8 1 4 7 5 2 24 | 3 6 8 1 5 7 2 4 25 | 3 6 8 2 4 1 7 5 26 | 3 7 2 8 5 1 4 6 27 | 3 7 2 8 6 4 1 5 28 | 3 8 4 7 1 6 2 5 29 | 4 1 5 8 2 7 3 6 30 | 4 1 5 8 6 3 7 2 31 | 4 2 5 8 6 1 3 7 32 | 4 2 7 3 6 8 1 5 33 | 4 2 7 3 6 8 5 1 34 | 4 2 7 5 1 8 6 3 35 | 4 2 8 5 7 1 3 6 36 | 4 2 8 6 1 3 5 7 37 | 4 6 1 5 2 8 3 7 38 | 4 6 8 2 7 1 3 5 39 | 4 6 8 3 1 7 5 2 40 | 4 7 1 8 5 2 6 3 41 | 4 7 3 8 2 5 1 6 42 | 4 7 5 2 6 1 3 8 43 | 4 7 5 3 1 6 8 2 44 | 4 8 1 3 6 2 7 5 45 | 4 8 1 5 7 2 6 3 46 | 4 8 5 3 1 7 2 6 47 | 5 1 4 6 8 2 7 3 48 | 5 1 8 4 2 7 3 6 49 | 5 1 8 6 3 7 2 4 50 | 5 2 4 6 8 3 1 7 51 | 5 2 4 7 3 8 6 1 52 | 5 2 6 1 7 4 8 3 53 | 5 2 8 1 4 7 3 6 54 | 5 3 1 6 8 2 4 7 55 | 5 3 1 7 2 8 6 4 56 | 5 3 8 4 7 1 6 2 57 | 5 7 1 3 8 6 4 2 58 | 5 7 1 4 2 8 6 3 59 | 5 7 2 4 8 1 3 6 60 | 5 7 2 6 3 1 4 8 61 | 5 7 2 6 3 1 8 4 62 | 5 7 4 1 3 8 6 2 63 | 5 8 4 1 3 6 2 7 64 | 5 8 4 1 7 2 6 3 65 | 6 1 5 2 8 3 7 4 66 | 6 2 7 1 3 5 8 4 67 | 6 2 7 1 4 8 5 3 68 | 6 3 1 7 5 8 2 4 69 | 6 3 1 8 4 2 7 5 70 | 6 3 1 8 5 2 4 7 71 | 6 3 5 7 1 4 2 8 72 | 6 3 5 8 1 4 2 7 73 | 6 3 7 2 4 8 1 5 74 | 6 3 7 2 8 5 1 4 75 | 6 3 7 4 1 8 2 5 76 | 6 4 1 5 8 2 7 3 77 | 6 4 2 8 5 7 1 3 78 | 6 4 7 1 3 5 2 8 79 | 6 4 7 1 8 2 5 3 80 | 6 8 2 4 1 7 5 3 81 | 7 1 3 8 6 4 2 5 82 | 7 2 4 1 8 5 3 6 83 | 7 2 6 3 1 4 8 5 84 | 7 3 1 6 8 5 2 4 85 | 7 3 8 2 5 1 6 4 86 | 7 4 2 5 8 1 3 6 87 | 7 4 2 8 6 1 3 5 88 | 7 5 3 1 6 8 2 4 89 | 8 2 4 1 7 5 3 6 90 | 8 2 5 3 1 7 4 6 91 | 8 3 1 6 2 5 7 4 92 | 8 4 1 3 6 2 7 5 93 | -------------------------------------------------------------------------------- /mips/irix/tst/8q.2bk: -------------------------------------------------------------------------------- 1 | tst/8q.c:30: warning: missing return value 2 | tst/8q.c:39: warning: missing return value 3 | -------------------------------------------------------------------------------- /mips/irix/tst/array.1bk: -------------------------------------------------------------------------------- 1 | 0 1 2 3 1000 1001 1002 1003 2000 2001 2002 2003 2 | 0 1 2 3 1000 1001 1002 1003 2000 2001 2002 2003 3 | 0 1 2 3 1000 1001 1002 1003 2000 2001 2002 2003 4 | 0 1 2 3 1000 1001 1002 1003 2000 2001 2002 2003 5 | -------------------------------------------------------------------------------- /mips/irix/tst/array.2bk: -------------------------------------------------------------------------------- 1 | tst/array.c:33: warning: missing return value 2 | tst/array.c:48: warning: missing return value 3 | -------------------------------------------------------------------------------- /mips/irix/tst/cf.1bk: -------------------------------------------------------------------------------- 1 | char freq 2 | 011 8.1 3 | 012 6.1 4 | 040 11.9 5 | ! 0.2 6 | " 1.5 7 | % 0.6 8 | & 0.4 9 | ' 0.4 10 | ( 2.9 11 | ) 2.9 12 | * 0.8 13 | + 1.3 14 | , 1.3 15 | - 0.4 16 | . 0.6 17 | / 1.0 18 | 0 2.5 19 | 1 1.9 20 | 2 0.6 21 | 3 0.2 22 | 7 0.4 23 | 8 0.2 24 | ; 3.8 25 | < 0.8 26 | = 2.7 27 | > 0.2 28 | [ 1.5 29 | \ 0.8 30 | ] 1.5 31 | a 3.1 32 | c 4.4 33 | e 2.3 34 | f 6.0 35 | g 1.3 36 | h 1.0 37 | i 5.0 38 | l 1.0 39 | m 0.2 40 | n 3.3 41 | o 2.1 42 | p 1.0 43 | q 0.4 44 | r 4.2 45 | s 0.6 46 | t 3.8 47 | u 1.2 48 | v 0.6 49 | w 0.2 50 | { 0.6 51 | } 0.6 52 | -------------------------------------------------------------------------------- /mips/irix/tst/cf.2bk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drh/lcc/2b5cf358d9aa6759923dd7461f2df7f7f2a28471/mips/irix/tst/cf.2bk -------------------------------------------------------------------------------- /mips/irix/tst/cq.1bk: -------------------------------------------------------------------------------- 1 | Section s22 returned 0. 2 | Decimal and octal/hex constants sometimes give 3 | different results when assigned to longs. 4 | Decimal and octal/hex constants sometimes give 5 | different results when assigned to longs. 6 | Section s241 returned 0. 7 | Section s243 returned 0. 8 | Section s244 returned 0. 9 | Section s25 returned 0. 10 | 8 bits in chars. 11 | 32 bits in ints. 12 | 16 bits in shorts. 13 | 32 bits in longs. 14 | 32 bits in unsigneds. 15 | 32 bits in floats. 16 | 64 bits in doubles. 17 | 1.192093e-07 is the least number that can be added to 1. (float). 18 | 2.220446e-16 is the least number that can be added to 1. (double). 19 | Section s26 returned 0. 20 | Section s4 returned 0. 21 | Section s61 returned 0. 22 | Section s626 returned 0. 23 | Section s71 returned 0. 24 | Section s72 returned 0. 25 | Section s757 returned 0. 26 | Section s7813 returned 0. 27 | Section s714 returned 0. 28 | Section s715 returned 0. 29 | Register count for char is unreliable. 30 | Register count for pointer is unreliable. 31 | Register count for int is unreliable. 32 | Section s81 returned 0. 33 | Section s84 returned 0. 34 | char alignment: 1 35 | short alignment: 2 36 | int alignment: 4 37 | long alignment: 4 38 | unsigned alignment: 4 39 | float alignment: 4 40 | double alignment: 8 41 | Sign extension in fields 42 | Be especially careful with 1-bit fields! 43 | Section s85 returned 0. 44 | Section s86 returned 0. 45 | Section s88 returned 0. 46 | Section s9 returned 0. 47 | 48 | No errors detected. 49 | -------------------------------------------------------------------------------- /mips/irix/tst/cq.2bk: -------------------------------------------------------------------------------- 1 | tst/cq.c:394: warning: overflow in converting constant expression from `unsigned long' to `long int' 2 | tst/cq.c:394: warning: overflow in converting constant expression from `unsigned long' to `long int' 3 | tst/cq.c:394: warning: overflow in converting constant expression from `unsigned long' to `long int' 4 | tst/cq.c:395: warning: overflow in constant `4294967296' 5 | tst/cq.c:395: warning: overflow in converting constant expression from `unsigned long' to `long int' 6 | tst/cq.c:395: warning: overflow in constant `040000000000' 7 | tst/cq.c:395: warning: overflow in converting constant expression from `unsigned long' to `long int' 8 | tst/cq.c:395: warning: overflow in constant `0x100000000' 9 | tst/cq.c:395: warning: overflow in converting constant expression from `unsigned long' to `long int' 10 | tst/cq.c:396: warning: overflow in constant `68719476735' 11 | tst/cq.c:396: warning: overflow in converting constant expression from `unsigned long' to `long int' 12 | tst/cq.c:396: warning: overflow in constant `0777777777777' 13 | tst/cq.c:396: warning: overflow in converting constant expression from `unsigned long' to `long int' 14 | tst/cq.c:396: warning: overflow in constant `0xfffffffff' 15 | tst/cq.c:396: warning: overflow in converting constant expression from `unsigned long' to `long int' 16 | tst/cq.c:397: warning: overflow in constant `68719476736' 17 | tst/cq.c:397: warning: overflow in converting constant expression from `unsigned long' to `long int' 18 | tst/cq.c:397: warning: overflow in constant `01000000000000' 19 | tst/cq.c:397: warning: overflow in converting constant expression from `unsigned long' to `long int' 20 | tst/cq.c:397: warning: overflow in constant `0x1000000000' 21 | tst/cq.c:397: warning: overflow in converting constant expression from `unsigned long' to `long int' 22 | tst/cq.c:533: warning: missing return value 23 | tst/cq.c:1169: warning: missing return value 24 | tst/cq.c:5294: warning: unreachable code 25 | tst/cq.c:5303: warning: missing return value 26 | -------------------------------------------------------------------------------- /mips/irix/tst/cvt.1bk: -------------------------------------------------------------------------------- 1 | 1 1 1 1 1 1 1 1 1.000000 1.000000 1.000000 2 | 2 2 2 2 2 2 2 2 2.000000 2.000000 2.000000 3 | 3 3 3 3 3 3 3 3 3.000000 3.000000 3.000000 4 | 4 4 4 4 4 4 4 4 4.000000 4.000000 4.000000 5 | 5 5 5 5 5 5 5 5 5.000000 5.000000 5.000000 6 | 6 6 6 6 6 6 6 6 6.000000 6.000000 6.000000 7 | 7 7 7 7 7 7 7 7 7.000000 7.000000 7.000000 8 | 8 8 8 8 8 8 8 8 8.000000 8.000000 8.000000 9 | 9 9 9 9 9 9 9 9 9.000000 9.000000 9.000000 10 | 10 10 10 10 10 10 10 10 10.000000 10.000000 10.000000 11 | 11 11 11 11 11 11 11 11 11.000000 11.000000 11.000000 12 | -------------------------------------------------------------------------------- /mips/irix/tst/cvt.2bk: -------------------------------------------------------------------------------- 1 | tst/cvt.c:32: warning: conversion from `pointer to void function(void)' to `pointer to void' is compiler dependent 2 | tst/cvt.c:33: warning: conversion from `pointer to void' to `pointer to void function(void)' is compiler dependent 3 | -------------------------------------------------------------------------------- /mips/irix/tst/fields.1bk: -------------------------------------------------------------------------------- 1 | x = 1 2 3 4 -3 6 2 | y = 3 8 9 3 | x = 1 2 3 0 0 6 4 | y = 2 8 16 5 | p->a = 0x3, p->b = 0xf 6 | -------------------------------------------------------------------------------- /mips/irix/tst/fields.2bk: -------------------------------------------------------------------------------- 1 | tst/fields.c:6: warning: initializer exceeds bit-field width 2 | tst/fields.c:8: warning: initializer exceeds bit-field width 3 | tst/fields.c:30: warning: missing return value 4 | tst/fields.c:34: warning: missing return value 5 | -------------------------------------------------------------------------------- /mips/irix/tst/front.2bk: -------------------------------------------------------------------------------- 1 | tst/front.c:3: warning: missing return value 2 | tst/front.c:10: warning: missing return value 3 | tst/front.c:20: type error in argument 1 to `s'; found `pointer to struct D' expected `pointer to incomplete struct D defined at tst/front.c:14' 4 | tst/front.c:21: warning: missing return value 5 | tst/front.c:32: warning: missing return value 6 | tst/front.c:36: operands of = have illegal types `pointer to int' and `pointer to const int' 7 | tst/front.c:38: warning: missing return value 8 | tst/front.c:62: operands of = have illegal types `pointer to char' and `pointer to const void' 9 | tst/front.c:63: warning: missing return value 10 | tst/front.c:68: warning: missing return value 11 | tst/front.c:69: warning: inconsistent linkage for `yy' previously declared at tst/front.c:68 12 | tst/front.c:69: warning: missing return value 13 | tst/front.c:71: invalid storage class `static' for `int function goo' 14 | tst/front.c:71: warning: declaration of `goo' does not match previous declaration at tst/front.c:70 15 | tst/front.c:71: warning: missing return value 16 | tst/front.c:74: warning: declaration of `xr' does not match previous declaration at tst/front.c:72 17 | tst/front.c:74: warning: missing return value 18 | tst/front.c:81: warning: missing return value 19 | tst/front.c:82: warning: declaration of `ss2' does not match previous declaration at tst/front.c:81 20 | tst/front.c:84: warning: inconsistent linkage for `ss5' previously declared at tst/front.c:80 21 | tst/front.c:92: type error in argument 1 to `gx1'; found `pointer to double' expected `double' 22 | tst/front.c:92: warning: missing return value 23 | tst/front.c:95: redeclaration of `hx1' previously declared at tst/front.c:94 24 | tst/front.c:98: warning: missing return value 25 | tst/front.c:101: conflicting argument declarations for function `gg1' 26 | tst/front.c:101: warning: missing return value 27 | tst/front.c:112: type error in argument 4 to `qsort'; found `pointer to int function(pointer to pointer to char,pointer to pointer to char)' expected `pointer to int function(pointer to const void,pointer to const void)' 28 | tst/front.c:113: warning: missing return value 29 | tst/front.c:120: warning: missing return value 30 | -------------------------------------------------------------------------------- /mips/irix/tst/incr.2bk: -------------------------------------------------------------------------------- 1 | tst/incr.c:1: warning: missing return value 2 | tst/incr.c:6: warning: expression with no effect elided 3 | tst/incr.c:6: warning: expression with no effect elided 4 | tst/incr.c:11: warning: missing return value 5 | tst/incr.c:16: warning: expression with no effect elided 6 | tst/incr.c:16: warning: expression with no effect elided 7 | tst/incr.c:21: warning: missing return value 8 | tst/incr.c:30: warning: missing return value 9 | tst/incr.c:39: warning: missing return value 10 | -------------------------------------------------------------------------------- /mips/irix/tst/init.1bk: -------------------------------------------------------------------------------- 1 | 1 2 3 4 2 | 5 6 3 | 7 4 | if 5 | for 6 | else 7 | while 8 | 1 2 3 if 9 | 4 5 0 for 10 | 6 7 8 else 11 | 9 10 11 while 12 | 1 2 3 if 13 | 4 5 0 for 14 | 6 7 8 else 15 | 9 10 11 while 16 | 0 0 0 17 | -------------------------------------------------------------------------------- /mips/irix/tst/init.2bk: -------------------------------------------------------------------------------- 1 | tst/init.c:36: warning: missing return value 2 | tst/init.c:49: warning: missing return value 3 | tst/init.c:59: warning: missing return value 4 | -------------------------------------------------------------------------------- /mips/irix/tst/limits.1bk: -------------------------------------------------------------------------------- 1 | UCHAR_MAX: 000000ff=255 2 | USHRT_MAX: 0000ffff=65535 3 | UINT_MAX: ffffffff=-1 4 | ULONG_MAX: ffffffff=-1 5 | CHAR_MAX: 0000007f=127 6 | SCHAR_MAX: 0000007f=127 7 | SHRT_MAX: 00007fff=32767 8 | INT_MAX: 7fffffff=2147483647 9 | LONG_MAX: 7fffffff=2147483647 10 | CHAR_MIN: ffffff80=-128 11 | SCHAR_MIN: ffffff80=-128 12 | SHRT_MIN: ffff8000=-32768 13 | INT_MIN: 80000000=-2147483648 14 | LONG_MIN: 80000000=-2147483648 15 | -------------------------------------------------------------------------------- /mips/irix/tst/limits.2bk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drh/lcc/2b5cf358d9aa6759923dd7461f2df7f7f2a28471/mips/irix/tst/limits.2bk -------------------------------------------------------------------------------- /mips/irix/tst/paranoia.2bk: -------------------------------------------------------------------------------- 1 | tst/paranoia.c:1867: warning: missing return value 2 | tst/paranoia.c:1874: warning: missing return value 3 | tst/paranoia.c:1884: warning: missing return value 4 | tst/paranoia.c:1924: warning: missing return value 5 | tst/paranoia.c:1939: warning: missing return value 6 | tst/paranoia.c:1956: warning: missing return value 7 | tst/paranoia.c:1975: warning: missing return value 8 | tst/paranoia.c:1988: warning: missing return value 9 | tst/paranoia.c:1995: warning: missing return value 10 | tst/paranoia.c:2055: warning: missing return value 11 | tst/paranoia.c:2062: warning: missing return value 12 | tst/paranoia.c:2070: warning: missing return value 13 | tst/paranoia.c:2087: warning: missing return value 14 | tst/paranoia.c:2115: warning: missing return value 15 | tst/paranoia.c:2144: warning: missing return value 16 | tst/paranoia.c:2173: warning: missing return value 17 | -------------------------------------------------------------------------------- /mips/irix/tst/sort.1bk: -------------------------------------------------------------------------------- 1 | exchange(1,9) 2 | exchange(3,7) 3 | exchange(5,6) 4 | exchange(0,5) 5 | exchange(0,3) 6 | exchange(0,0) 7 | exchange(1,2) 8 | exchange(6,6) 9 | exchange(8,9) 10 | exchange(7,8) 11 | -51 12 | -1 13 | 0 14 | 1 15 | 3 16 | 10 17 | 18 18 | 32 19 | 567 20 | 789 21 | -------------------------------------------------------------------------------- /mips/irix/tst/sort.2bk: -------------------------------------------------------------------------------- 1 | tst/sort.c:23: warning: missing return value 2 | tst/sort.c:30: warning: missing return value 3 | tst/sort.c:37: warning: missing return value 4 | tst/sort.c:41: warning: missing return value 5 | tst/sort.c:65: warning: missing return value 6 | -------------------------------------------------------------------------------- /mips/irix/tst/spill.2bk: -------------------------------------------------------------------------------- 1 | tst/spill.c:1: warning: missing return value 2 | tst/spill.c:3: warning: missing return value 3 | tst/spill.c:5: warning: missing return value 4 | tst/spill.c:7: warning: missing return value 5 | tst/spill.c:9: warning: missing return value 6 | tst/spill.c:17: warning: missing return value 7 | -------------------------------------------------------------------------------- /mips/irix/tst/stdarg.1bk: -------------------------------------------------------------------------------- 1 | test 1 2 | test 2 3 | test 3 4 | test 4 5 | test 5.000000 6 | {1 2 3 4} {1 2 3 4} {1 2 3 4} {1 2 3 4} {1 2 3 4} {1 2 3 4} 7 | -------------------------------------------------------------------------------- /mips/irix/tst/stdarg.2bk: -------------------------------------------------------------------------------- 1 | tst/stdarg.c:51: warning: missing return value 2 | -------------------------------------------------------------------------------- /mips/irix/tst/struct.1bk: -------------------------------------------------------------------------------- 1 | (-1,-1) is not within [10,10; 310,310] 2 | (1,1) is not within [10,10; 310,310] 3 | (20,300) is within [10,10; 310,310] 4 | (500,400) is not within [10,10; 310,310] 5 | ab 6 | -------------------------------------------------------------------------------- /mips/irix/tst/struct.2bk: -------------------------------------------------------------------------------- 1 | tst/struct.c:49: warning: missing return value 2 | tst/struct.c:68: warning: missing return value 3 | -------------------------------------------------------------------------------- /mips/irix/tst/switch.1bk: -------------------------------------------------------------------------------- 1 | b = 0x8 2 | f = 0xc 3 | n = 0xa 4 | r = 0xd 5 | t = 0x9 6 | v = 0xb 7 | x = 0x78 8 | f: 9 | x = 0 10 | x = 1 11 | x = 2 12 | x = 2 13 | x = 2 14 | x = 2 15 | x = 2 16 | x = 7 17 | x = 8 18 | x = 9 19 | x = 9 20 | x = 9 21 | x = 9 22 | x = 9 23 | x = 9 24 | x = 9 25 | x = 16 26 | x = 17 27 | x = 18 28 | x = 19 29 | x = 20 30 | g: 31 | 1 1 32 | 1 2 33 | 2 3 34 | 2 4 35 | 2 5 36 | 3 6 37 | d 6 38 | 3 7 39 | d 7 40 | 3 8 41 | d 8 42 | d 9 43 | d 10 44 | h: 45 | i = 8 46 | i = 16 47 | i = 120 48 | i = 128 49 | i = 248 50 | i = 264 51 | i = 272 52 | i = 280 53 | i = 288 54 | i = 296 55 | i = 304 56 | i = 312 57 | 488 defaults 58 | x = 0x1000000 59 | x = 0x2000000 60 | x = 0x3000000 61 | x = 0x4000000 62 | x = 0x5000000 63 | x = 0x6000000 (default) 64 | x = 0x7000000 (default) 65 | 0 66 | 1 67 | 2 68 | 3 69 | 4 70 | 5 71 | 0 72 | 1 73 | 2 74 | 3 75 | 4 76 | 5 77 | -------------------------------------------------------------------------------- /mips/irix/tst/switch.2bk: -------------------------------------------------------------------------------- 1 | tst/switch.c:55: warning: missing return value 2 | tst/switch.c:73: warning: missing return value 3 | tst/switch.c:97: warning: missing return value 4 | tst/switch.c:112: warning: missing return value 5 | tst/switch.c:137: warning: missing return value 6 | -------------------------------------------------------------------------------- /mips/irix/tst/wf1.1bk: -------------------------------------------------------------------------------- 1 | 5 a 2 | 2 and 3 | 5 buf 4 | 16 c 5 | 8 char 6 | 1 compare 7 | 4 cond 8 | 5 count 9 | 1 d 10 | 1 die 11 | 3 else 12 | 1 entry 13 | 1 eof 14 | 4 err 15 | 1 error 16 | 1 exit 17 | 1 folded 18 | 1 for 19 | 1 free 20 | 1 frequencies 21 | 1 frequency 22 | 1 get 23 | 2 getchar 24 | 3 getword 25 | 14 if 26 | 2 in 27 | 1 index 28 | 1 input 29 | 1 install 30 | 8 int 31 | 1 into 32 | 1 is 33 | 4 isletter 34 | 1 it 35 | 1 itself 36 | 5 left 37 | 1 letter 38 | 7 lookup 39 | 1 main 40 | 2 malloc 41 | 1 message 42 | 2 n 43 | 1 necessary 44 | 12 next 45 | 9 node 46 | 4 of 47 | 1 on 48 | 1 or 49 | 1 otherwise 50 | 2 out 51 | 8 p 52 | 3 print 53 | 2 printf 54 | 16 return 55 | 5 right 56 | 4 root 57 | 25 s 58 | 2 storage 59 | 3 strcmp 60 | 1 strcpy 61 | 1 strlen 62 | 8 struct 63 | 1 structures 64 | 2 subtree 65 | 1 t 66 | 5 tprint 67 | 9 tree 68 | 1 uses 69 | 1 version 70 | 1 wf 71 | 3 while 72 | 21 word 73 | 9 words 74 | 2 z 75 | -------------------------------------------------------------------------------- /mips/irix/tst/wf1.2bk: -------------------------------------------------------------------------------- 1 | tst/wf1.c:29: warning: missing return value 2 | tst/wf1.c:87: warning: missing return value 3 | -------------------------------------------------------------------------------- /mips/irix/tst/yacc.1bk: -------------------------------------------------------------------------------- 1 | a 2 | b 3 | load 4 | negate 5 | push 5 6 | c 7 | load 8 | multiply 9 | add 10 | store 11 | -------------------------------------------------------------------------------- /mips/irix/tst/yacc.2bk: -------------------------------------------------------------------------------- 1 | tst/yacc.c:345: warning: missing return value 2 | tst/yacc.c:349: warning: missing return value 3 | tst/yacc.c:360: warning: missing return value 4 | -------------------------------------------------------------------------------- /sparc/solaris/tst/8q.1bk: -------------------------------------------------------------------------------- 1 | 1 5 8 6 3 7 2 4 2 | 1 6 8 3 7 4 2 5 3 | 1 7 4 6 8 2 5 3 4 | 1 7 5 8 2 4 6 3 5 | 2 4 6 8 3 1 7 5 6 | 2 5 7 1 3 8 6 4 7 | 2 5 7 4 1 8 6 3 8 | 2 6 1 7 4 8 3 5 9 | 2 6 8 3 1 4 7 5 10 | 2 7 3 6 8 5 1 4 11 | 2 7 5 8 1 4 6 3 12 | 2 8 6 1 3 5 7 4 13 | 3 1 7 5 8 2 4 6 14 | 3 5 2 8 1 7 4 6 15 | 3 5 2 8 6 4 7 1 16 | 3 5 7 1 4 2 8 6 17 | 3 5 8 4 1 7 2 6 18 | 3 6 2 5 8 1 7 4 19 | 3 6 2 7 1 4 8 5 20 | 3 6 2 7 5 1 8 4 21 | 3 6 4 1 8 5 7 2 22 | 3 6 4 2 8 5 7 1 23 | 3 6 8 1 4 7 5 2 24 | 3 6 8 1 5 7 2 4 25 | 3 6 8 2 4 1 7 5 26 | 3 7 2 8 5 1 4 6 27 | 3 7 2 8 6 4 1 5 28 | 3 8 4 7 1 6 2 5 29 | 4 1 5 8 2 7 3 6 30 | 4 1 5 8 6 3 7 2 31 | 4 2 5 8 6 1 3 7 32 | 4 2 7 3 6 8 1 5 33 | 4 2 7 3 6 8 5 1 34 | 4 2 7 5 1 8 6 3 35 | 4 2 8 5 7 1 3 6 36 | 4 2 8 6 1 3 5 7 37 | 4 6 1 5 2 8 3 7 38 | 4 6 8 2 7 1 3 5 39 | 4 6 8 3 1 7 5 2 40 | 4 7 1 8 5 2 6 3 41 | 4 7 3 8 2 5 1 6 42 | 4 7 5 2 6 1 3 8 43 | 4 7 5 3 1 6 8 2 44 | 4 8 1 3 6 2 7 5 45 | 4 8 1 5 7 2 6 3 46 | 4 8 5 3 1 7 2 6 47 | 5 1 4 6 8 2 7 3 48 | 5 1 8 4 2 7 3 6 49 | 5 1 8 6 3 7 2 4 50 | 5 2 4 6 8 3 1 7 51 | 5 2 4 7 3 8 6 1 52 | 5 2 6 1 7 4 8 3 53 | 5 2 8 1 4 7 3 6 54 | 5 3 1 6 8 2 4 7 55 | 5 3 1 7 2 8 6 4 56 | 5 3 8 4 7 1 6 2 57 | 5 7 1 3 8 6 4 2 58 | 5 7 1 4 2 8 6 3 59 | 5 7 2 4 8 1 3 6 60 | 5 7 2 6 3 1 4 8 61 | 5 7 2 6 3 1 8 4 62 | 5 7 4 1 3 8 6 2 63 | 5 8 4 1 3 6 2 7 64 | 5 8 4 1 7 2 6 3 65 | 6 1 5 2 8 3 7 4 66 | 6 2 7 1 3 5 8 4 67 | 6 2 7 1 4 8 5 3 68 | 6 3 1 7 5 8 2 4 69 | 6 3 1 8 4 2 7 5 70 | 6 3 1 8 5 2 4 7 71 | 6 3 5 7 1 4 2 8 72 | 6 3 5 8 1 4 2 7 73 | 6 3 7 2 4 8 1 5 74 | 6 3 7 2 8 5 1 4 75 | 6 3 7 4 1 8 2 5 76 | 6 4 1 5 8 2 7 3 77 | 6 4 2 8 5 7 1 3 78 | 6 4 7 1 3 5 2 8 79 | 6 4 7 1 8 2 5 3 80 | 6 8 2 4 1 7 5 3 81 | 7 1 3 8 6 4 2 5 82 | 7 2 4 1 8 5 3 6 83 | 7 2 6 3 1 4 8 5 84 | 7 3 1 6 8 5 2 4 85 | 7 3 8 2 5 1 6 4 86 | 7 4 2 5 8 1 3 6 87 | 7 4 2 8 6 1 3 5 88 | 7 5 3 1 6 8 2 4 89 | 8 2 4 1 7 5 3 6 90 | 8 2 5 3 1 7 4 6 91 | 8 3 1 6 2 5 7 4 92 | 8 4 1 3 6 2 7 5 93 | -------------------------------------------------------------------------------- /sparc/solaris/tst/8q.2bk: -------------------------------------------------------------------------------- 1 | tst/8q.c:30: warning: missing return value 2 | tst/8q.c:39: warning: missing return value 3 | -------------------------------------------------------------------------------- /sparc/solaris/tst/array.1bk: -------------------------------------------------------------------------------- 1 | 0 1 2 3 1000 1001 1002 1003 2000 2001 2002 2003 2 | 0 1 2 3 1000 1001 1002 1003 2000 2001 2002 2003 3 | 0 1 2 3 1000 1001 1002 1003 2000 2001 2002 2003 4 | 0 1 2 3 1000 1001 1002 1003 2000 2001 2002 2003 5 | -------------------------------------------------------------------------------- /sparc/solaris/tst/array.2bk: -------------------------------------------------------------------------------- 1 | tst/array.c:33: warning: missing return value 2 | tst/array.c:48: warning: missing return value 3 | -------------------------------------------------------------------------------- /sparc/solaris/tst/cf.1bk: -------------------------------------------------------------------------------- 1 | char freq 2 | 011 8.1 3 | 012 6.1 4 | 040 11.9 5 | ! 0.2 6 | " 1.5 7 | % 0.6 8 | & 0.4 9 | ' 0.4 10 | ( 2.9 11 | ) 2.9 12 | * 0.8 13 | + 1.3 14 | , 1.3 15 | - 0.4 16 | . 0.6 17 | / 1.0 18 | 0 2.5 19 | 1 1.9 20 | 2 0.6 21 | 3 0.2 22 | 7 0.4 23 | 8 0.2 24 | ; 3.8 25 | < 0.8 26 | = 2.7 27 | > 0.2 28 | [ 1.5 29 | \ 0.8 30 | ] 1.5 31 | a 3.1 32 | c 4.4 33 | e 2.3 34 | f 6.0 35 | g 1.3 36 | h 1.0 37 | i 5.0 38 | l 1.0 39 | m 0.2 40 | n 3.3 41 | o 2.1 42 | p 1.0 43 | q 0.4 44 | r 4.2 45 | s 0.6 46 | t 3.8 47 | u 1.2 48 | v 0.6 49 | w 0.2 50 | { 0.6 51 | } 0.6 52 | -------------------------------------------------------------------------------- /sparc/solaris/tst/cf.2bk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drh/lcc/2b5cf358d9aa6759923dd7461f2df7f7f2a28471/sparc/solaris/tst/cf.2bk -------------------------------------------------------------------------------- /sparc/solaris/tst/cq.1bk: -------------------------------------------------------------------------------- 1 | Section s22 returned 0. 2 | Decimal and octal/hex constants sometimes give 3 | different results when assigned to longs. 4 | Decimal and octal/hex constants sometimes give 5 | different results when assigned to longs. 6 | Section s241 returned 0. 7 | Section s243 returned 0. 8 | Section s244 returned 0. 9 | Section s25 returned 0. 10 | 8 bits in chars. 11 | 32 bits in ints. 12 | 16 bits in shorts. 13 | 32 bits in longs. 14 | 32 bits in unsigneds. 15 | 32 bits in floats. 16 | 64 bits in doubles. 17 | 1.192093e-07 is the least number that can be added to 1. (float). 18 | 2.220446e-16 is the least number that can be added to 1. (double). 19 | Section s26 returned 0. 20 | Section s4 returned 0. 21 | Section s61 returned 0. 22 | Section s626 returned 0. 23 | Section s71 returned 0. 24 | Section s72 returned 0. 25 | Section s757 returned 0. 26 | Section s7813 returned 0. 27 | Section s714 returned 0. 28 | Section s715 returned 0. 29 | Register count for char is unreliable. 30 | Register count for pointer is unreliable. 31 | Register count for int is unreliable. 32 | Section s81 returned 0. 33 | Section s84 returned 0. 34 | char alignment: 1 35 | short alignment: 2 36 | int alignment: 4 37 | long alignment: 4 38 | unsigned alignment: 4 39 | float alignment: 4 40 | double alignment: 8 41 | Sign extension in fields 42 | Be especially careful with 1-bit fields! 43 | Section s85 returned 0. 44 | Section s86 returned 0. 45 | Section s88 returned 0. 46 | Section s9 returned 0. 47 | 48 | No errors detected. 49 | -------------------------------------------------------------------------------- /sparc/solaris/tst/cq.2bk: -------------------------------------------------------------------------------- 1 | tst/cq.c:394: warning: overflow in converting constant expression from `unsigned long' to `long int' 2 | tst/cq.c:394: warning: overflow in converting constant expression from `unsigned long' to `long int' 3 | tst/cq.c:394: warning: overflow in converting constant expression from `unsigned long' to `long int' 4 | tst/cq.c:395: warning: overflow in constant `4294967296' 5 | tst/cq.c:395: warning: overflow in converting constant expression from `unsigned long' to `long int' 6 | tst/cq.c:395: warning: overflow in constant `040000000000' 7 | tst/cq.c:395: warning: overflow in converting constant expression from `unsigned long' to `long int' 8 | tst/cq.c:395: warning: overflow in constant `0x100000000' 9 | tst/cq.c:395: warning: overflow in converting constant expression from `unsigned long' to `long int' 10 | tst/cq.c:396: warning: overflow in constant `68719476735' 11 | tst/cq.c:396: warning: overflow in converting constant expression from `unsigned long' to `long int' 12 | tst/cq.c:396: warning: overflow in constant `0777777777777' 13 | tst/cq.c:396: warning: overflow in converting constant expression from `unsigned long' to `long int' 14 | tst/cq.c:396: warning: overflow in constant `0xfffffffff' 15 | tst/cq.c:396: warning: overflow in converting constant expression from `unsigned long' to `long int' 16 | tst/cq.c:397: warning: overflow in constant `68719476736' 17 | tst/cq.c:397: warning: overflow in converting constant expression from `unsigned long' to `long int' 18 | tst/cq.c:397: warning: overflow in constant `01000000000000' 19 | tst/cq.c:397: warning: overflow in converting constant expression from `unsigned long' to `long int' 20 | tst/cq.c:397: warning: overflow in constant `0x1000000000' 21 | tst/cq.c:397: warning: overflow in converting constant expression from `unsigned long' to `long int' 22 | tst/cq.c:533: warning: missing return value 23 | tst/cq.c:1169: warning: missing return value 24 | tst/cq.c:5294: warning: unreachable code 25 | tst/cq.c:5303: warning: missing return value 26 | -------------------------------------------------------------------------------- /sparc/solaris/tst/cvt.1bk: -------------------------------------------------------------------------------- 1 | 1 1 1 1 1 1 1 1 1.000000 1.000000 1.000000 2 | 2 2 2 2 2 2 2 2 2.000000 2.000000 2.000000 3 | 3 3 3 3 3 3 3 3 3.000000 3.000000 3.000000 4 | 4 4 4 4 4 4 4 4 4.000000 4.000000 4.000000 5 | 5 5 5 5 5 5 5 5 5.000000 5.000000 5.000000 6 | 6 6 6 6 6 6 6 6 6.000000 6.000000 6.000000 7 | 7 7 7 7 7 7 7 7 7.000000 7.000000 7.000000 8 | 8 8 8 8 8 8 8 8 8.000000 8.000000 8.000000 9 | 9 9 9 9 9 9 9 9 9.000000 9.000000 9.000000 10 | 10 10 10 10 10 10 10 10 10.000000 10.000000 10.000000 11 | 11 11 11 11 11 11 11 11 11.000000 11.000000 11.000000 12 | -------------------------------------------------------------------------------- /sparc/solaris/tst/cvt.2bk: -------------------------------------------------------------------------------- 1 | tst/cvt.c:32: warning: conversion from `pointer to void function(void)' to `pointer to void' is compiler dependent 2 | tst/cvt.c:33: warning: conversion from `pointer to void' to `pointer to void function(void)' is compiler dependent 3 | -------------------------------------------------------------------------------- /sparc/solaris/tst/fields.1bk: -------------------------------------------------------------------------------- 1 | x = 1 2 3 4 -3 6 2 | y = 3 8 9 3 | x = 1 2 3 0 0 6 4 | y = 2 8 16 5 | p->a = 0x3, p->b = 0xf 6 | -------------------------------------------------------------------------------- /sparc/solaris/tst/fields.2bk: -------------------------------------------------------------------------------- 1 | tst/fields.c:6: warning: initializer exceeds bit-field width 2 | tst/fields.c:8: warning: initializer exceeds bit-field width 3 | tst/fields.c:30: warning: missing return value 4 | tst/fields.c:34: warning: missing return value 5 | -------------------------------------------------------------------------------- /sparc/solaris/tst/front.2bk: -------------------------------------------------------------------------------- 1 | tst/front.c:3: warning: missing return value 2 | tst/front.c:10: warning: missing return value 3 | tst/front.c:20: type error in argument 1 to `s'; found `pointer to struct D' expected `pointer to incomplete struct D defined at tst/front.c:14' 4 | tst/front.c:21: warning: missing return value 5 | tst/front.c:32: warning: missing return value 6 | tst/front.c:36: operands of = have illegal types `pointer to int' and `pointer to const int' 7 | tst/front.c:38: warning: missing return value 8 | tst/front.c:62: operands of = have illegal types `pointer to char' and `pointer to const void' 9 | tst/front.c:63: warning: missing return value 10 | tst/front.c:68: warning: missing return value 11 | tst/front.c:69: warning: inconsistent linkage for `yy' previously declared at tst/front.c:68 12 | tst/front.c:69: warning: missing return value 13 | tst/front.c:71: invalid storage class `static' for `int function goo' 14 | tst/front.c:71: warning: declaration of `goo' does not match previous declaration at tst/front.c:70 15 | tst/front.c:71: warning: missing return value 16 | tst/front.c:74: warning: declaration of `xr' does not match previous declaration at tst/front.c:72 17 | tst/front.c:74: warning: missing return value 18 | tst/front.c:81: warning: missing return value 19 | tst/front.c:82: warning: declaration of `ss2' does not match previous declaration at tst/front.c:81 20 | tst/front.c:84: warning: inconsistent linkage for `ss5' previously declared at tst/front.c:80 21 | tst/front.c:92: type error in argument 1 to `gx1'; found `pointer to double' expected `double' 22 | tst/front.c:92: warning: missing return value 23 | tst/front.c:95: redeclaration of `hx1' previously declared at tst/front.c:94 24 | tst/front.c:98: warning: missing return value 25 | tst/front.c:101: conflicting argument declarations for function `gg1' 26 | tst/front.c:101: warning: missing return value 27 | tst/front.c:112: type error in argument 4 to `qsort'; found `pointer to int function(pointer to pointer to char,pointer to pointer to char)' expected `pointer to int function(pointer to const void,pointer to const void)' 28 | tst/front.c:113: warning: missing return value 29 | tst/front.c:120: warning: missing return value 30 | -------------------------------------------------------------------------------- /sparc/solaris/tst/incr.1bk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drh/lcc/2b5cf358d9aa6759923dd7461f2df7f7f2a28471/sparc/solaris/tst/incr.1bk -------------------------------------------------------------------------------- /sparc/solaris/tst/incr.2bk: -------------------------------------------------------------------------------- 1 | tst/incr.c:1: warning: missing return value 2 | tst/incr.c:6: warning: expression with no effect elided 3 | tst/incr.c:6: warning: expression with no effect elided 4 | tst/incr.c:11: warning: missing return value 5 | tst/incr.c:16: warning: expression with no effect elided 6 | tst/incr.c:16: warning: expression with no effect elided 7 | tst/incr.c:21: warning: missing return value 8 | tst/incr.c:30: warning: missing return value 9 | tst/incr.c:39: warning: missing return value 10 | -------------------------------------------------------------------------------- /sparc/solaris/tst/incr.sbk: -------------------------------------------------------------------------------- 1 | .global main 2 | .section ".text" 3 | .align 4 4 | main: 5 | mov %g0,%o0 6 | .L1: 7 | retl; nop 8 | .type main,#function 9 | .size main,.-main 10 | .global memchar 11 | .align 4 12 | memchar: 13 | save %sp,-104,%sp 14 | ld [%fp+-8],%i5 15 | add %i5,1,%i4 16 | st %i4,[%fp+-8] 17 | ldsb [%i5],%i5 18 | stb %i5,[%fp+-1] 19 | ld [%fp+-8],%i5 20 | add %i5,1,%i5 21 | st %i5,[%fp+-8] 22 | ldsb [%i5],%i5 23 | stb %i5,[%fp+-1] 24 | ld [%fp+-8],%i5 25 | add %i5,-1,%i4 26 | st %i4,[%fp+-8] 27 | ldsb [%i5],%i5 28 | stb %i5,[%fp+-1] 29 | ld [%fp+-8],%i5 30 | add %i5,-1,%i5 31 | st %i5,[%fp+-8] 32 | ldsb [%i5],%i5 33 | stb %i5,[%fp+-1] 34 | mov %g0,%i0 35 | .L2: 36 | ret; restore 37 | .type memchar,#function 38 | .size memchar,.-memchar 39 | .global memint 40 | .align 4 41 | memint: 42 | save %sp,-104,%sp 43 | ld [%fp+-8],%i5 44 | add %i5,4,%i4 45 | st %i4,[%fp+-8] 46 | ld [%i5],%i5 47 | st %i5,[%fp+-4] 48 | ld [%fp+-8],%i5 49 | add %i5,4,%i5 50 | st %i5,[%fp+-8] 51 | ld [%i5],%i5 52 | st %i5,[%fp+-4] 53 | ld [%fp+-8],%i5 54 | add %i5,-4,%i4 55 | st %i4,[%fp+-8] 56 | ld [%i5],%i5 57 | st %i5,[%fp+-4] 58 | ld [%fp+-8],%i5 59 | add %i5,-4,%i5 60 | st %i5,[%fp+-8] 61 | ld [%i5],%i5 62 | st %i5,[%fp+-4] 63 | mov %g0,%i0 64 | .L3: 65 | ret; restore 66 | .type memint,#function 67 | .size memint,.-memint 68 | .global regchar 69 | .align 4 70 | regchar: 71 | mov %o4,%o3 72 | add %o3,1,%o4 73 | ldsb [%o3],%o5 74 | add %o4,1,%o3 75 | mov %o3,%o4 76 | ldsb [%o3],%o5 77 | mov %o4,%o3 78 | add %o3,-1,%o4 79 | ldsb [%o3],%o5 80 | add %o4,-1,%o3 81 | mov %o3,%o4 82 | ldsb [%o3],%o5 83 | mov %g0,%o0 84 | .L4: 85 | retl; nop 86 | .type regchar,#function 87 | .size regchar,.-regchar 88 | .global regint 89 | .align 4 90 | regint: 91 | mov %o4,%o3 92 | add %o3,4,%o4 93 | ld [%o3],%o5 94 | add %o4,4,%o3 95 | mov %o3,%o4 96 | ld [%o3],%o5 97 | mov %o4,%o3 98 | add %o3,-4,%o4 99 | ld [%o3],%o5 100 | add %o4,-4,%o3 101 | mov %o3,%o4 102 | ld [%o3],%o5 103 | mov %g0,%o0 104 | .L5: 105 | retl; nop 106 | .type regint,#function 107 | .size regint,.-regint 108 | -------------------------------------------------------------------------------- /sparc/solaris/tst/init.1bk: -------------------------------------------------------------------------------- 1 | 1 2 3 4 2 | 5 6 3 | 7 4 | if 5 | for 6 | else 7 | while 8 | 1 2 3 if 9 | 4 5 0 for 10 | 6 7 8 else 11 | 9 10 11 while 12 | 1 2 3 if 13 | 4 5 0 for 14 | 6 7 8 else 15 | 9 10 11 while 16 | 0 0 0 17 | -------------------------------------------------------------------------------- /sparc/solaris/tst/init.2bk: -------------------------------------------------------------------------------- 1 | tst/init.c:36: warning: missing return value 2 | tst/init.c:49: warning: missing return value 3 | tst/init.c:59: warning: missing return value 4 | -------------------------------------------------------------------------------- /sparc/solaris/tst/limits.1bk: -------------------------------------------------------------------------------- 1 | UCHAR_MAX: 000000ff=255 2 | USHRT_MAX: 0000ffff=65535 3 | UINT_MAX: ffffffff=-1 4 | ULONG_MAX: ffffffff=-1 5 | CHAR_MAX: 0000007f=127 6 | SCHAR_MAX: 0000007f=127 7 | SHRT_MAX: 00007fff=32767 8 | INT_MAX: 7fffffff=2147483647 9 | LONG_MAX: 7fffffff=2147483647 10 | CHAR_MIN: ffffff80=-128 11 | SCHAR_MIN: ffffff80=-128 12 | SHRT_MIN: ffff8000=-32768 13 | INT_MIN: 80000000=-2147483648 14 | LONG_MIN: 80000000=-2147483648 15 | -------------------------------------------------------------------------------- /sparc/solaris/tst/limits.2bk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drh/lcc/2b5cf358d9aa6759923dd7461f2df7f7f2a28471/sparc/solaris/tst/limits.2bk -------------------------------------------------------------------------------- /sparc/solaris/tst/paranoia.2bk: -------------------------------------------------------------------------------- 1 | tst/paranoia.c:1867: warning: missing return value 2 | tst/paranoia.c:1874: warning: missing return value 3 | tst/paranoia.c:1884: warning: missing return value 4 | tst/paranoia.c:1924: warning: missing return value 5 | tst/paranoia.c:1939: warning: missing return value 6 | tst/paranoia.c:1956: warning: missing return value 7 | tst/paranoia.c:1975: warning: missing return value 8 | tst/paranoia.c:1988: warning: missing return value 9 | tst/paranoia.c:1995: warning: missing return value 10 | tst/paranoia.c:2055: warning: missing return value 11 | tst/paranoia.c:2062: warning: missing return value 12 | tst/paranoia.c:2070: warning: missing return value 13 | tst/paranoia.c:2087: warning: missing return value 14 | tst/paranoia.c:2115: warning: missing return value 15 | tst/paranoia.c:2144: warning: missing return value 16 | tst/paranoia.c:2173: warning: missing return value 17 | -------------------------------------------------------------------------------- /sparc/solaris/tst/sort.1bk: -------------------------------------------------------------------------------- 1 | exchange(1,9) 2 | exchange(3,7) 3 | exchange(5,6) 4 | exchange(0,5) 5 | exchange(0,3) 6 | exchange(0,0) 7 | exchange(1,2) 8 | exchange(6,6) 9 | exchange(8,9) 10 | exchange(7,8) 11 | -51 12 | -1 13 | 0 14 | 1 15 | 3 16 | 10 17 | 18 18 | 32 19 | 567 20 | 789 21 | -------------------------------------------------------------------------------- /sparc/solaris/tst/sort.2bk: -------------------------------------------------------------------------------- 1 | tst/sort.c:23: warning: missing return value 2 | tst/sort.c:30: warning: missing return value 3 | tst/sort.c:37: warning: missing return value 4 | tst/sort.c:41: warning: missing return value 5 | tst/sort.c:65: warning: missing return value 6 | -------------------------------------------------------------------------------- /sparc/solaris/tst/spill.1bk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drh/lcc/2b5cf358d9aa6759923dd7461f2df7f7f2a28471/sparc/solaris/tst/spill.1bk -------------------------------------------------------------------------------- /sparc/solaris/tst/spill.2bk: -------------------------------------------------------------------------------- 1 | tst/spill.c:1: warning: missing return value 2 | tst/spill.c:3: warning: missing return value 3 | tst/spill.c:5: warning: missing return value 4 | tst/spill.c:7: warning: missing return value 5 | tst/spill.c:9: warning: missing return value 6 | tst/spill.c:17: warning: missing return value 7 | -------------------------------------------------------------------------------- /sparc/solaris/tst/stdarg.1bk: -------------------------------------------------------------------------------- 1 | test 1 2 | test 2 3 | test 3 4 | test 4 5 | test 5.000000 6 | {1 2 3 4} {1 2 3 4} {1 2 3 4} {1 2 3 4} {1 2 3 4} {1 2 3 4} 7 | -------------------------------------------------------------------------------- /sparc/solaris/tst/stdarg.2bk: -------------------------------------------------------------------------------- 1 | tst/stdarg.c:51: warning: missing return value 2 | -------------------------------------------------------------------------------- /sparc/solaris/tst/struct.1bk: -------------------------------------------------------------------------------- 1 | (-1,-1) is not within [10,10; 310,310] 2 | (1,1) is not within [10,10; 310,310] 3 | (20,300) is within [10,10; 310,310] 4 | (500,400) is not within [10,10; 310,310] 5 | ab 6 | -------------------------------------------------------------------------------- /sparc/solaris/tst/struct.2bk: -------------------------------------------------------------------------------- 1 | tst/struct.c:49: warning: missing return value 2 | tst/struct.c:68: warning: missing return value 3 | -------------------------------------------------------------------------------- /sparc/solaris/tst/switch.1bk: -------------------------------------------------------------------------------- 1 | b = 0x8 2 | f = 0xc 3 | n = 0xa 4 | r = 0xd 5 | t = 0x9 6 | v = 0xb 7 | x = 0x78 8 | f: 9 | x = 0 10 | x = 1 11 | x = 2 12 | x = 2 13 | x = 2 14 | x = 2 15 | x = 2 16 | x = 7 17 | x = 8 18 | x = 9 19 | x = 9 20 | x = 9 21 | x = 9 22 | x = 9 23 | x = 9 24 | x = 9 25 | x = 16 26 | x = 17 27 | x = 18 28 | x = 19 29 | x = 20 30 | g: 31 | 1 1 32 | 1 2 33 | 2 3 34 | 2 4 35 | 2 5 36 | 3 6 37 | d 6 38 | 3 7 39 | d 7 40 | 3 8 41 | d 8 42 | d 9 43 | d 10 44 | h: 45 | i = 8 46 | i = 16 47 | i = 120 48 | i = 128 49 | i = 248 50 | i = 264 51 | i = 272 52 | i = 280 53 | i = 288 54 | i = 296 55 | i = 304 56 | i = 312 57 | 488 defaults 58 | x = 0x1000000 59 | x = 0x2000000 60 | x = 0x3000000 61 | x = 0x4000000 62 | x = 0x5000000 63 | x = 0x6000000 (default) 64 | x = 0x7000000 (default) 65 | 0 66 | 1 67 | 2 68 | 3 69 | 4 70 | 5 71 | 0 72 | 1 73 | 2 74 | 3 75 | 4 76 | 5 77 | -------------------------------------------------------------------------------- /sparc/solaris/tst/switch.2bk: -------------------------------------------------------------------------------- 1 | tst/switch.c:55: warning: missing return value 2 | tst/switch.c:73: warning: missing return value 3 | tst/switch.c:97: warning: missing return value 4 | tst/switch.c:112: warning: missing return value 5 | tst/switch.c:137: warning: missing return value 6 | -------------------------------------------------------------------------------- /sparc/solaris/tst/wf1.1bk: -------------------------------------------------------------------------------- 1 | 5 a 2 | 2 and 3 | 5 buf 4 | 16 c 5 | 8 char 6 | 1 compare 7 | 4 cond 8 | 5 count 9 | 1 d 10 | 1 die 11 | 3 else 12 | 1 entry 13 | 1 eof 14 | 4 err 15 | 1 error 16 | 1 exit 17 | 1 folded 18 | 1 for 19 | 1 free 20 | 1 frequencies 21 | 1 frequency 22 | 1 get 23 | 2 getchar 24 | 3 getword 25 | 14 if 26 | 2 in 27 | 1 index 28 | 1 input 29 | 1 install 30 | 8 int 31 | 1 into 32 | 1 is 33 | 4 isletter 34 | 1 it 35 | 1 itself 36 | 5 left 37 | 1 letter 38 | 7 lookup 39 | 1 main 40 | 2 malloc 41 | 1 message 42 | 2 n 43 | 1 necessary 44 | 12 next 45 | 9 node 46 | 4 of 47 | 1 on 48 | 1 or 49 | 1 otherwise 50 | 2 out 51 | 8 p 52 | 3 print 53 | 2 printf 54 | 16 return 55 | 5 right 56 | 4 root 57 | 25 s 58 | 2 storage 59 | 3 strcmp 60 | 1 strcpy 61 | 1 strlen 62 | 8 struct 63 | 1 structures 64 | 2 subtree 65 | 1 t 66 | 5 tprint 67 | 9 tree 68 | 1 uses 69 | 1 version 70 | 1 wf 71 | 3 while 72 | 21 word 73 | 9 words 74 | 2 z 75 | -------------------------------------------------------------------------------- /sparc/solaris/tst/wf1.2bk: -------------------------------------------------------------------------------- 1 | tst/wf1.c:29: warning: missing return value 2 | tst/wf1.c:87: warning: missing return value 3 | -------------------------------------------------------------------------------- /sparc/solaris/tst/yacc.1bk: -------------------------------------------------------------------------------- 1 | a 2 | b 3 | load 4 | negate 5 | push 5 6 | c 7 | load 8 | multiply 9 | add 10 | store 11 | -------------------------------------------------------------------------------- /sparc/solaris/tst/yacc.2bk: -------------------------------------------------------------------------------- 1 | tst/yacc.c:345: warning: missing return value 2 | tst/yacc.c:349: warning: missing return value 3 | tst/yacc.c:360: warning: missing return value 4 | -------------------------------------------------------------------------------- /src/alloc.c: -------------------------------------------------------------------------------- 1 | #include "c.h" 2 | struct block { 3 | struct block *next; 4 | char *limit; 5 | char *avail; 6 | }; 7 | union align { 8 | long l; 9 | char *p; 10 | double d; 11 | int (*f)(void); 12 | }; 13 | union header { 14 | struct block b; 15 | union align a; 16 | }; 17 | #ifdef PURIFY 18 | union header *arena[3]; 19 | 20 | void *allocate(unsigned long n, unsigned a) { 21 | union header *new = malloc(sizeof *new + n); 22 | 23 | assert(a < NELEMS(arena)); 24 | if (new == NULL) { 25 | error("insufficient memory\n"); 26 | exit(1); 27 | } 28 | new->b.next = (void *)arena[a]; 29 | arena[a] = new; 30 | return new + 1; 31 | } 32 | 33 | void deallocate(unsigned a) { 34 | union header *p, *q; 35 | 36 | assert(a < NELEMS(arena)); 37 | for (p = arena[a]; p; p = q) { 38 | q = (void *)p->b.next; 39 | free(p); 40 | } 41 | arena[a] = NULL; 42 | } 43 | 44 | void *newarray(unsigned long m, unsigned long n, unsigned a) { 45 | return allocate(m*n, a); 46 | } 47 | #else 48 | static struct block 49 | first[] = { { NULL }, { NULL }, { NULL } }, 50 | *arena[] = { &first[0], &first[1], &first[2] }; 51 | static struct block *freeblocks; 52 | 53 | void *allocate(unsigned long n, unsigned a) { 54 | struct block *ap; 55 | 56 | assert(a < NELEMS(arena)); 57 | assert(n > 0); 58 | ap = arena[a]; 59 | n = roundup(n, sizeof (union align)); 60 | while (n > ap->limit - ap->avail) { 61 | if ((ap->next = freeblocks) != NULL) { 62 | freeblocks = freeblocks->next; 63 | ap = ap->next; 64 | } else 65 | { 66 | unsigned m = sizeof (union header) + n + roundup(10*1024, sizeof (union align)); 67 | ap->next = malloc(m); 68 | ap = ap->next; 69 | if (ap == NULL) { 70 | error("insufficient memory\n"); 71 | exit(1); 72 | } 73 | ap->limit = (char *)ap + m; 74 | } 75 | ap->avail = (char *)((union header *)ap + 1); 76 | ap->next = NULL; 77 | arena[a] = ap; 78 | 79 | } 80 | ap->avail += n; 81 | return ap->avail - n; 82 | } 83 | 84 | void *newarray(unsigned long m, unsigned long n, unsigned a) { 85 | return allocate(m*n, a); 86 | } 87 | void deallocate(unsigned a) { 88 | assert(a < NELEMS(arena)); 89 | arena[a]->next = freeblocks; 90 | freeblocks = first[a].next; 91 | first[a].next = NULL; 92 | arena[a] = &first[a]; 93 | } 94 | #endif 95 | -------------------------------------------------------------------------------- /src/bind.c: -------------------------------------------------------------------------------- 1 | #include "c.h" 2 | #undef yy 3 | #define yy \ 4 | xx(alpha/osf, alphaIR) \ 5 | xx(mips/irix, mipsebIR) \ 6 | xx(sparc/sun, sparcIR) \ 7 | xx(sparc/solaris,solarisIR) \ 8 | xx(x86/win32, x86IR) \ 9 | xx(x86/linux, x86linuxIR) \ 10 | xx(symbolic/osf, symbolic64IR) \ 11 | xx(symbolic/irix,symbolicIR) \ 12 | xx(symbolic, symbolicIR) \ 13 | xx(bytecode, bytecodeIR) \ 14 | xx(null, nullIR) 15 | 16 | #undef xx 17 | #define xx(a,b) extern Interface b; 18 | yy 19 | 20 | Binding bindings[] = { 21 | #undef xx 22 | #define xx(a,b) #a, &b, 23 | yy 24 | NULL, NULL 25 | }; 26 | #undef yy 27 | #undef xx 28 | -------------------------------------------------------------------------------- /src/event.c: -------------------------------------------------------------------------------- 1 | #include "c.h" 2 | 3 | static char rcsid[] = "$Id$"; 4 | 5 | struct entry { 6 | Apply func; 7 | void *cl; 8 | }; 9 | 10 | Events events; 11 | void attach(Apply func, void *cl, List *list) { 12 | struct entry *p; 13 | 14 | NEW(p, PERM); 15 | p->func = func; 16 | p->cl = cl; 17 | *list = append(p, *list); 18 | } 19 | void apply(List event, void *arg1, void *arg2) { 20 | if (event) { 21 | List lp = event; 22 | do { 23 | struct entry *p = lp->x; 24 | (*p->func)(p->cl, arg1, arg2); 25 | lp = lp->link; 26 | } while (lp != event); 27 | } 28 | } 29 | 30 | -------------------------------------------------------------------------------- /src/inits.c: -------------------------------------------------------------------------------- 1 | void init(int argc, char *argv[]) { 2 | {extern void input_init(int, char *[]); input_init(argc, argv);} 3 | {extern void main_init(int, char *[]); main_init(argc, argv);} 4 | {extern void type_init(int, char *[]); type_init(argc, argv);} 5 | } 6 | -------------------------------------------------------------------------------- /src/list.c: -------------------------------------------------------------------------------- 1 | #include "c.h" 2 | 3 | static char rcsid[] = "$Id$"; 4 | 5 | static List freenodes; /* free list nodes */ 6 | 7 | /* append - append x to list, return new list */ 8 | List append(void *x, List list) { 9 | List new; 10 | 11 | if ((new = freenodes) != NULL) 12 | freenodes = freenodes->link; 13 | else 14 | NEW(new, PERM); 15 | if (list) { 16 | new->link = list->link; 17 | list->link = new; 18 | } else 19 | new->link = new; 20 | new->x = x; 21 | return new; 22 | } 23 | 24 | /* length - # elements in list */ 25 | int length(List list) { 26 | int n = 0; 27 | 28 | if (list) { 29 | List lp = list; 30 | do 31 | n++; 32 | while ((lp = lp->link) != list); 33 | } 34 | return n; 35 | } 36 | 37 | /* ltov - convert list to an NULL-terminated vector allocated in arena */ 38 | void *ltov(List *list, unsigned arena) { 39 | int i = 0; 40 | void **array = newarray(length(*list) + 1, sizeof array[0], arena); 41 | 42 | if (*list) { 43 | List lp = *list; 44 | do { 45 | lp = lp->link; 46 | array[i++] = lp->x; 47 | } while (lp != *list); 48 | #ifndef PURIFY 49 | lp = (*list)->link; 50 | (*list)->link = freenodes; 51 | freenodes = lp; 52 | #endif 53 | } 54 | *list = NULL; 55 | array[i] = NULL; 56 | return array; 57 | } 58 | -------------------------------------------------------------------------------- /src/null.c: -------------------------------------------------------------------------------- 1 | #include "c.h" 2 | #define I(f) null_##f 3 | 4 | static Node I(gen)(Node p) { return p; } 5 | static void I(address)(Symbol q, Symbol p, long n) {} 6 | static void I(blockbeg)(Env *e) {} 7 | static void I(blockend)(Env *e) {} 8 | static void I(defaddress)(Symbol p) {} 9 | static void I(defconst)(int suffix, int size, Value v) {} 10 | static void I(defstring)(int len, char *s) {} 11 | static void I(defsymbol)(Symbol p) {} 12 | static void I(emit)(Node p) {} 13 | static void I(export)(Symbol p) {} 14 | static void I(function)(Symbol f, Symbol caller[], Symbol callee[], int ncalls) {} 15 | static void I(global)(Symbol p) {} 16 | static void I(import)(Symbol p) {} 17 | static void I(local)(Symbol p) {} 18 | static void I(progbeg)(int argc, char *argv[]) {} 19 | static void I(progend)(void) {} 20 | static void I(segment)(int s) {} 21 | static void I(space)(int n) {} 22 | static void I(stabblock)(int brace, int lev, Symbol *p) {} 23 | static void I(stabend)(Coordinate *cp, Symbol p, Coordinate **cpp, Symbol *sp, Symbol *stab) {} 24 | static void I(stabfend)(Symbol p, int lineno) {} 25 | static void I(stabinit)(char *file, int argc, char *argv[]) {} 26 | static void I(stabline)(Coordinate *cp) {} 27 | static void I(stabsym)(Symbol p) {} 28 | static void I(stabtype)(Symbol p) {} 29 | 30 | static char rcsid[] = "$Id$"; 31 | 32 | Interface nullIR = { 33 | 1, 1, 0, /* char */ 34 | 2, 2, 0, /* short */ 35 | 4, 4, 0, /* int */ 36 | 8, 8, 1, /* long */ 37 | 8 ,8, 1, /* long long */ 38 | 4, 4, 1, /* float */ 39 | 8, 8, 1, /* double */ 40 | 16,16,1, /* long double */ 41 | 4, 4, 0, /* T* */ 42 | 0, 4, 0, /* struct */ 43 | 1, /* little_endian */ 44 | 0, /* mulops_calls */ 45 | 0, /* wants_callb */ 46 | 0, /* wants_argb */ 47 | 1, /* left_to_right */ 48 | 0, /* wants_dag */ 49 | 0, /* unsigned_char */ 50 | I(address), 51 | I(blockbeg), 52 | I(blockend), 53 | I(defaddress), 54 | I(defconst), 55 | I(defstring), 56 | I(defsymbol), 57 | I(emit), 58 | I(export), 59 | I(function), 60 | I(gen), 61 | I(global), 62 | I(import), 63 | I(local), 64 | I(progbeg), 65 | I(progend), 66 | I(segment), 67 | I(space), 68 | I(stabblock), 69 | I(stabend), 70 | I(stabfend), 71 | I(stabinit), 72 | I(stabline), 73 | I(stabsym), 74 | I(stabtype) 75 | }; 76 | -------------------------------------------------------------------------------- /src/ops.h: -------------------------------------------------------------------------------- 1 | /* $Id$ */ 2 | 3 | gop(CNST,1) 4 | op(CNST,F,fdx) 5 | op(CNST,I,csilh) 6 | op(CNST,P,p) 7 | op(CNST,U,csilh) 8 | gop(ARG,2) 9 | op(ARG,B,-) 10 | op(ARG,F,fdx) 11 | op(ARG,I,ilh) 12 | op(ARG,P,p) 13 | op(ARG,U,ilh) 14 | gop(ASGN,3) 15 | op(ASGN,B,-) 16 | op(ASGN,F,fdx) 17 | op(ASGN,I,csilh) 18 | op(ASGN,P,p) 19 | op(ASGN,U,csilh) 20 | gop(INDIR,4) 21 | op(INDIR,B,-) 22 | op(INDIR,F,fdx) 23 | op(INDIR,I,csilh) 24 | op(INDIR,P,p) 25 | op(INDIR,U,csilh) 26 | gop(CVF,7) 27 | op(CVF,F,fdx) 28 | op(CVF,I,ilh) 29 | gop(CVI,8) 30 | op(CVI,F,fdx) 31 | op(CVI,I,csilh) 32 | op(CVI,U,csilhp) 33 | gop(CVP,9) 34 | op(CVP,U,p) 35 | gop(CVU,11) 36 | op(CVU,I,csilh) 37 | op(CVU,P,p) 38 | op(CVU,U,csilh) 39 | gop(NEG,12) 40 | op(NEG,F,fdx) 41 | op(NEG,I,ilh) 42 | gop(CALL,13) 43 | op(CALL,B,-) 44 | op(CALL,F,fdx) 45 | op(CALL,I,ilh) 46 | op(CALL,P,p) 47 | op(CALL,U,ilh) 48 | op(CALL,V,-) 49 | gop(RET,15) 50 | op(RET,F,fdx) 51 | op(RET,I,ilh) 52 | op(RET,P,p) 53 | op(RET,U,ilh) 54 | op(RET,V,-) 55 | gop(ADDRG,16) 56 | op(ADDRG,P,p) 57 | gop(ADDRF,17) 58 | op(ADDRF,P,p) 59 | gop(ADDRL,18) 60 | op(ADDRL,P,p) 61 | gop(ADD,19) 62 | op(ADD,F,fdx) 63 | op(ADD,I,ilh) 64 | op(ADD,P,p) 65 | op(ADD,U,ilhp) 66 | gop(SUB,20) 67 | op(SUB,F,fdx) 68 | op(SUB,I,ilh) 69 | op(SUB,P,p) 70 | op(SUB,U,ilhp) 71 | gop(LSH,21) 72 | op(LSH,I,ilh) 73 | op(LSH,U,ilh) 74 | gop(MOD,22) 75 | op(MOD,I,ilh) 76 | op(MOD,U,ilh) 77 | gop(RSH,23) 78 | op(RSH,I,ilh) 79 | op(RSH,U,ilh) 80 | gop(BAND,24) 81 | op(BAND,I,ilh) 82 | op(BAND,U,ilh) 83 | gop(BCOM,25) 84 | op(BCOM,I,ilh) 85 | op(BCOM,U,ilh) 86 | gop(BOR,26) 87 | op(BOR,I,ilh) 88 | op(BOR,U,ilh) 89 | gop(BXOR,27) 90 | op(BXOR,I,ilh) 91 | op(BXOR,U,ilh) 92 | gop(DIV,28) 93 | op(DIV,F,fdx) 94 | op(DIV,I,ilh) 95 | op(DIV,U,ilh) 96 | gop(MUL,29) 97 | op(MUL,F,fdx) 98 | op(MUL,I,ilh) 99 | op(MUL,U,ilh) 100 | gop(EQ,30) 101 | op(EQ,F,fdx) 102 | op(EQ,I,ilh) 103 | op(EQ,U,ilhp) 104 | gop(GE,31) 105 | op(GE,F,fdx) 106 | op(GE,I,ilh) 107 | op(GE,U,ilhp) 108 | gop(GT,32) 109 | op(GT,F,fdx) 110 | op(GT,I,ilh) 111 | op(GT,U,ilhp) 112 | gop(LE,33) 113 | op(LE,F,fdx) 114 | op(LE,I,ilh) 115 | op(LE,U,ilhp) 116 | gop(LT,34) 117 | op(LT,F,fdx) 118 | op(LT,I,ilh) 119 | op(LT,U,ilhp) 120 | gop(NE,35) 121 | op(NE,F,fdx) 122 | op(NE,I,ilh) 123 | op(NE,U,ilhp) 124 | gop(JUMP,36) 125 | op(JUMP,V,-) 126 | gop(LABEL,37) 127 | op(LABEL,V,-) 128 | gop(LOAD,14) 129 | op(LOAD,B,-) 130 | op(LOAD,F,fdx) 131 | op(LOAD,I,csilh) 132 | op(LOAD,P,p) 133 | op(LOAD,U,csilhp) 134 | -------------------------------------------------------------------------------- /src/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # $Id$ 3 | # run .../target/os/tst/foo.s [ remotehost ] 4 | 5 | # set -x 6 | target=`echo $1 | awk -F/ '{ print $(NF-3) }'` 7 | os=`echo $1 | awk -F/ '{ print $(NF-2) }'` 8 | dir=$target/$os 9 | 10 | case "$1" in 11 | *symbolic/irix*) idir=include/mips/irix; remotehost=noexecute ;; 12 | *symbolic/osf*) idir=include/alpha/osf; remotehost=noexecute ;; 13 | *) idir=include/$dir; remotehost=${2-$REMOTEHOST} ;; 14 | esac 15 | 16 | if [ ! -d "$target/$os" -o ! -d "$idir" ]; then 17 | echo 2>&1 $0: unknown combination '"'$target/$os'"' 18 | exit 1 19 | fi 20 | 21 | C=`basename $1 .s` 22 | BUILDDIR=${BUILDDIR-.} LCC="${LCC-${BUILDDIR}/lcc} -Wo-lccdir=$BUILDDIR" 23 | TSTDIR=${TSTDIR-${BUILDDIR}/$dir/tst} 24 | if [ ! -d $TSTDIR ]; then mkdir -p $TSTDIR; fi 25 | 26 | echo ${BUILDDIR}/rcc$EXE -target=$target/$os $1: 1>&2 27 | $LCC -S -I$idir -Ualpha -Usun -Uvax -Umips -Ux86 \ 28 | -Wf-errout=$TSTDIR/$C.2 -D$target -Wf-g0 \ 29 | -Wf-target=$target/$os -o $1 tst/$C.c 30 | if [ $? != 0 ]; then remotehost=noexecute; fi 31 | if [ -r $dir/tst/$C.2bk ]; then 32 | diff $dir/tst/$C.2bk $TSTDIR/$C.2 33 | fi 34 | if [ -r $dir/tst/$C.sbk ]; then 35 | if diff $dir/tst/$C.sbk $TSTDIR/$C.s; then exit 0; fi 36 | fi 37 | 38 | case "$remotehost" in 39 | noexecute) exit 0 ;; 40 | ""|"-") $LCC -o $TSTDIR/$C$EXE $1; $TSTDIR/$C$EXE $TSTDIR/$C.1 ;; 41 | *) rcp $1 $remotehost: 42 | if expr "$remotehost" : '.*@' >/dev/null ; then 43 | remotehost="`expr $remotehost : '.*@\(.*\)'` -l `expr $remotehost : '\(.*\)@'`" 44 | fi 45 | rsh $remotehost "cc -o $C$EXE $C.s -lm;./$C$EXE;rm -f $C$EXE $C.[so]" $TSTDIR/$C.1 46 | ;; 47 | esac 48 | if [ -r $dir/tst/$C.1bk ]; then 49 | diff $dir/tst/$C.1bk $TSTDIR/$C.1 50 | exit $? 51 | fi 52 | exit 0 53 | -------------------------------------------------------------------------------- /tst/8q.0: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drh/lcc/2b5cf358d9aa6759923dd7461f2df7f7f2a28471/tst/8q.0 -------------------------------------------------------------------------------- /tst/8q.c: -------------------------------------------------------------------------------- 1 | int up[15], down[15], rows[8], x[8]; 2 | int queens(), print(); 3 | 4 | main() 5 | { 6 | int i; 7 | 8 | for (i = 0; i < 15; i++) 9 | up[i] = down[i] = 1; 10 | for (i = 0; i < 8; i++) 11 | rows[i] = 1; 12 | queens(0); 13 | return 0; 14 | } 15 | 16 | queens(c) 17 | { 18 | int r; 19 | 20 | for (r = 0; r < 8; r++) 21 | if (rows[r] && up[r-c+7] && down[r+c]) { 22 | rows[r] = up[r-c+7] = down[r+c] = 0; 23 | x[c] = r; 24 | if (c == 7) 25 | print(); 26 | else 27 | queens(c + 1); 28 | rows[r] = up[r-c+7] = down[r+c] = 1; 29 | } 30 | } 31 | 32 | print() 33 | { 34 | int k; 35 | 36 | for (k = 0; k < 8; k++) 37 | printf("%c ", x[k]+'1'); 38 | printf("\n"); 39 | } 40 | -------------------------------------------------------------------------------- /tst/array.0: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drh/lcc/2b5cf358d9aa6759923dd7461f2df7f7f2a28471/tst/array.0 -------------------------------------------------------------------------------- /tst/array.c: -------------------------------------------------------------------------------- 1 | int x[3][4], *y[3]; 2 | 3 | main() { 4 | int z[3][4]; 5 | int i, j, *p; 6 | 7 | for (i = 0; i < 3; i++) { 8 | for (j = 0; j < 4; j++) 9 | x[i][j] = 1000*i + j; 10 | y[i] = x[i]; 11 | } 12 | f(); 13 | for (i = 0; i < 3; i++) { 14 | y[i] = p = &z[i][0]; 15 | for (j = 0; j < 4; j++) 16 | p[j] = x[i][j]; 17 | } 18 | g(z, y); 19 | return 0; 20 | } 21 | 22 | f() { 23 | int i, j; 24 | 25 | for (i = 0; i < 3; i++) 26 | for (j = 0; j < 4; j++) 27 | printf(" %d", x[i][j]); 28 | printf("\n"); 29 | for (i = 0; i < 3; i++) 30 | for (j = 0; j < 4; j++) 31 | printf(" %d", y[i][j]); 32 | printf("\n"); 33 | } 34 | 35 | g(x, y) 36 | int x[][4], *y[]; 37 | { 38 | int i, j; 39 | 40 | for (i = 0; i < 3; i++) 41 | for (j = 0; j < 4; j++) 42 | printf(" %d", x[i][j]); 43 | printf("\n"); 44 | for (i = 0; i < 3; i++) 45 | for (j = 0; j < 4; j++) 46 | printf(" %d", y[i][j]); 47 | printf("\n"); 48 | } 49 | -------------------------------------------------------------------------------- /tst/cf.0: -------------------------------------------------------------------------------- 1 | /* cf - print character frequencies */ 2 | float f[128]; 3 | 4 | main(argc, argv) 5 | int argc; 6 | char *argv[]; 7 | { 8 | int i, c, nc; 9 | float cutoff, atof(); 10 | 11 | if (argc <= 1) 12 | cutoff = 0.0; 13 | else 14 | cutoff = atof(argv[1])/100; 15 | for (i = 0; i <= 127; ) 16 | f[i++] = 0.0; 17 | nc = 0; 18 | while ((c = getchar()) != -1) { 19 | f[c] += 1; 20 | nc++; 21 | } 22 | printf("char\tfreq\n"); 23 | for (i = 0; i <= 127; ++i) 24 | if (f[i] && f[i]/nc >= cutoff) { 25 | if (i <= ' ') 26 | printf("%03o", i); 27 | else 28 | printf("%c", i); 29 | printf("\t%.1f\n", 100*f[i]/nc); 30 | } 31 | return 0; 32 | } 33 | -------------------------------------------------------------------------------- /tst/cf.c: -------------------------------------------------------------------------------- 1 | /* cf - print character frequencies */ 2 | float f[128]; 3 | 4 | main(argc, argv) 5 | int argc; 6 | char *argv[]; 7 | { 8 | int i, c, nc; 9 | float cutoff, atof(); 10 | 11 | if (argc <= 1) 12 | cutoff = 0.0; 13 | else 14 | cutoff = atof(argv[1])/100; 15 | for (i = 0; i <= 127; ) 16 | f[i++] = 0.0; 17 | nc = 0; 18 | while ((c = getchar()) != -1) { 19 | f[c] += 1; 20 | nc++; 21 | } 22 | printf("char\tfreq\n"); 23 | for (i = 0; i <= 127; ++i) 24 | if (f[i] && f[i]/nc >= cutoff) { 25 | if (i <= ' ') 26 | printf("%03o", i); 27 | else 28 | printf("%c", i); 29 | printf("\t%.1f\n", 100*f[i]/nc); 30 | } 31 | return 0; 32 | } 33 | -------------------------------------------------------------------------------- /tst/cq.0: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drh/lcc/2b5cf358d9aa6759923dd7461f2df7f7f2a28471/tst/cq.0 -------------------------------------------------------------------------------- /tst/cvt.0: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drh/lcc/2b5cf358d9aa6759923dd7461f2df7f7f2a28471/tst/cvt.0 -------------------------------------------------------------------------------- /tst/cvt.c: -------------------------------------------------------------------------------- 1 | signed char c; 2 | signed short s; 3 | signed int i; 4 | signed long int l; 5 | unsigned char C; 6 | unsigned short S; 7 | unsigned int I; 8 | unsigned long int L; 9 | float f; 10 | double d; 11 | long double D; 12 | void *p; 13 | void (*P)(void); 14 | 15 | void print(void) { 16 | printf("%d %d %d %ld %u %u %u %lu %f %f %lf\n",c,s,i,l,C,S,I,L,f,d,D); 17 | } 18 | 19 | main() { 20 | c= 1; s=c;i=c;l=c;C=c;S=c;I=c;L=c;f=c;d=c;D=c; print(); 21 | s= 2; c=s; i=s;l=s;C=s;S=s;I=s;L=s;f=s;d=s;D=s; print(); 22 | i= 3; c=i;s=i; l=i;C=i;S=i;I=i;L=i;f=i;d=i;D=i; print(); 23 | l= 4; c=l;s=l;i=l; C=l;S=l;I=l;L=l;f=l;d=l;D=l; print(); 24 | C= 5; c=C;s=C;i=C;l=C; S=C;I=C;L=C;f=C;d=C;D=C; print(); 25 | S= 6; c=S;s=S;i=S;l=S;C=S; I=S;L=S;f=S;d=S;D=S; print(); 26 | I= 7; c=I;s=I;i=I;l=I;C=I;S=I; L=I;f=I;d=I;D=I; print(); 27 | L= 8; c=L;s=L;i=L;l=L;C=L;S=L;I=S; f=L;d=L;D=L; print(); 28 | f= 9; c=f;s=f;i=f;l=f;C=f;S=f;I=f;L=f; d=f;D=f; print(); 29 | d=10; c=d;s=d;i=d;l=d;C=d;S=d;I=d;L=d;f=d; D=d; print(); 30 | D=11; c=D;s=D;i=D;l=D;C=D;S=D;I=D;L=D;f=D;d=D; print(); 31 | 32 | p=0; p=0L; p=0U; p=0UL; p=P; 33 | P=0; P=0L; P=0U; P=0UL; P=p; 34 | return 0; 35 | } 36 | -------------------------------------------------------------------------------- /tst/fields.0: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drh/lcc/2b5cf358d9aa6759923dd7461f2df7f7f2a28471/tst/fields.0 -------------------------------------------------------------------------------- /tst/fields.c: -------------------------------------------------------------------------------- 1 | struct foo { 2 | int a; 3 | char b; 4 | int x : 12, y : 4, : 0, : 4, z : 3; 5 | char c; 6 | } x = { 1, 2, 3, 4, 5, 6 }; 7 | int i = 16; 8 | struct baz { unsigned int a:2, b:4, c:32;} y = { 7, 8, 9}; 9 | 10 | main() 11 | { 12 | printf("x = %d %d %d %d %d %d\n", x.a, x.b, x.x, x.y, x.z, x.c); 13 | printf("y = %d %d %d\n", y.a, y.b, y.c); 14 | x.y = i; 15 | x.z = 070; 16 | printf("x = %d %d %d %d %d %d\n", x.a, x.b, x.x, x.y, x.z, x.c); 17 | y.a = 2; 18 | y.c = i; 19 | printf("y = %d %d %d\n", y.a, y.b, y.c); 20 | f2(&x); 21 | return 0; 22 | } 23 | 24 | f1(struct baz *p) { 25 | p->a = p->b = 0; 26 | if (p->b) 27 | printf("p->b != 0!\n"); 28 | p->a = 0x3; p->b = 0xf; 29 | printf("p->a = 0x%x, p->b = 0x%x\n", p->a, p->b); 30 | } 31 | f2(struct baz *p) { 32 | p->a = (i==0); 33 | p->b = (f1(p),0); 34 | } 35 | -------------------------------------------------------------------------------- /tst/front.0: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drh/lcc/2b5cf358d9aa6759923dd7461f2df7f7f2a28471/tst/front.0 -------------------------------------------------------------------------------- /tst/incr.0: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drh/lcc/2b5cf358d9aa6759923dd7461f2df7f7f2a28471/tst/incr.0 -------------------------------------------------------------------------------- /tst/incr.c: -------------------------------------------------------------------------------- 1 | main() {} 2 | 3 | memchar() { 4 | char x, *p; 5 | 6 | &x, &p; 7 | x = *p++; 8 | x = *++p; 9 | x = *p--; 10 | x = *--p; 11 | } 12 | 13 | memint() { 14 | int x, *p; 15 | 16 | &x, &p; 17 | x = *p++; 18 | x = *++p; 19 | x = *p--; 20 | x = *--p; 21 | } 22 | 23 | regchar() { 24 | register char x, *p; 25 | 26 | x = *p++; 27 | x = *++p; 28 | x = *p--; 29 | x = *--p; 30 | } 31 | 32 | regint() { 33 | register int x, *p; 34 | 35 | x = *p++; 36 | x = *++p; 37 | x = *p--; 38 | x = *--p; 39 | } 40 | -------------------------------------------------------------------------------- /tst/init.0: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drh/lcc/2b5cf358d9aa6759923dd7461f2df7f7f2a28471/tst/init.0 -------------------------------------------------------------------------------- /tst/init.c: -------------------------------------------------------------------------------- 1 | 2 | typedef struct { int codes[3]; char name[6]; } Word; 3 | 4 | Word words[] = { 5 | 1, 2, 3, "if", 6 | { { 4, 5 }, { 'f', 'o', 'r' } }, 7 | 6, 7, 8, {"else"}, 8 | { { 9, 10, 11,}, 'w', 'h', 'i', 'l', 'e', }, 9 | { 0 }, 10 | }, *wordlist = words; 11 | 12 | int x[][5] = { 1, 2, 3, 4, 0, { 5, 6 }, { 7 } }; 13 | int *y[] = { x[0], x[1], x[2], 0 }; 14 | 15 | 16 | main() 17 | { 18 | int i, j; 19 | 20 | for (i = 0; y[i]; i++) { 21 | for (j = 0; y[i][j]; j++) 22 | printf(" %d", y[i][j]); 23 | printf("\n"); 24 | } 25 | f(); 26 | g(wordlist); 27 | return 0; 28 | } 29 | 30 | f() { 31 | static char *keywords[] = {"if", "for", "else", "while", 0, }; 32 | char **p; 33 | 34 | for (p = keywords; *p; p++) 35 | printf("%s\n", *p); 36 | } 37 | 38 | g(p) 39 | Word *p; 40 | { 41 | int i; 42 | 43 | for ( ; p->codes[0]; p++) { 44 | for (i = 0; i < sizeof p->codes/sizeof(p->codes[0]); i++) 45 | printf("%d ", p->codes[i]); 46 | printf("%s\n", p->name); 47 | } 48 | h(); 49 | } 50 | 51 | h() 52 | { 53 | int i; 54 | 55 | for (i = 0; i < sizeof(words)/sizeof(Word); i++) 56 | printf("%d %d %d %s\n", words[i].codes[0], 57 | words[i].codes[1], words[i].codes[2], 58 | &words[i].name[0]); 59 | } 60 | -------------------------------------------------------------------------------- /tst/limits.0: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drh/lcc/2b5cf358d9aa6759923dd7461f2df7f7f2a28471/tst/limits.0 -------------------------------------------------------------------------------- /tst/limits.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | main() { 4 | printf("UCHAR_MAX: %08x=%d\n", UCHAR_MAX, UCHAR_MAX); 5 | printf("USHRT_MAX: %08x=%d\n", USHRT_MAX, USHRT_MAX); 6 | printf("UINT_MAX: %08x=%d\n", UINT_MAX, UINT_MAX); 7 | printf("ULONG_MAX: %08lx=%ld\n", ULONG_MAX, ULONG_MAX); 8 | printf("CHAR_MAX: %08x=%d\n", CHAR_MAX, CHAR_MAX); 9 | printf("SCHAR_MAX: %08x=%d\n", SCHAR_MAX, SCHAR_MAX); 10 | printf("SHRT_MAX: %08x=%d\n", SHRT_MAX, SHRT_MAX); 11 | printf("INT_MAX: %08x=%d\n", INT_MAX, INT_MAX); 12 | printf("LONG_MAX: %08lx=%ld\n", LONG_MAX, LONG_MAX); 13 | printf("CHAR_MIN: %08x=%d\n", CHAR_MIN, CHAR_MIN); 14 | printf("SCHAR_MIN: %08x=%d\n", SCHAR_MIN, SCHAR_MIN); 15 | printf("SHRT_MIN: %08x=%d\n", SHRT_MIN, SHRT_MIN); 16 | printf("INT_MIN: %08x=%d\n", INT_MIN, INT_MIN); 17 | printf("LONG_MIN: %08lx=%ld\n", LONG_MIN, LONG_MIN); 18 | return 0; 19 | } 20 | -------------------------------------------------------------------------------- /tst/paranoia.0: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drh/lcc/2b5cf358d9aa6759923dd7461f2df7f7f2a28471/tst/paranoia.0 -------------------------------------------------------------------------------- /tst/sort.0: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drh/lcc/2b5cf358d9aa6759923dd7461f2df7f7f2a28471/tst/sort.0 -------------------------------------------------------------------------------- /tst/sort.c: -------------------------------------------------------------------------------- 1 | int in[] = {10, 32, -1, 567, 3, 18, 1, -51, 789, 0}; 2 | 3 | main() { 4 | int i; 5 | 6 | sort(in, (sizeof in)/(sizeof in[0])); 7 | for (i = 0; i < (sizeof in)/(sizeof in[0]); i++) { 8 | putd(in[i]); 9 | putchar('\n'); 10 | } 11 | return 0; 12 | } 13 | 14 | /* putd - output decimal number */ 15 | putd(n) { 16 | if (n < 0) { 17 | putchar('-'); 18 | n = -n; 19 | } 20 | if (n/10) 21 | putd(n/10); 22 | putchar(n%10 + '0'); 23 | } 24 | 25 | int *xx; 26 | 27 | /* sort - sort a[0..n-1] into increasing order */ 28 | sort(a, n) int a[]; { 29 | quick(xx = a, 0, --n); 30 | } 31 | 32 | /* quick - quicksort a[lb..ub] */ 33 | quick(a, lb, ub) int a[]; { 34 | int k, partition(); 35 | 36 | if (lb >= ub) 37 | return; 38 | k = partition(a, lb, ub); 39 | quick(a, lb, k - 1); 40 | quick(a, k + 1, ub); 41 | } 42 | 43 | /* partition - partition a[i..j] */ 44 | int partition(a, i, j) int a[]; { 45 | int v, k; 46 | 47 | j++; 48 | k = i; 49 | v = a[k]; 50 | while (i < j) { 51 | i++; while (a[i] < v) i++; 52 | j--; while (a[j] > v) j--; 53 | if (i < j) exchange(&a[i], &a[j]); 54 | } 55 | exchange(&a[k], &a[j]); 56 | return j; 57 | } 58 | 59 | /* exchange - exchange *x and *y */ 60 | exchange(x, y) int *x, *y; { 61 | int t; 62 | 63 | printf("exchange(%d,%d)\n", x - xx, y - xx); 64 | t = *x; *x = *y; *y = t; 65 | } 66 | -------------------------------------------------------------------------------- /tst/spill.0: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drh/lcc/2b5cf358d9aa6759923dd7461f2df7f7f2a28471/tst/spill.0 -------------------------------------------------------------------------------- /tst/spill.c: -------------------------------------------------------------------------------- 1 | main(){} 2 | 3 | f(i){i=f()+f();} 4 | 5 | f2(i){i=f()+(i?f():1);} 6 | 7 | f3(int i,int *p){register r1=0,r2=0,r3=0,r4=0,r5=0,r6=0,r7=0,r8=0,r9=0,r10=0;*p++=i?f():0;} 8 | 9 | double a[10],b[10];int i;f4(){register r6=0,r7=0,r8=0,r9=0,r10=0,r11=0;i=a[i]+b[i] && i && a[i]-b[i];} 10 | /* f4 causes parent to spill child on vax when odd double regs are enabled */ 11 | 12 | int j, k, m, n; 13 | double *A, *B, x; 14 | f5(){ 15 | x=A[k*m]*A[j*m]+B[k*n]*B[j*n]; 16 | x=A[k*m]*B[j*n]-B[k*n]*A[j*m]; 17 | } 18 | -------------------------------------------------------------------------------- /tst/stdarg.0: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drh/lcc/2b5cf358d9aa6759923dd7461f2df7f7f2a28471/tst/stdarg.0 -------------------------------------------------------------------------------- /tst/stdarg.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | struct node { int a[4]; } x = {1,2,3,4}; 4 | 5 | print(char *fmt, ...); 6 | 7 | main() { 8 | print("test 1\n"); 9 | print("test %s\n", "2"); 10 | print("test %d%c", 3, '\n'); 11 | print("%s%s %w%c", "te", "st", 4, '\n'); 12 | print("%s%s %f%c", "te", "st", 5.0, '\n'); 13 | print("%b %b %b %b %b %b\n", x, x, x, x, x, x); 14 | return 0; 15 | } 16 | 17 | print(char *fmt, ...) { 18 | va_list ap; 19 | 20 | va_start(ap, fmt); 21 | for (; *fmt; fmt++) 22 | if (*fmt == '%') 23 | switch (*++fmt) { 24 | case 'b': { 25 | struct node x = va_arg(ap, struct node); 26 | printf("{%d %d %d %d}", x.a[0], x.a[1], x.a[2], x.a[3]); 27 | break; 28 | } 29 | case 'c': 30 | printf("%c", va_arg(ap, char)); 31 | break; 32 | case 'd': 33 | printf("%d", va_arg(ap, int)); 34 | break; 35 | case 'w': 36 | printf("%x", va_arg(ap, short)); 37 | break; 38 | case 's': 39 | printf("%s", va_arg(ap, char *)); 40 | break; 41 | case 'f': 42 | printf("%f", va_arg(ap, double)); 43 | break; 44 | default: 45 | printf("%c", *fmt); 46 | break; 47 | } 48 | else 49 | printf("%c", *fmt); 50 | va_end(ap); 51 | } 52 | -------------------------------------------------------------------------------- /tst/struct.0: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drh/lcc/2b5cf358d9aa6759923dd7461f2df7f7f2a28471/tst/struct.0 -------------------------------------------------------------------------------- /tst/struct.c: -------------------------------------------------------------------------------- 1 | typedef struct point { int x,y; } point; 2 | typedef struct rect { point pt1, pt2; } rect; 3 | 4 | point addpoint(point p1, point p2) { /* add two points */ 5 | p1.x += p2.x; 6 | p1.y += p2.y; 7 | return p1; 8 | } 9 | 10 | #define min(a, b) ((a) < (b) ? (a) : (b)) 11 | #define max(a, b) ((a) > (b) ? (a) : (b)) 12 | 13 | rect canonrect(rect r) { /* canonicalize rectangle coordinates */ 14 | rect temp; 15 | 16 | temp.pt1.x = min(r.pt1.x, r.pt2.x); 17 | temp.pt1.y = min(r.pt1.y, r.pt2.y); 18 | temp.pt2.x = max(r.pt1.x, r.pt2.x); 19 | temp.pt2.y = max(r.pt1.y, r.pt2.y); 20 | return temp; 21 | } 22 | 23 | point makepoint(int x, int y) { /* make a point from x and y components */ 24 | point p; 25 | 26 | p.x = x; 27 | p.y = y; 28 | return p; 29 | } 30 | 31 | rect makerect(point p1, point p2) { /* make a rectangle from two points */ 32 | rect r; 33 | 34 | r.pt1 = p1; 35 | r.pt2 = p2; 36 | return canonrect(r); 37 | } 38 | 39 | int ptinrect(point p, rect r) { /* is p in r? */ 40 | return p.x >= r.pt1.x && p.x < r.pt2.x 41 | && p.y >= r.pt1.y && p.y < r.pt2.y; 42 | } 43 | 44 | struct odd {char a[3]; } y = {'a', 'b', 0}; 45 | 46 | odd(struct odd y) { 47 | struct odd x = y; 48 | printf("%s\n", x.a); 49 | } 50 | 51 | main() { 52 | int i; 53 | point x, origin = { 0, 0 }, maxpt = { 320, 320 }; 54 | point pts[] = { -1, -1, 1, 1, 20, 300, 500, 400 }; 55 | rect screen = makerect(addpoint(maxpt, makepoint(-10, -10)), 56 | addpoint(origin, makepoint(10, 10))); 57 | 58 | for (i = 0; i < sizeof pts/sizeof pts[0]; i++) { 59 | printf("(%d,%d) is ", pts[i].x, 60 | (x = makepoint(pts[i].x, pts[i].y)).y); 61 | if (ptinrect(x, screen) == 0) 62 | printf("not "); 63 | printf("within [%d,%d; %d,%d]\n", screen.pt1.x, screen.pt1.y, 64 | screen.pt2.x, screen.pt2.y); 65 | } 66 | odd(y); 67 | exit(0); 68 | } 69 | 70 | -------------------------------------------------------------------------------- /tst/switch.0: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drh/lcc/2b5cf358d9aa6759923dd7461f2df7f7f2a28471/tst/switch.0 -------------------------------------------------------------------------------- /tst/wf1.c: -------------------------------------------------------------------------------- 1 | /* wf1 - print word frequencies; uses structures */ 2 | 3 | struct node { 4 | int count; /* frequency count */ 5 | struct node *left; /* left subtree */ 6 | struct node *right; /* right subtree */ 7 | char *word; /* word itself */ 8 | } words[2000]; 9 | int next; /* index of next free entry in words */ 10 | 11 | struct node *lookup(); 12 | 13 | main() { 14 | struct node *root; 15 | char word[20]; 16 | 17 | root = 0; 18 | next = 0; 19 | while (getword(word)) 20 | lookup(word, &root)->count++; 21 | tprint(root); 22 | return 0; 23 | } 24 | 25 | /* err - print error message s and die */ 26 | err(s) char *s; { 27 | printf("? %s\n", s); 28 | exit(1); 29 | } 30 | 31 | /* getword - get next input word into buf, return 0 on EOF */ 32 | int getword(buf) char *buf; { 33 | char *s; 34 | int c; 35 | 36 | while ((c = getchar()) != -1 && isletter(c) == 0) 37 | ; 38 | for (s = buf; c = isletter(c); c = getchar()) 39 | *s++ = c; 40 | *s = 0; 41 | if (s > buf) 42 | return (1); 43 | return (0); 44 | } 45 | 46 | /* isletter - return folded version of c if it is a letter, 0 otherwise */ 47 | int isletter(c) { 48 | if (c >= 'A' && c <= 'Z') 49 | c += 'a' - 'A'; 50 | if (c >= 'a' && c <= 'z') 51 | return (c); 52 | return (0); 53 | } 54 | 55 | /* lookup - lookup word in tree; install if necessary */ 56 | struct node *lookup(word, p) char *word; struct node **p; { 57 | int cond; 58 | char *malloc(); 59 | 60 | if (*p) { 61 | cond = strcmp(word, (*p)->word); 62 | if (cond < 0) 63 | return lookup(word, &(*p)->left); 64 | else if (cond > 0) 65 | return lookup(word, &(*p)->right); 66 | else 67 | return *p; 68 | } 69 | if (next >= 2000) 70 | err("out of node storage"); 71 | words[next].count = 0; 72 | words[next].left = words[next].right = 0; 73 | words[next].word = malloc(strlen(word) + 1); 74 | if (words[next].word == 0) 75 | err("out of word storage"); 76 | strcpy(words[next].word, word); 77 | return *p = &words[next++]; 78 | } 79 | 80 | /* tprint - print tree */ 81 | tprint(tree) struct node *tree; { 82 | if (tree) { 83 | tprint(tree->left); 84 | printf("%d\t%s\n", tree->count, tree->word); 85 | tprint(tree->right); 86 | } 87 | } 88 | 89 | /* strcmp - compare s1 and s2, return <0, 0, or >0 */ 90 | int strcmp(s1, s2) char *s1, *s2; { 91 | while (*s1 == *s2) { 92 | if (*s1++ == 0) 93 | return 0; 94 | ++s2; 95 | } 96 | if (*s1 == 0) 97 | return -1; 98 | else if (*s2 == 0) 99 | return 1; 100 | return *s1 - *s2; 101 | } 102 | -------------------------------------------------------------------------------- /tst/yacc.0: -------------------------------------------------------------------------------- 1 | a=-b+5*c 2 | -------------------------------------------------------------------------------- /x86/linux/tst/8q.1bk: -------------------------------------------------------------------------------- 1 | 1 5 8 6 3 7 2 4 2 | 1 6 8 3 7 4 2 5 3 | 1 7 4 6 8 2 5 3 4 | 1 7 5 8 2 4 6 3 5 | 2 4 6 8 3 1 7 5 6 | 2 5 7 1 3 8 6 4 7 | 2 5 7 4 1 8 6 3 8 | 2 6 1 7 4 8 3 5 9 | 2 6 8 3 1 4 7 5 10 | 2 7 3 6 8 5 1 4 11 | 2 7 5 8 1 4 6 3 12 | 2 8 6 1 3 5 7 4 13 | 3 1 7 5 8 2 4 6 14 | 3 5 2 8 1 7 4 6 15 | 3 5 2 8 6 4 7 1 16 | 3 5 7 1 4 2 8 6 17 | 3 5 8 4 1 7 2 6 18 | 3 6 2 5 8 1 7 4 19 | 3 6 2 7 1 4 8 5 20 | 3 6 2 7 5 1 8 4 21 | 3 6 4 1 8 5 7 2 22 | 3 6 4 2 8 5 7 1 23 | 3 6 8 1 4 7 5 2 24 | 3 6 8 1 5 7 2 4 25 | 3 6 8 2 4 1 7 5 26 | 3 7 2 8 5 1 4 6 27 | 3 7 2 8 6 4 1 5 28 | 3 8 4 7 1 6 2 5 29 | 4 1 5 8 2 7 3 6 30 | 4 1 5 8 6 3 7 2 31 | 4 2 5 8 6 1 3 7 32 | 4 2 7 3 6 8 1 5 33 | 4 2 7 3 6 8 5 1 34 | 4 2 7 5 1 8 6 3 35 | 4 2 8 5 7 1 3 6 36 | 4 2 8 6 1 3 5 7 37 | 4 6 1 5 2 8 3 7 38 | 4 6 8 2 7 1 3 5 39 | 4 6 8 3 1 7 5 2 40 | 4 7 1 8 5 2 6 3 41 | 4 7 3 8 2 5 1 6 42 | 4 7 5 2 6 1 3 8 43 | 4 7 5 3 1 6 8 2 44 | 4 8 1 3 6 2 7 5 45 | 4 8 1 5 7 2 6 3 46 | 4 8 5 3 1 7 2 6 47 | 5 1 4 6 8 2 7 3 48 | 5 1 8 4 2 7 3 6 49 | 5 1 8 6 3 7 2 4 50 | 5 2 4 6 8 3 1 7 51 | 5 2 4 7 3 8 6 1 52 | 5 2 6 1 7 4 8 3 53 | 5 2 8 1 4 7 3 6 54 | 5 3 1 6 8 2 4 7 55 | 5 3 1 7 2 8 6 4 56 | 5 3 8 4 7 1 6 2 57 | 5 7 1 3 8 6 4 2 58 | 5 7 1 4 2 8 6 3 59 | 5 7 2 4 8 1 3 6 60 | 5 7 2 6 3 1 4 8 61 | 5 7 2 6 3 1 8 4 62 | 5 7 4 1 3 8 6 2 63 | 5 8 4 1 3 6 2 7 64 | 5 8 4 1 7 2 6 3 65 | 6 1 5 2 8 3 7 4 66 | 6 2 7 1 3 5 8 4 67 | 6 2 7 1 4 8 5 3 68 | 6 3 1 7 5 8 2 4 69 | 6 3 1 8 4 2 7 5 70 | 6 3 1 8 5 2 4 7 71 | 6 3 5 7 1 4 2 8 72 | 6 3 5 8 1 4 2 7 73 | 6 3 7 2 4 8 1 5 74 | 6 3 7 2 8 5 1 4 75 | 6 3 7 4 1 8 2 5 76 | 6 4 1 5 8 2 7 3 77 | 6 4 2 8 5 7 1 3 78 | 6 4 7 1 3 5 2 8 79 | 6 4 7 1 8 2 5 3 80 | 6 8 2 4 1 7 5 3 81 | 7 1 3 8 6 4 2 5 82 | 7 2 4 1 8 5 3 6 83 | 7 2 6 3 1 4 8 5 84 | 7 3 1 6 8 5 2 4 85 | 7 3 8 2 5 1 6 4 86 | 7 4 2 5 8 1 3 6 87 | 7 4 2 8 6 1 3 5 88 | 7 5 3 1 6 8 2 4 89 | 8 2 4 1 7 5 3 6 90 | 8 2 5 3 1 7 4 6 91 | 8 3 1 6 2 5 7 4 92 | 8 4 1 3 6 2 7 5 93 | -------------------------------------------------------------------------------- /x86/linux/tst/8q.2bk: -------------------------------------------------------------------------------- 1 | tst/8q.c:30: warning: missing return value 2 | tst/8q.c:39: warning: missing return value 3 | -------------------------------------------------------------------------------- /x86/linux/tst/array.1bk: -------------------------------------------------------------------------------- 1 | 0 1 2 3 1000 1001 1002 1003 2000 2001 2002 2003 2 | 0 1 2 3 1000 1001 1002 1003 2000 2001 2002 2003 3 | 0 1 2 3 1000 1001 1002 1003 2000 2001 2002 2003 4 | 0 1 2 3 1000 1001 1002 1003 2000 2001 2002 2003 5 | -------------------------------------------------------------------------------- /x86/linux/tst/array.2bk: -------------------------------------------------------------------------------- 1 | tst/array.c:33: warning: missing return value 2 | tst/array.c:48: warning: missing return value 3 | -------------------------------------------------------------------------------- /x86/linux/tst/cf.1bk: -------------------------------------------------------------------------------- 1 | char freq 2 | 011 8.1 3 | 012 6.1 4 | 040 11.9 5 | ! 0.2 6 | " 1.5 7 | % 0.6 8 | & 0.4 9 | ' 0.4 10 | ( 2.9 11 | ) 2.9 12 | * 0.8 13 | + 1.3 14 | , 1.3 15 | - 0.4 16 | . 0.6 17 | / 1.0 18 | 0 2.5 19 | 1 1.9 20 | 2 0.6 21 | 3 0.2 22 | 7 0.4 23 | 8 0.2 24 | ; 3.8 25 | < 0.8 26 | = 2.7 27 | > 0.2 28 | [ 1.5 29 | \ 0.8 30 | ] 1.5 31 | a 3.1 32 | c 4.4 33 | e 2.3 34 | f 6.0 35 | g 1.3 36 | h 1.0 37 | i 5.0 38 | l 1.0 39 | m 0.2 40 | n 3.3 41 | o 2.1 42 | p 1.0 43 | q 0.4 44 | r 4.2 45 | s 0.6 46 | t 3.8 47 | u 1.2 48 | v 0.6 49 | w 0.2 50 | { 0.6 51 | } 0.6 52 | -------------------------------------------------------------------------------- /x86/linux/tst/cf.2bk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drh/lcc/2b5cf358d9aa6759923dd7461f2df7f7f2a28471/x86/linux/tst/cf.2bk -------------------------------------------------------------------------------- /x86/linux/tst/cq.1bk: -------------------------------------------------------------------------------- 1 | Section s22 returned 0. 2 | Decimal and octal/hex constants sometimes give 3 | different results when assigned to longs. 4 | Decimal and octal/hex constants sometimes give 5 | different results when assigned to longs. 6 | Section s241 returned 0. 7 | Section s243 returned 0. 8 | Section s244 returned 0. 9 | Section s25 returned 0. 10 | 8 bits in chars. 11 | 32 bits in ints. 12 | 16 bits in shorts. 13 | 32 bits in longs. 14 | 32 bits in unsigneds. 15 | 32 bits in floats. 16 | 64 bits in doubles. 17 | 1.192093e-07 is the least number that can be added to 1. (float). 18 | 2.220446e-16 is the least number that can be added to 1. (double). 19 | Section s26 returned 0. 20 | Section s4 returned 0. 21 | Section s61 returned 0. 22 | Section s626 returned 0. 23 | Section s71 returned 0. 24 | Section s72 returned 0. 25 | Section s757 returned 0. 26 | Section s7813 returned 0. 27 | Section s714 returned 0. 28 | Section s715 returned 0. 29 | Register count for char is unreliable. 30 | Register count for pointer is unreliable. 31 | Register count for int is unreliable. 32 | Section s81 returned 0. 33 | Section s84 returned 0. 34 | char alignment: 1 35 | short alignment: 2 36 | int alignment: 4 37 | long alignment: 4 38 | unsigned alignment: 4 39 | float alignment: 4 40 | double alignment: 4 41 | Sign extension in fields 42 | Be especially careful with 1-bit fields! 43 | Section s85 returned 0. 44 | Section s86 returned 0. 45 | Section s88 returned 0. 46 | Section s9 returned 0. 47 | 48 | No errors detected. 49 | -------------------------------------------------------------------------------- /x86/linux/tst/cq.2bk: -------------------------------------------------------------------------------- 1 | tst/cq.c:394: warning: overflow in converting constant expression from `unsigned long' to `long int' 2 | tst/cq.c:394: warning: overflow in converting constant expression from `unsigned long' to `long int' 3 | tst/cq.c:394: warning: overflow in converting constant expression from `unsigned long' to `long int' 4 | tst/cq.c:395: warning: overflow in constant `4294967296' 5 | tst/cq.c:395: warning: overflow in converting constant expression from `unsigned long' to `long int' 6 | tst/cq.c:395: warning: overflow in constant `040000000000' 7 | tst/cq.c:395: warning: overflow in converting constant expression from `unsigned long' to `long int' 8 | tst/cq.c:395: warning: overflow in constant `0x100000000' 9 | tst/cq.c:395: warning: overflow in converting constant expression from `unsigned long' to `long int' 10 | tst/cq.c:396: warning: overflow in constant `68719476735' 11 | tst/cq.c:396: warning: overflow in converting constant expression from `unsigned long' to `long int' 12 | tst/cq.c:396: warning: overflow in constant `0777777777777' 13 | tst/cq.c:396: warning: overflow in converting constant expression from `unsigned long' to `long int' 14 | tst/cq.c:396: warning: overflow in constant `0xfffffffff' 15 | tst/cq.c:396: warning: overflow in converting constant expression from `unsigned long' to `long int' 16 | tst/cq.c:397: warning: overflow in constant `68719476736' 17 | tst/cq.c:397: warning: overflow in converting constant expression from `unsigned long' to `long int' 18 | tst/cq.c:397: warning: overflow in constant `01000000000000' 19 | tst/cq.c:397: warning: overflow in converting constant expression from `unsigned long' to `long int' 20 | tst/cq.c:397: warning: overflow in constant `0x1000000000' 21 | tst/cq.c:397: warning: overflow in converting constant expression from `unsigned long' to `long int' 22 | tst/cq.c:533: warning: missing return value 23 | tst/cq.c:1169: warning: missing return value 24 | tst/cq.c:5294: warning: unreachable code 25 | tst/cq.c:5303: warning: missing return value 26 | -------------------------------------------------------------------------------- /x86/linux/tst/cvt.1bk: -------------------------------------------------------------------------------- 1 | 1 1 1 1 1 1 1 1 1.000000 1.000000 1.000000 2 | 2 2 2 2 2 2 2 2 2.000000 2.000000 2.000000 3 | 3 3 3 3 3 3 3 3 3.000000 3.000000 3.000000 4 | 4 4 4 4 4 4 4 4 4.000000 4.000000 4.000000 5 | 5 5 5 5 5 5 5 5 5.000000 5.000000 5.000000 6 | 6 6 6 6 6 6 6 6 6.000000 6.000000 6.000000 7 | 7 7 7 7 7 7 7 7 7.000000 7.000000 7.000000 8 | 8 8 8 8 8 8 8 8 8.000000 8.000000 8.000000 9 | 9 9 9 9 9 9 9 9 9.000000 9.000000 9.000000 10 | 10 10 10 10 10 10 10 10 10.000000 10.000000 10.000000 11 | 11 11 11 11 11 11 11 11 11.000000 11.000000 11.000000 12 | -------------------------------------------------------------------------------- /x86/linux/tst/cvt.2bk: -------------------------------------------------------------------------------- 1 | tst/cvt.c:32: warning: conversion from `pointer to void function(void)' to `pointer to void' is compiler dependent 2 | tst/cvt.c:33: warning: conversion from `pointer to void' to `pointer to void function(void)' is compiler dependent 3 | -------------------------------------------------------------------------------- /x86/linux/tst/fields.1bk: -------------------------------------------------------------------------------- 1 | x = 1 2 3 4 -3 6 2 | y = 3 8 9 3 | x = 1 2 3 0 0 6 4 | y = 2 8 16 5 | p->a = 0x3, p->b = 0xf 6 | -------------------------------------------------------------------------------- /x86/linux/tst/fields.2bk: -------------------------------------------------------------------------------- 1 | tst/fields.c:6: warning: initializer exceeds bit-field width 2 | tst/fields.c:8: warning: initializer exceeds bit-field width 3 | tst/fields.c:30: warning: missing return value 4 | tst/fields.c:34: warning: missing return value 5 | -------------------------------------------------------------------------------- /x86/linux/tst/front.2bk: -------------------------------------------------------------------------------- 1 | tst/front.c:3: warning: missing return value 2 | tst/front.c:10: warning: missing return value 3 | tst/front.c:20: type error in argument 1 to `s'; found `pointer to struct D' expected `pointer to incomplete struct D defined at tst/front.c:14' 4 | tst/front.c:21: warning: missing return value 5 | tst/front.c:32: warning: missing return value 6 | tst/front.c:36: operands of = have illegal types `pointer to int' and `pointer to const int' 7 | tst/front.c:38: warning: missing return value 8 | tst/front.c:62: operands of = have illegal types `pointer to char' and `pointer to const void' 9 | tst/front.c:63: warning: missing return value 10 | tst/front.c:68: warning: missing return value 11 | tst/front.c:69: warning: inconsistent linkage for `yy' previously declared at tst/front.c:68 12 | tst/front.c:69: warning: missing return value 13 | tst/front.c:71: invalid storage class `static' for `int function goo' 14 | tst/front.c:71: warning: declaration of `goo' does not match previous declaration at tst/front.c:70 15 | tst/front.c:71: warning: missing return value 16 | tst/front.c:74: warning: declaration of `xr' does not match previous declaration at tst/front.c:72 17 | tst/front.c:74: warning: missing return value 18 | tst/front.c:81: warning: missing return value 19 | tst/front.c:82: warning: declaration of `ss2' does not match previous declaration at tst/front.c:81 20 | tst/front.c:84: warning: inconsistent linkage for `ss5' previously declared at tst/front.c:80 21 | tst/front.c:92: type error in argument 1 to `gx1'; found `pointer to double' expected `double' 22 | tst/front.c:92: warning: missing return value 23 | tst/front.c:95: redeclaration of `hx1' previously declared at tst/front.c:94 24 | tst/front.c:98: warning: missing return value 25 | tst/front.c:101: conflicting argument declarations for function `gg1' 26 | tst/front.c:101: warning: missing return value 27 | tst/front.c:112: type error in argument 4 to `qsort'; found `pointer to int function(pointer to pointer to char,pointer to pointer to char)' expected `pointer to int function(pointer to const void,pointer to const void)' 28 | tst/front.c:113: warning: missing return value 29 | tst/front.c:120: warning: missing return value 30 | -------------------------------------------------------------------------------- /x86/linux/tst/incr.1bk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drh/lcc/2b5cf358d9aa6759923dd7461f2df7f7f2a28471/x86/linux/tst/incr.1bk -------------------------------------------------------------------------------- /x86/linux/tst/incr.2bk: -------------------------------------------------------------------------------- 1 | tst/incr.c:1: warning: missing return value 2 | tst/incr.c:6: warning: expression with no effect elided 3 | tst/incr.c:6: warning: expression with no effect elided 4 | tst/incr.c:11: warning: missing return value 5 | tst/incr.c:16: warning: expression with no effect elided 6 | tst/incr.c:16: warning: expression with no effect elided 7 | tst/incr.c:21: warning: missing return value 8 | tst/incr.c:30: warning: missing return value 9 | tst/incr.c:39: warning: missing return value 10 | -------------------------------------------------------------------------------- /x86/linux/tst/init.1bk: -------------------------------------------------------------------------------- 1 | 1 2 3 4 2 | 5 6 3 | 7 4 | if 5 | for 6 | else 7 | while 8 | 1 2 3 if 9 | 4 5 0 for 10 | 6 7 8 else 11 | 9 10 11 while 12 | 1 2 3 if 13 | 4 5 0 for 14 | 6 7 8 else 15 | 9 10 11 while 16 | 0 0 0 17 | -------------------------------------------------------------------------------- /x86/linux/tst/init.2bk: -------------------------------------------------------------------------------- 1 | tst/init.c:36: warning: missing return value 2 | tst/init.c:49: warning: missing return value 3 | tst/init.c:59: warning: missing return value 4 | -------------------------------------------------------------------------------- /x86/linux/tst/limits.1bk: -------------------------------------------------------------------------------- 1 | UCHAR_MAX: 000000ff=255 2 | USHRT_MAX: 0000ffff=65535 3 | UINT_MAX: ffffffff=-1 4 | ULONG_MAX: ffffffff=-1 5 | CHAR_MAX: 0000007f=127 6 | SCHAR_MAX: 0000007f=127 7 | SHRT_MAX: 00007fff=32767 8 | INT_MAX: 7fffffff=2147483647 9 | LONG_MAX: 7fffffff=2147483647 10 | CHAR_MIN: ffffff80=-128 11 | SCHAR_MIN: ffffff80=-128 12 | SHRT_MIN: ffff8000=-32768 13 | INT_MIN: 80000000=-2147483648 14 | LONG_MIN: 80000000=-2147483648 15 | -------------------------------------------------------------------------------- /x86/linux/tst/limits.2bk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drh/lcc/2b5cf358d9aa6759923dd7461f2df7f7f2a28471/x86/linux/tst/limits.2bk -------------------------------------------------------------------------------- /x86/linux/tst/paranoia.2bk: -------------------------------------------------------------------------------- 1 | tst/paranoia.c:1867: warning: missing return value 2 | tst/paranoia.c:1874: warning: missing return value 3 | tst/paranoia.c:1884: warning: missing return value 4 | tst/paranoia.c:1924: warning: missing return value 5 | tst/paranoia.c:1939: warning: missing return value 6 | tst/paranoia.c:1956: warning: missing return value 7 | tst/paranoia.c:1975: warning: missing return value 8 | tst/paranoia.c:1988: warning: missing return value 9 | tst/paranoia.c:1995: warning: missing return value 10 | tst/paranoia.c:2055: warning: missing return value 11 | tst/paranoia.c:2062: warning: missing return value 12 | tst/paranoia.c:2070: warning: missing return value 13 | tst/paranoia.c:2087: warning: missing return value 14 | tst/paranoia.c:2115: warning: missing return value 15 | tst/paranoia.c:2144: warning: missing return value 16 | tst/paranoia.c:2173: warning: missing return value 17 | -------------------------------------------------------------------------------- /x86/linux/tst/sort.1bk: -------------------------------------------------------------------------------- 1 | exchange(1,9) 2 | exchange(3,7) 3 | exchange(5,6) 4 | exchange(0,5) 5 | exchange(0,3) 6 | exchange(0,0) 7 | exchange(1,2) 8 | exchange(6,6) 9 | exchange(8,9) 10 | exchange(7,8) 11 | -51 12 | -1 13 | 0 14 | 1 15 | 3 16 | 10 17 | 18 18 | 32 19 | 567 20 | 789 21 | -------------------------------------------------------------------------------- /x86/linux/tst/sort.2bk: -------------------------------------------------------------------------------- 1 | tst/sort.c:23: warning: missing return value 2 | tst/sort.c:30: warning: missing return value 3 | tst/sort.c:37: warning: missing return value 4 | tst/sort.c:41: warning: missing return value 5 | tst/sort.c:65: warning: missing return value 6 | -------------------------------------------------------------------------------- /x86/linux/tst/spill.1bk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drh/lcc/2b5cf358d9aa6759923dd7461f2df7f7f2a28471/x86/linux/tst/spill.1bk -------------------------------------------------------------------------------- /x86/linux/tst/spill.2bk: -------------------------------------------------------------------------------- 1 | tst/spill.c:1: warning: missing return value 2 | tst/spill.c:3: warning: missing return value 3 | tst/spill.c:5: warning: missing return value 4 | tst/spill.c:7: warning: missing return value 5 | tst/spill.c:9: warning: missing return value 6 | tst/spill.c:17: warning: missing return value 7 | -------------------------------------------------------------------------------- /x86/linux/tst/stdarg.1bk: -------------------------------------------------------------------------------- 1 | test 1 2 | test 2 3 | test 3 4 | test 4 5 | test 5.000000 6 | {1 2 3 4} {1 2 3 4} {1 2 3 4} {1 2 3 4} {1 2 3 4} {1 2 3 4} 7 | -------------------------------------------------------------------------------- /x86/linux/tst/stdarg.2bk: -------------------------------------------------------------------------------- 1 | tst/stdarg.c:51: warning: missing return value 2 | -------------------------------------------------------------------------------- /x86/linux/tst/struct.1bk: -------------------------------------------------------------------------------- 1 | (-1,-1) is not within [10,10; 310,310] 2 | (1,1) is not within [10,10; 310,310] 3 | (20,300) is within [10,10; 310,310] 4 | (500,400) is not within [10,10; 310,310] 5 | ab 6 | -------------------------------------------------------------------------------- /x86/linux/tst/struct.2bk: -------------------------------------------------------------------------------- 1 | tst/struct.c:49: warning: missing return value 2 | tst/struct.c:68: warning: missing return value 3 | -------------------------------------------------------------------------------- /x86/linux/tst/switch.1bk: -------------------------------------------------------------------------------- 1 | b = 0x8 2 | f = 0xc 3 | n = 0xa 4 | r = 0xd 5 | t = 0x9 6 | v = 0xb 7 | x = 0x78 8 | f: 9 | x = 0 10 | x = 1 11 | x = 2 12 | x = 2 13 | x = 2 14 | x = 2 15 | x = 2 16 | x = 7 17 | x = 8 18 | x = 9 19 | x = 9 20 | x = 9 21 | x = 9 22 | x = 9 23 | x = 9 24 | x = 9 25 | x = 16 26 | x = 17 27 | x = 18 28 | x = 19 29 | x = 20 30 | g: 31 | 1 1 32 | 1 2 33 | 2 3 34 | 2 4 35 | 2 5 36 | 3 6 37 | d 6 38 | 3 7 39 | d 7 40 | 3 8 41 | d 8 42 | d 9 43 | d 10 44 | h: 45 | i = 8 46 | i = 16 47 | i = 120 48 | i = 128 49 | i = 248 50 | i = 264 51 | i = 272 52 | i = 280 53 | i = 288 54 | i = 296 55 | i = 304 56 | i = 312 57 | 488 defaults 58 | x = 0x1000000 59 | x = 0x2000000 60 | x = 0x3000000 61 | x = 0x4000000 62 | x = 0x5000000 63 | x = 0x6000000 (default) 64 | x = 0x7000000 (default) 65 | 0 66 | 1 67 | 2 68 | 3 69 | 4 70 | 5 71 | 0 72 | 1 73 | 2 74 | 3 75 | 4 76 | 5 77 | -------------------------------------------------------------------------------- /x86/linux/tst/switch.2bk: -------------------------------------------------------------------------------- 1 | tst/switch.c:55: warning: missing return value 2 | tst/switch.c:73: warning: missing return value 3 | tst/switch.c:97: warning: missing return value 4 | tst/switch.c:112: warning: missing return value 5 | tst/switch.c:137: warning: missing return value 6 | -------------------------------------------------------------------------------- /x86/linux/tst/wf1.1bk: -------------------------------------------------------------------------------- 1 | 5 a 2 | 2 and 3 | 5 buf 4 | 16 c 5 | 8 char 6 | 1 compare 7 | 4 cond 8 | 5 count 9 | 1 d 10 | 1 die 11 | 3 else 12 | 1 entry 13 | 1 eof 14 | 4 err 15 | 1 error 16 | 1 exit 17 | 1 folded 18 | 1 for 19 | 1 free 20 | 1 frequencies 21 | 1 frequency 22 | 1 get 23 | 2 getchar 24 | 3 getword 25 | 14 if 26 | 2 in 27 | 1 index 28 | 1 input 29 | 1 install 30 | 8 int 31 | 1 into 32 | 1 is 33 | 4 isletter 34 | 1 it 35 | 1 itself 36 | 5 left 37 | 1 letter 38 | 7 lookup 39 | 1 main 40 | 2 malloc 41 | 1 message 42 | 2 n 43 | 1 necessary 44 | 12 next 45 | 9 node 46 | 4 of 47 | 1 on 48 | 1 or 49 | 1 otherwise 50 | 2 out 51 | 8 p 52 | 3 print 53 | 2 printf 54 | 16 return 55 | 5 right 56 | 4 root 57 | 25 s 58 | 2 storage 59 | 3 strcmp 60 | 1 strcpy 61 | 1 strlen 62 | 8 struct 63 | 1 structures 64 | 2 subtree 65 | 1 t 66 | 5 tprint 67 | 9 tree 68 | 1 uses 69 | 1 version 70 | 1 wf 71 | 3 while 72 | 21 word 73 | 9 words 74 | 2 z 75 | -------------------------------------------------------------------------------- /x86/linux/tst/wf1.2bk: -------------------------------------------------------------------------------- 1 | tst/wf1.c:29: warning: missing return value 2 | tst/wf1.c:87: warning: missing return value 3 | -------------------------------------------------------------------------------- /x86/linux/tst/yacc.1bk: -------------------------------------------------------------------------------- 1 | a 2 | b 3 | load 4 | negate 5 | push 5 6 | c 7 | load 8 | multiply 9 | add 10 | store 11 | -------------------------------------------------------------------------------- /x86/linux/tst/yacc.2bk: -------------------------------------------------------------------------------- 1 | tst/yacc.c:345: warning: missing return value 2 | tst/yacc.c:349: warning: missing return value 3 | tst/yacc.c:360: warning: missing return value 4 | -------------------------------------------------------------------------------- /x86/win32/tst/8q.1bk: -------------------------------------------------------------------------------- 1 | 1 5 8 6 3 7 2 4 2 | 1 6 8 3 7 4 2 5 3 | 1 7 4 6 8 2 5 3 4 | 1 7 5 8 2 4 6 3 5 | 2 4 6 8 3 1 7 5 6 | 2 5 7 1 3 8 6 4 7 | 2 5 7 4 1 8 6 3 8 | 2 6 1 7 4 8 3 5 9 | 2 6 8 3 1 4 7 5 10 | 2 7 3 6 8 5 1 4 11 | 2 7 5 8 1 4 6 3 12 | 2 8 6 1 3 5 7 4 13 | 3 1 7 5 8 2 4 6 14 | 3 5 2 8 1 7 4 6 15 | 3 5 2 8 6 4 7 1 16 | 3 5 7 1 4 2 8 6 17 | 3 5 8 4 1 7 2 6 18 | 3 6 2 5 8 1 7 4 19 | 3 6 2 7 1 4 8 5 20 | 3 6 2 7 5 1 8 4 21 | 3 6 4 1 8 5 7 2 22 | 3 6 4 2 8 5 7 1 23 | 3 6 8 1 4 7 5 2 24 | 3 6 8 1 5 7 2 4 25 | 3 6 8 2 4 1 7 5 26 | 3 7 2 8 5 1 4 6 27 | 3 7 2 8 6 4 1 5 28 | 3 8 4 7 1 6 2 5 29 | 4 1 5 8 2 7 3 6 30 | 4 1 5 8 6 3 7 2 31 | 4 2 5 8 6 1 3 7 32 | 4 2 7 3 6 8 1 5 33 | 4 2 7 3 6 8 5 1 34 | 4 2 7 5 1 8 6 3 35 | 4 2 8 5 7 1 3 6 36 | 4 2 8 6 1 3 5 7 37 | 4 6 1 5 2 8 3 7 38 | 4 6 8 2 7 1 3 5 39 | 4 6 8 3 1 7 5 2 40 | 4 7 1 8 5 2 6 3 41 | 4 7 3 8 2 5 1 6 42 | 4 7 5 2 6 1 3 8 43 | 4 7 5 3 1 6 8 2 44 | 4 8 1 3 6 2 7 5 45 | 4 8 1 5 7 2 6 3 46 | 4 8 5 3 1 7 2 6 47 | 5 1 4 6 8 2 7 3 48 | 5 1 8 4 2 7 3 6 49 | 5 1 8 6 3 7 2 4 50 | 5 2 4 6 8 3 1 7 51 | 5 2 4 7 3 8 6 1 52 | 5 2 6 1 7 4 8 3 53 | 5 2 8 1 4 7 3 6 54 | 5 3 1 6 8 2 4 7 55 | 5 3 1 7 2 8 6 4 56 | 5 3 8 4 7 1 6 2 57 | 5 7 1 3 8 6 4 2 58 | 5 7 1 4 2 8 6 3 59 | 5 7 2 4 8 1 3 6 60 | 5 7 2 6 3 1 4 8 61 | 5 7 2 6 3 1 8 4 62 | 5 7 4 1 3 8 6 2 63 | 5 8 4 1 3 6 2 7 64 | 5 8 4 1 7 2 6 3 65 | 6 1 5 2 8 3 7 4 66 | 6 2 7 1 3 5 8 4 67 | 6 2 7 1 4 8 5 3 68 | 6 3 1 7 5 8 2 4 69 | 6 3 1 8 4 2 7 5 70 | 6 3 1 8 5 2 4 7 71 | 6 3 5 7 1 4 2 8 72 | 6 3 5 8 1 4 2 7 73 | 6 3 7 2 4 8 1 5 74 | 6 3 7 2 8 5 1 4 75 | 6 3 7 4 1 8 2 5 76 | 6 4 1 5 8 2 7 3 77 | 6 4 2 8 5 7 1 3 78 | 6 4 7 1 3 5 2 8 79 | 6 4 7 1 8 2 5 3 80 | 6 8 2 4 1 7 5 3 81 | 7 1 3 8 6 4 2 5 82 | 7 2 4 1 8 5 3 6 83 | 7 2 6 3 1 4 8 5 84 | 7 3 1 6 8 5 2 4 85 | 7 3 8 2 5 1 6 4 86 | 7 4 2 5 8 1 3 6 87 | 7 4 2 8 6 1 3 5 88 | 7 5 3 1 6 8 2 4 89 | 8 2 4 1 7 5 3 6 90 | 8 2 5 3 1 7 4 6 91 | 8 3 1 6 2 5 7 4 92 | 8 4 1 3 6 2 7 5 93 | -------------------------------------------------------------------------------- /x86/win32/tst/8q.2bk: -------------------------------------------------------------------------------- 1 | tst/8q.c:30: warning: missing return value 2 | tst/8q.c:39: warning: missing return value 3 | -------------------------------------------------------------------------------- /x86/win32/tst/array.1bk: -------------------------------------------------------------------------------- 1 | 0 1 2 3 1000 1001 1002 1003 2000 2001 2002 2003 2 | 0 1 2 3 1000 1001 1002 1003 2000 2001 2002 2003 3 | 0 1 2 3 1000 1001 1002 1003 2000 2001 2002 2003 4 | 0 1 2 3 1000 1001 1002 1003 2000 2001 2002 2003 5 | -------------------------------------------------------------------------------- /x86/win32/tst/array.2bk: -------------------------------------------------------------------------------- 1 | tst/array.c:33: warning: missing return value 2 | tst/array.c:48: warning: missing return value 3 | -------------------------------------------------------------------------------- /x86/win32/tst/cf.1bk: -------------------------------------------------------------------------------- 1 | char freq 2 | 011 8.1 3 | 012 6.1 4 | 040 11.9 5 | ! 0.2 6 | " 1.5 7 | % 0.6 8 | & 0.4 9 | ' 0.4 10 | ( 2.9 11 | ) 2.9 12 | * 0.8 13 | + 1.3 14 | , 1.3 15 | - 0.4 16 | . 0.6 17 | / 1.0 18 | 0 2.5 19 | 1 1.9 20 | 2 0.6 21 | 3 0.2 22 | 7 0.4 23 | 8 0.2 24 | ; 3.8 25 | < 0.8 26 | = 2.7 27 | > 0.2 28 | [ 1.5 29 | \ 0.8 30 | ] 1.5 31 | a 3.1 32 | c 4.4 33 | e 2.3 34 | f 6.0 35 | g 1.3 36 | h 1.0 37 | i 5.0 38 | l 1.0 39 | m 0.2 40 | n 3.3 41 | o 2.1 42 | p 1.0 43 | q 0.4 44 | r 4.2 45 | s 0.6 46 | t 3.8 47 | u 1.2 48 | v 0.6 49 | w 0.2 50 | { 0.6 51 | } 0.6 52 | -------------------------------------------------------------------------------- /x86/win32/tst/cf.2bk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drh/lcc/2b5cf358d9aa6759923dd7461f2df7f7f2a28471/x86/win32/tst/cf.2bk -------------------------------------------------------------------------------- /x86/win32/tst/cq.1bk: -------------------------------------------------------------------------------- 1 | Section s22 returned 0. 2 | Decimal and octal/hex constants sometimes give 3 | different results when assigned to longs. 4 | Decimal and octal/hex constants sometimes give 5 | different results when assigned to longs. 6 | Section s241 returned 0. 7 | Section s243 returned 0. 8 | Section s244 returned 0. 9 | Section s25 returned 0. 10 | 8 bits in chars. 11 | 32 bits in ints. 12 | 16 bits in shorts. 13 | 32 bits in longs. 14 | 32 bits in unsigneds. 15 | 32 bits in floats. 16 | 64 bits in doubles. 17 | 1.192093e-007 is the least number that can be added to 1. (float). 18 | 2.220446e-016 is the least number that can be added to 1. (double). 19 | Section s26 returned 0. 20 | Section s4 returned 0. 21 | Section s61 returned 0. 22 | Section s626 returned 0. 23 | Section s71 returned 0. 24 | Section s72 returned 0. 25 | Section s757 returned 0. 26 | Section s7813 returned 0. 27 | Section s714 returned 0. 28 | Section s715 returned 0. 29 | Register count for char is unreliable. 30 | Register count for pointer is unreliable. 31 | Register count for int is unreliable. 32 | Section s81 returned 0. 33 | Section s84 returned 0. 34 | char alignment: 1 35 | short alignment: 2 36 | int alignment: 4 37 | long alignment: 4 38 | unsigned alignment: 4 39 | float alignment: 4 40 | double alignment: 4 41 | Sign extension in fields 42 | Be especially careful with 1-bit fields! 43 | Section s85 returned 0. 44 | Section s86 returned 0. 45 | Section s88 returned 0. 46 | Section s9 returned 0. 47 | 48 | No errors detected. 49 | -------------------------------------------------------------------------------- /x86/win32/tst/cq.2bk: -------------------------------------------------------------------------------- 1 | tst/cq.c:394: warning: overflow in converting constant expression from `unsigned long' to `long int' 2 | tst/cq.c:394: warning: overflow in converting constant expression from `unsigned long' to `long int' 3 | tst/cq.c:394: warning: overflow in converting constant expression from `unsigned long' to `long int' 4 | tst/cq.c:395: warning: overflow in constant `4294967296' 5 | tst/cq.c:395: warning: overflow in converting constant expression from `unsigned long' to `long int' 6 | tst/cq.c:395: warning: overflow in constant `040000000000' 7 | tst/cq.c:395: warning: overflow in converting constant expression from `unsigned long' to `long int' 8 | tst/cq.c:395: warning: overflow in constant `0x100000000' 9 | tst/cq.c:395: warning: overflow in converting constant expression from `unsigned long' to `long int' 10 | tst/cq.c:396: warning: overflow in constant `68719476735' 11 | tst/cq.c:396: warning: overflow in converting constant expression from `unsigned long' to `long int' 12 | tst/cq.c:396: warning: overflow in constant `0777777777777' 13 | tst/cq.c:396: warning: overflow in converting constant expression from `unsigned long' to `long int' 14 | tst/cq.c:396: warning: overflow in constant `0xfffffffff' 15 | tst/cq.c:396: warning: overflow in converting constant expression from `unsigned long' to `long int' 16 | tst/cq.c:397: warning: overflow in constant `68719476736' 17 | tst/cq.c:397: warning: overflow in converting constant expression from `unsigned long' to `long int' 18 | tst/cq.c:397: warning: overflow in constant `01000000000000' 19 | tst/cq.c:397: warning: overflow in converting constant expression from `unsigned long' to `long int' 20 | tst/cq.c:397: warning: overflow in constant `0x1000000000' 21 | tst/cq.c:397: warning: overflow in converting constant expression from `unsigned long' to `long int' 22 | tst/cq.c:533: warning: missing return value 23 | tst/cq.c:1169: warning: missing return value 24 | tst/cq.c:5294: warning: unreachable code 25 | tst/cq.c:5303: warning: missing return value 26 | -------------------------------------------------------------------------------- /x86/win32/tst/cvt.1bk: -------------------------------------------------------------------------------- 1 | 1 1 1 1 1 1 1 1 1.000000 1.000000 1.000000 2 | 2 2 2 2 2 2 2 2 2.000000 2.000000 2.000000 3 | 3 3 3 3 3 3 3 3 3.000000 3.000000 3.000000 4 | 4 4 4 4 4 4 4 4 4.000000 4.000000 4.000000 5 | 5 5 5 5 5 5 5 5 5.000000 5.000000 5.000000 6 | 6 6 6 6 6 6 6 6 6.000000 6.000000 6.000000 7 | 7 7 7 7 7 7 7 7 7.000000 7.000000 7.000000 8 | 8 8 8 8 8 8 8 8 8.000000 8.000000 8.000000 9 | 9 9 9 9 9 9 9 9 9.000000 9.000000 9.000000 10 | 10 10 10 10 10 10 10 10 10.000000 10.000000 10.000000 11 | 11 11 11 11 11 11 11 11 11.000000 11.000000 11.000000 12 | -------------------------------------------------------------------------------- /x86/win32/tst/cvt.2bk: -------------------------------------------------------------------------------- 1 | tst/cvt.c:32: warning: conversion from `pointer to void function(void)' to `pointer to void' is compiler dependent 2 | tst/cvt.c:33: warning: conversion from `pointer to void' to `pointer to void function(void)' is compiler dependent 3 | -------------------------------------------------------------------------------- /x86/win32/tst/fields.1bk: -------------------------------------------------------------------------------- 1 | x = 1 2 3 4 -3 6 2 | y = 3 8 9 3 | x = 1 2 3 0 0 6 4 | y = 2 8 16 5 | p->a = 0x3, p->b = 0xf 6 | -------------------------------------------------------------------------------- /x86/win32/tst/fields.2bk: -------------------------------------------------------------------------------- 1 | tst/fields.c:6: warning: initializer exceeds bit-field width 2 | tst/fields.c:8: warning: initializer exceeds bit-field width 3 | tst/fields.c:30: warning: missing return value 4 | tst/fields.c:34: warning: missing return value 5 | -------------------------------------------------------------------------------- /x86/win32/tst/front.2bk: -------------------------------------------------------------------------------- 1 | tst/front.c:3: warning: missing return value 2 | tst/front.c:10: warning: missing return value 3 | tst/front.c:20: type error in argument 1 to `s'; found `pointer to struct D' expected `pointer to incomplete struct D defined at tst/front.c:14' 4 | tst/front.c:21: warning: missing return value 5 | tst/front.c:32: warning: missing return value 6 | tst/front.c:36: operands of = have illegal types `pointer to int' and `pointer to const int' 7 | tst/front.c:38: warning: missing return value 8 | tst/front.c:62: operands of = have illegal types `pointer to char' and `pointer to const void' 9 | tst/front.c:63: warning: missing return value 10 | tst/front.c:68: warning: missing return value 11 | tst/front.c:69: warning: inconsistent linkage for `yy' previously declared at tst/front.c:68 12 | tst/front.c:69: warning: missing return value 13 | tst/front.c:71: invalid storage class `static' for `int function goo' 14 | tst/front.c:71: warning: declaration of `goo' does not match previous declaration at tst/front.c:70 15 | tst/front.c:71: warning: missing return value 16 | tst/front.c:74: warning: declaration of `xr' does not match previous declaration at tst/front.c:72 17 | tst/front.c:74: warning: missing return value 18 | tst/front.c:81: warning: missing return value 19 | tst/front.c:82: warning: declaration of `ss2' does not match previous declaration at tst/front.c:81 20 | tst/front.c:84: warning: inconsistent linkage for `ss5' previously declared at tst/front.c:80 21 | tst/front.c:92: type error in argument 1 to `gx1'; found `pointer to double' expected `double' 22 | tst/front.c:92: warning: missing return value 23 | tst/front.c:95: redeclaration of `hx1' previously declared at tst/front.c:94 24 | tst/front.c:98: warning: missing return value 25 | tst/front.c:101: conflicting argument declarations for function `gg1' 26 | tst/front.c:101: warning: missing return value 27 | tst/front.c:112: type error in argument 4 to `qsort'; found `pointer to int function(pointer to pointer to char,pointer to pointer to char)' expected `pointer to int function(pointer to const void,pointer to const void)' 28 | tst/front.c:113: warning: missing return value 29 | tst/front.c:120: warning: missing return value 30 | -------------------------------------------------------------------------------- /x86/win32/tst/incr.1bk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drh/lcc/2b5cf358d9aa6759923dd7461f2df7f7f2a28471/x86/win32/tst/incr.1bk -------------------------------------------------------------------------------- /x86/win32/tst/incr.2bk: -------------------------------------------------------------------------------- 1 | tst/incr.c:1: warning: missing return value 2 | tst/incr.c:6: warning: expression with no effect elided 3 | tst/incr.c:6: warning: expression with no effect elided 4 | tst/incr.c:11: warning: missing return value 5 | tst/incr.c:16: warning: expression with no effect elided 6 | tst/incr.c:16: warning: expression with no effect elided 7 | tst/incr.c:21: warning: missing return value 8 | tst/incr.c:30: warning: missing return value 9 | tst/incr.c:39: warning: missing return value 10 | -------------------------------------------------------------------------------- /x86/win32/tst/init.1bk: -------------------------------------------------------------------------------- 1 | 1 2 3 4 2 | 5 6 3 | 7 4 | if 5 | for 6 | else 7 | while 8 | 1 2 3 if 9 | 4 5 0 for 10 | 6 7 8 else 11 | 9 10 11 while 12 | 1 2 3 if 13 | 4 5 0 for 14 | 6 7 8 else 15 | 9 10 11 while 16 | 0 0 0 17 | -------------------------------------------------------------------------------- /x86/win32/tst/init.2bk: -------------------------------------------------------------------------------- 1 | tst/init.c:36: warning: missing return value 2 | tst/init.c:49: warning: missing return value 3 | tst/init.c:59: warning: missing return value 4 | -------------------------------------------------------------------------------- /x86/win32/tst/limits.1bk: -------------------------------------------------------------------------------- 1 | UCHAR_MAX: 000000ff=255 2 | USHRT_MAX: 0000ffff=65535 3 | UINT_MAX: ffffffff=-1 4 | ULONG_MAX: ffffffff=-1 5 | CHAR_MAX: 0000007f=127 6 | SCHAR_MAX: 0000007f=127 7 | SHRT_MAX: 00007fff=32767 8 | INT_MAX: 7fffffff=2147483647 9 | LONG_MAX: 7fffffff=2147483647 10 | CHAR_MIN: ffffff80=-128 11 | SCHAR_MIN: ffffff80=-128 12 | SHRT_MIN: ffff8000=-32768 13 | INT_MIN: 80000000=-2147483648 14 | LONG_MIN: 80000000=-2147483648 15 | -------------------------------------------------------------------------------- /x86/win32/tst/limits.2bk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drh/lcc/2b5cf358d9aa6759923dd7461f2df7f7f2a28471/x86/win32/tst/limits.2bk -------------------------------------------------------------------------------- /x86/win32/tst/paranoia.2bk: -------------------------------------------------------------------------------- 1 | tst/paranoia.c:1867: warning: missing return value 2 | tst/paranoia.c:1874: warning: missing return value 3 | tst/paranoia.c:1884: warning: missing return value 4 | tst/paranoia.c:1924: warning: missing return value 5 | tst/paranoia.c:1939: warning: missing return value 6 | tst/paranoia.c:1956: warning: missing return value 7 | tst/paranoia.c:1975: warning: missing return value 8 | tst/paranoia.c:1988: warning: missing return value 9 | tst/paranoia.c:1995: warning: missing return value 10 | tst/paranoia.c:2055: warning: missing return value 11 | tst/paranoia.c:2062: warning: missing return value 12 | tst/paranoia.c:2070: warning: missing return value 13 | tst/paranoia.c:2087: warning: missing return value 14 | tst/paranoia.c:2115: warning: missing return value 15 | tst/paranoia.c:2144: warning: missing return value 16 | tst/paranoia.c:2173: warning: missing return value 17 | -------------------------------------------------------------------------------- /x86/win32/tst/sort.1bk: -------------------------------------------------------------------------------- 1 | exchange(1,9) 2 | exchange(3,7) 3 | exchange(5,6) 4 | exchange(0,5) 5 | exchange(0,3) 6 | exchange(0,0) 7 | exchange(1,2) 8 | exchange(6,6) 9 | exchange(8,9) 10 | exchange(7,8) 11 | -51 12 | -1 13 | 0 14 | 1 15 | 3 16 | 10 17 | 18 18 | 32 19 | 567 20 | 789 21 | -------------------------------------------------------------------------------- /x86/win32/tst/sort.2bk: -------------------------------------------------------------------------------- 1 | tst/sort.c:23: warning: missing return value 2 | tst/sort.c:30: warning: missing return value 3 | tst/sort.c:37: warning: missing return value 4 | tst/sort.c:41: warning: missing return value 5 | tst/sort.c:65: warning: missing return value 6 | -------------------------------------------------------------------------------- /x86/win32/tst/spill.1bk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drh/lcc/2b5cf358d9aa6759923dd7461f2df7f7f2a28471/x86/win32/tst/spill.1bk -------------------------------------------------------------------------------- /x86/win32/tst/spill.2bk: -------------------------------------------------------------------------------- 1 | tst/spill.c:1: warning: missing return value 2 | tst/spill.c:3: warning: missing return value 3 | tst/spill.c:5: warning: missing return value 4 | tst/spill.c:7: warning: missing return value 5 | tst/spill.c:9: warning: missing return value 6 | tst/spill.c:17: warning: missing return value 7 | -------------------------------------------------------------------------------- /x86/win32/tst/stdarg.1bk: -------------------------------------------------------------------------------- 1 | test 1 2 | test 2 3 | test 3 4 | test 4 5 | test 5.000000 6 | {1 2 3 4} {1 2 3 4} {1 2 3 4} {1 2 3 4} {1 2 3 4} {1 2 3 4} 7 | -------------------------------------------------------------------------------- /x86/win32/tst/stdarg.2bk: -------------------------------------------------------------------------------- 1 | tst/stdarg.c:51: warning: missing return value 2 | -------------------------------------------------------------------------------- /x86/win32/tst/struct.1bk: -------------------------------------------------------------------------------- 1 | (-1,-1) is not within [10,10; 310,310] 2 | (1,1) is not within [10,10; 310,310] 3 | (20,300) is within [10,10; 310,310] 4 | (500,400) is not within [10,10; 310,310] 5 | ab 6 | -------------------------------------------------------------------------------- /x86/win32/tst/struct.2bk: -------------------------------------------------------------------------------- 1 | tst/struct.c:49: warning: missing return value 2 | tst/struct.c:68: warning: missing return value 3 | -------------------------------------------------------------------------------- /x86/win32/tst/switch.1bk: -------------------------------------------------------------------------------- 1 | b = 0x8 2 | f = 0xc 3 | n = 0xa 4 | r = 0xd 5 | t = 0x9 6 | v = 0xb 7 | x = 0x78 8 | f: 9 | x = 0 10 | x = 1 11 | x = 2 12 | x = 2 13 | x = 2 14 | x = 2 15 | x = 2 16 | x = 7 17 | x = 8 18 | x = 9 19 | x = 9 20 | x = 9 21 | x = 9 22 | x = 9 23 | x = 9 24 | x = 9 25 | x = 16 26 | x = 17 27 | x = 18 28 | x = 19 29 | x = 20 30 | g: 31 | 1 1 32 | 1 2 33 | 2 3 34 | 2 4 35 | 2 5 36 | 3 6 37 | d 6 38 | 3 7 39 | d 7 40 | 3 8 41 | d 8 42 | d 9 43 | d 10 44 | h: 45 | i = 8 46 | i = 16 47 | i = 120 48 | i = 128 49 | i = 248 50 | i = 264 51 | i = 272 52 | i = 280 53 | i = 288 54 | i = 296 55 | i = 304 56 | i = 312 57 | 488 defaults 58 | x = 0x1000000 59 | x = 0x2000000 60 | x = 0x3000000 61 | x = 0x4000000 62 | x = 0x5000000 63 | x = 0x6000000 (default) 64 | x = 0x7000000 (default) 65 | 0 66 | 1 67 | 2 68 | 3 69 | 4 70 | 5 71 | 0 72 | 1 73 | 2 74 | 3 75 | 4 76 | 5 77 | -------------------------------------------------------------------------------- /x86/win32/tst/switch.2bk: -------------------------------------------------------------------------------- 1 | tst/switch.c:55: warning: missing return value 2 | tst/switch.c:73: warning: missing return value 3 | tst/switch.c:97: warning: missing return value 4 | tst/switch.c:112: warning: missing return value 5 | tst/switch.c:137: warning: missing return value 6 | -------------------------------------------------------------------------------- /x86/win32/tst/wf1.1bk: -------------------------------------------------------------------------------- 1 | 5 a 2 | 2 and 3 | 5 buf 4 | 16 c 5 | 8 char 6 | 1 compare 7 | 4 cond 8 | 5 count 9 | 1 d 10 | 1 die 11 | 3 else 12 | 1 entry 13 | 1 eof 14 | 4 err 15 | 1 error 16 | 1 exit 17 | 1 folded 18 | 1 for 19 | 1 free 20 | 1 frequencies 21 | 1 frequency 22 | 1 get 23 | 2 getchar 24 | 3 getword 25 | 14 if 26 | 2 in 27 | 1 index 28 | 1 input 29 | 1 install 30 | 8 int 31 | 1 into 32 | 1 is 33 | 4 isletter 34 | 1 it 35 | 1 itself 36 | 5 left 37 | 1 letter 38 | 7 lookup 39 | 1 main 40 | 2 malloc 41 | 1 message 42 | 2 n 43 | 1 necessary 44 | 12 next 45 | 9 node 46 | 4 of 47 | 1 on 48 | 1 or 49 | 1 otherwise 50 | 2 out 51 | 8 p 52 | 3 print 53 | 2 printf 54 | 16 return 55 | 5 right 56 | 4 root 57 | 25 s 58 | 2 storage 59 | 3 strcmp 60 | 1 strcpy 61 | 1 strlen 62 | 8 struct 63 | 1 structures 64 | 2 subtree 65 | 1 t 66 | 5 tprint 67 | 9 tree 68 | 1 uses 69 | 1 version 70 | 1 wf 71 | 3 while 72 | 21 word 73 | 9 words 74 | 2 z 75 | -------------------------------------------------------------------------------- /x86/win32/tst/wf1.2bk: -------------------------------------------------------------------------------- 1 | tst/wf1.c:29: warning: missing return value 2 | tst/wf1.c:87: warning: missing return value 3 | -------------------------------------------------------------------------------- /x86/win32/tst/yacc.1bk: -------------------------------------------------------------------------------- 1 | a 2 | b 3 | load 4 | negate 5 | push 5 6 | c 7 | load 8 | multiply 9 | add 10 | store 11 | -------------------------------------------------------------------------------- /x86/win32/tst/yacc.2bk: -------------------------------------------------------------------------------- 1 | tst/yacc.c:345: warning: missing return value 2 | tst/yacc.c:349: warning: missing return value 3 | tst/yacc.c:360: warning: missing return value 4 | --------------------------------------------------------------------------------