├── .github └── workflows │ └── makefile.yml ├── 00-BAT_prepare.sh ├── CC ├── CC1 ├── CC3 ├── Makefile ├── README.md ├── _munch ├── _main.c ├── dtors.c └── munch.c ├── _patch ├── _main.c ├── dtors.c └── patch.c ├── bat ├── 00-CLEAN.sh ├── 01-MAKE-incl.sh ├── 02-MAKE-cfront.sh ├── 03-MAKE-libC.sh ├── 04-MAKE-itself.sh ├── 05-FILL-scratch.sh ├── 06-MAKE-from-scratch.sh ├── 07-MAKE-tools.sh └── 08-MAKE-more-libs.sh ├── cfront-history.txt ├── demo ├── complex │ ├── Makefile │ ├── abs.test.cpp │ ├── arg.test.cpp │ ├── conj.test.cpp │ ├── err.test.cpp │ ├── exp.test.cpp │ ├── imag.test.cpp │ ├── log.test.cpp │ ├── norm.test.cpp │ ├── polar.test.cpp │ ├── pow.test.cpp │ ├── real.test.cpp │ ├── runtests │ └── sqrt.test.cpp ├── generic │ ├── Generic.V │ ├── Generic.cpp │ ├── Makefile │ ├── Vector.V │ ├── Vector.cpp │ └── runtests ├── hello │ ├── Makefile │ ├── c++_c_output.c │ ├── c++_c_output.clean.sh │ ├── c++_c_output.cpp │ ├── c++_c_output.sh │ ├── c++_c_output.txt │ ├── hello.clean.sh │ ├── hello.cpp │ └── hello.sh ├── stream │ ├── Makefile │ ├── README │ ├── lengthdemo.V │ ├── lengthdemo.cpp │ ├── lengthdemo.h │ └── runtests └── string │ ├── Makefile │ ├── append.V │ ├── append.cpp │ ├── assign.V │ ├── assign.cpp │ ├── compare.V │ ├── compare.cpp │ ├── const.V │ ├── const.cpp │ ├── find.V │ ├── find.cpp │ ├── input.V │ ├── input.cpp │ ├── insert.V │ ├── insert.cpp │ ├── misc.V │ ├── misc.cpp │ ├── output.V │ ├── output.cpp │ ├── regress │ ├── remove1.V │ ├── remove1.cpp │ ├── replace.V │ ├── replace.cpp │ ├── strmap.V │ └── strmap.cpp ├── happy-birthday-C++.txt ├── incl ├── incl-master └── incl-linux32 │ ├── 01-SC-README │ ├── Args.h │ ├── Array_alg.c │ ├── Array_alg.h │ ├── Bits.h │ ├── Block.c │ ├── Block.h │ ├── CC │ ├── 01-CC-README │ ├── common.h │ ├── compiler_type.h │ ├── complex.h │ ├── fstream.h │ ├── generic.h │ ├── iomanip.h │ ├── iostream.h │ ├── new.h │ ├── std_bool.h │ ├── std_string.h │ ├── stdiostream.h │ ├── str_imp.h │ ├── stream.h │ ├── stringexcept.h │ ├── strstream.h │ ├── sysent.h │ ├── task.h │ ├── values.h │ ├── vector.h │ ├── wstr_imp.h │ └── wstr_imp.h.orig │ ├── Fsm.h │ ├── G2text.h │ ├── Graph.h │ ├── Graph_alg.h │ ├── List.c │ ├── List.h │ ├── List_old.c │ ├── List_old.h │ ├── Map.c │ ├── Map.h │ ├── Objection.h │ ├── Path.h │ ├── Pool.h │ ├── Regex.h │ ├── SC │ ├── 01-SC-README │ ├── Args.h │ ├── Array_alg.c │ ├── Array_alg.h │ ├── Bits.h │ ├── Block.c │ ├── Block.h │ ├── Fsm.h │ ├── G2text.h │ ├── Graph.h │ ├── Graph_alg.h │ ├── List.c │ ├── List.h │ ├── List_old.c │ ├── List_old.h │ ├── Map.c │ ├── Map.h │ ├── Objection.h │ ├── Path.h │ ├── Pool.h │ ├── Regex.h │ ├── Search_path.h │ ├── Stopwatch.h │ ├── String.h │ ├── Symbol.h │ ├── Ticket.h │ ├── Time.h │ ├── Tmppath.h │ ├── Vblock.c │ ├── Vblock.h │ ├── bag.c │ ├── bag.h │ ├── basic_string.c │ ├── basic_string.h │ ├── cctype │ ├── g2++.h │ ├── g2comp.h │ ├── g2ctype.h │ ├── g2debug.h │ ├── g2desc.h │ ├── g2inline.h │ ├── g2io.h │ ├── g2mach.h │ ├── g2manip.h │ ├── g2tree.h │ ├── g2values.h │ ├── set.c │ ├── set.h │ ├── set_of_p.c │ ├── set_of_p.h │ └── string │ ├── Search_path.h │ ├── Stopwatch.h │ ├── String.h │ ├── Symbol.h │ ├── Ticket.h │ ├── Time.h │ ├── Tmppath.h │ ├── Vblock.c │ ├── Vblock.h │ ├── assert.h │ ├── bag.c │ ├── bag.h │ ├── basic_string.c │ ├── basic_string.h │ ├── cctype │ ├── common.h │ ├── compiler_type.h │ ├── complex.h │ ├── ctype.h │ ├── curses.h │ ├── dial.h │ ├── errno.h │ ├── fcntl.h │ ├── fstream.h │ ├── ftw.h │ ├── g2++.h │ ├── g2comp.h │ ├── g2ctype.h │ ├── g2debug.h │ ├── g2desc.h │ ├── g2inline.h │ ├── g2io.h │ ├── g2mach.h │ ├── g2manip.h │ ├── g2tree.h │ ├── g2values.h │ ├── generic.h │ ├── grp.h │ ├── iomanip.h │ ├── iostream.h │ ├── ldfcn.h │ ├── libc.h │ ├── malloc.h │ ├── math.h │ ├── memory.h │ ├── mon.h │ ├── new.h │ ├── nlist.h │ ├── osfcn.h │ ├── plot.h │ ├── pw.h │ ├── pwd.h │ ├── rand48.h │ ├── search.h │ ├── set.c │ ├── set.h │ ├── set_of_p.c │ ├── set_of_p.h │ ├── setjmp.h │ ├── signal.h.xx │ ├── std_bool.h │ ├── std_string.h │ ├── stdarg.h │ ├── stddef.h │ ├── stdio.h │ ├── stdiostream.h │ ├── stdlib.h │ ├── str_imp.h │ ├── stream.h │ ├── string │ ├── string.h │ ├── stringexcept.h │ ├── strstream.h │ ├── sys │ ├── errno.h │ ├── ipc.h │ ├── lock.h │ ├── msg.h │ ├── sem.h │ ├── shm.h │ ├── stat.h │ ├── times.h │ └── utsname.h │ ├── sysent.h │ ├── task.h │ ├── time.h │ ├── unistd.h │ ├── ustat.h │ ├── utime.h │ ├── utmp.h │ ├── values.h │ ├── vector.h │ └── wstr_imp.h ├── lib ├── complex │ ├── complex │ │ ├── abs.cpp │ │ ├── arg.cpp │ │ ├── const.h │ │ ├── cos.cpp │ │ ├── error.cpp │ │ ├── exp.cpp │ │ ├── io.cpp │ │ ├── log.cpp │ │ ├── oper.cpp │ │ ├── polar.cpp │ │ ├── pow.cpp │ │ ├── sin.cpp │ │ └── sqrt.cpp │ └── mk │ │ └── Makefile ├── generic │ └── generic.cpp ├── mk │ ├── Makefile │ └── _stdio.c ├── new │ ├── _arr_map.cpp │ ├── _delete.cpp │ ├── _handler.cpp │ ├── _new.cpp │ ├── _vec.cpp │ └── placenew.cpp ├── static │ ├── _ctor.cpp │ ├── _dtor.cpp │ ├── exit_svr4.cpp │ ├── exit_unused.cpp │ └── pure.cpp ├── stream │ ├── cstreams.cpp │ ├── filebuf.cpp │ ├── flt.cpp │ ├── fstream.cpp │ ├── in.cpp │ ├── intin.cpp │ ├── ios_compat.cpp │ ├── manip.cpp │ ├── oldformat.cpp │ ├── out.cpp │ ├── rawin.cpp │ ├── sbuf.dbp.cpp │ ├── stdiobuf.cpp │ ├── stream.cpp │ ├── streambuf.cpp │ ├── streamdefs.h │ ├── strstream.cpp │ └── swstdio.cpp ├── string │ ├── Pool_std.cpp │ ├── Pool_std.h │ ├── std_exc.cpp │ ├── std_find.cpp │ ├── std_in.cpp │ ├── std_misc.cpp │ ├── std_put.cpp │ ├── std_str.cpp │ ├── std_win.cpp │ ├── std_wput.cpp │ └── std_wstr.cpp └── task │ ├── mk │ └── makefile │ └── task │ ├── erand.c │ ├── event.c │ ├── fudge.c.386 │ ├── fudge.c.3b │ ├── fudge.c.68k │ ├── fudge.c.uts │ ├── fudge.c.vax │ ├── hw_stack.c │ ├── hw_stack.h │ ├── obj.c │ ├── qhead.c │ ├── qtail.c │ ├── sched.c │ ├── sim.c │ ├── swap.s.386 │ ├── swap.s.3b │ ├── swap.s.68k │ ├── swap.s.uts │ ├── swap.s.vax │ ├── swap_supp.c │ ├── task.c │ ├── task_compat.c │ └── timer.c ├── libSC ├── Args │ ├── Args.c │ ├── Argsarg.c │ ├── Argsflag.c │ ├── Argsiter.c │ ├── Argslib.h │ ├── Argsobj.c │ ├── Argsopt.c │ ├── Argsset.c │ ├── Argssub.c │ ├── Argsvalue.c │ ├── demos │ │ ├── example.V │ │ ├── example.c │ │ ├── example.sh │ │ └── makefile │ └── makefile ├── Array_alg │ └── makefile ├── Bits │ ├── Bits.c │ └── makefile ├── Block │ ├── Vblock_dtor.c │ ├── demos │ │ ├── Blockset.V │ │ ├── Blockset.c │ │ ├── Blockset.h │ │ └── makefile │ └── makefile ├── CC │ ├── bin │ │ └── CC │ ├── lib │ │ └── fscpp │ └── makefile ├── Fsm │ ├── Chararray.c │ ├── Fprint.c │ ├── Fsm.c │ ├── demos │ │ ├── 3-3.V │ │ ├── 3-3.c │ │ ├── candy.V │ │ ├── candy.c │ │ └── makefile │ └── makefile ├── G2++ │ ├── compsrc │ │ ├── comp.c │ │ ├── demos │ │ │ ├── makefile │ │ │ ├── test1.g │ │ │ ├── test2.V │ │ │ └── test2.c │ │ ├── desc.c │ │ ├── makefile │ │ └── typedef.c │ ├── g2++lib │ │ ├── Block_G2NODE.c │ │ ├── Text.c │ │ ├── demos │ │ │ ├── demo1.V │ │ │ ├── demo1.c │ │ │ ├── demo2.V │ │ │ ├── demo2.c │ │ │ ├── demo3.V │ │ │ ├── demo3.c │ │ │ ├── demo4.V │ │ │ ├── demo4.c │ │ │ ├── demo5.V │ │ │ ├── demo5.c │ │ │ ├── makefile │ │ │ ├── usr.data │ │ │ └── usr.g │ │ ├── err.c │ │ ├── g2clear.c │ │ ├── g2ctype.c │ │ ├── g2debug.c │ │ ├── g2ntostr.c │ │ ├── g2tree.c │ │ ├── g2uio.c │ │ ├── g2util.c │ │ ├── geng2ctab.c │ │ ├── geng2mach.c │ │ ├── geng2values.c │ │ ├── getbuf.c │ │ ├── getdot.c │ │ ├── getrec.c │ │ ├── init.c │ │ ├── makefile │ │ ├── manip.c │ │ ├── putbuf.c │ │ ├── putrec.c │ │ ├── tut │ │ │ ├── G2++ │ │ │ ├── G2++.A │ │ │ └── G2++.B │ │ └── version.c │ └── makefile ├── Graph │ ├── Graph.c │ ├── Set_Graph.c │ ├── Ticket.c │ ├── demos │ │ ├── Cities.V │ │ ├── Cities.c │ │ ├── Cities.h │ │ └── makefile │ └── makefile ├── Graph_alg │ ├── Graph_alg.c │ ├── bfs.c │ ├── component.c │ ├── cycle.c │ ├── demos │ │ ├── GA_aptsdemo.V │ │ ├── GA_aptsdemo.c │ │ ├── GA_aptsdemo.h │ │ ├── GA_bfsdemo.V │ │ ├── GA_bfsdemo.c │ │ ├── GA_cycdemo.V │ │ ├── GA_cycdemo.c │ │ ├── GA_demo.h │ │ └── makefile │ ├── dfs.c │ └── makefile ├── L4toL5 ├── List │ ├── List.c │ ├── List_sort.c │ ├── List_voidP.c │ ├── demos │ │ ├── Pair.V │ │ ├── Pair.c │ │ ├── Pair.h │ │ ├── Student.V │ │ ├── Student.c │ │ ├── Student.h │ │ └── makefile │ └── makefile ├── List_old │ ├── List_old.c │ ├── List_sort_o.c │ ├── demos │ │ ├── Pair.V │ │ ├── Pair.c │ │ ├── Pair.h │ │ ├── Student.V │ │ ├── Student.c │ │ ├── Student.h │ │ └── makefile │ └── makefile ├── Map │ ├── Map.c │ ├── demos │ │ ├── clothes │ │ ├── example.V │ │ ├── example.c │ │ ├── makefile │ │ ├── topsort.V │ │ ├── topsort.c │ │ └── topsort.h │ └── makefile ├── Objection │ ├── Objection.c │ └── makefile ├── Path │ ├── Pathlib.h │ ├── canon.c │ ├── complete.c │ ├── ctlist.c │ ├── demos │ │ ├── explode.V │ │ ├── explode.c │ │ ├── makefile │ │ ├── more.V │ │ ├── more.c │ │ ├── usrbin.V │ │ ├── usrbin.c │ │ ├── wild.V │ │ └── wild.c │ ├── die.c │ ├── dirname.c │ ├── explode.c │ ├── find.c │ ├── gendefines │ ├── is_wd.c │ ├── ksh │ │ ├── defs.h │ │ ├── expand.c │ │ ├── expand.ksh │ │ ├── group.c │ │ ├── io.c │ │ ├── io.h │ │ ├── io.ksh │ │ ├── makefile │ │ ├── sh_config.h │ │ ├── t.c │ │ ├── test.c │ │ ├── test.h │ │ └── test.ksh │ ├── kshtest.c │ ├── libx │ │ ├── makefile │ │ ├── strmatch.c │ │ └── t.c │ ├── makefile │ ├── makerel.c │ ├── no_wd.c │ ├── path.c │ ├── prefix.c │ ├── search.c │ ├── slash.c │ ├── strdup.c │ ├── stream1.c │ ├── stream2.c │ ├── tilde.c │ ├── tmppath.c │ ├── truncate.c │ ├── v9-mktemp.c │ ├── v9-tmpnam.c │ ├── wild.c │ └── xgetwd.c ├── Pool │ ├── Pool.c │ ├── Poollib.h │ ├── Vpool.c │ ├── demos │ │ ├── Thinglist.V │ │ ├── Thinglist.c │ │ └── makefile │ └── makefile ├── README.SC ├── Regex │ ├── Alnum.c │ ├── Alpha.c │ ├── Double.c │ ├── Float.c │ ├── Ident.c │ ├── Int.c │ ├── Regex.c │ ├── Regexlib.h │ ├── Reiter.c │ ├── Rematch.c │ ├── Subex.c │ ├── demos │ │ ├── 6.V │ │ ├── 6.c │ │ ├── final-ex.V │ │ ├── final-ex.c │ │ ├── giveme.V │ │ ├── giveme.c │ │ └── makefile │ ├── libx │ │ ├── error.h │ │ ├── limits.h │ │ ├── makefile │ │ ├── re.3 │ │ ├── re.h │ │ ├── recomp.c │ │ ├── reerror.c │ │ ├── reexec.c │ │ ├── relib.h │ │ ├── resub.c │ │ └── t.c │ └── makefile ├── Set │ ├── Bag.c │ ├── Bag1.c │ ├── Bagio.c │ ├── Set.c │ ├── Set1.c │ ├── Set_of_p.c │ ├── Set_of_p1.c │ ├── Set_of_p2.c │ ├── Setio.c │ ├── demos │ │ ├── 3.V │ │ ├── 3.c │ │ ├── 5.V │ │ ├── 5.c │ │ ├── Spool.V │ │ ├── Spool.c │ │ ├── cartprod.V │ │ ├── cartprod.c │ │ ├── input │ │ └── makefile │ └── makefile ├── Stopwatch │ ├── Stopwatch.c │ ├── demos │ │ ├── 3.V │ │ ├── 3.c │ │ └── makefile │ └── makefile ├── String │ ├── S_add.c │ ├── S_app.c │ ├── S_ass.c │ ├── S_fgets.c │ ├── S_fputs.c │ ├── S_gets.c │ ├── S_index.c │ ├── S_input.c │ ├── S_int_str.c │ ├── S_long_str.c │ ├── S_misc.c │ ├── S_put.c │ ├── S_puts.c │ ├── S_queue.c │ ├── S_read.c │ ├── S_read1.c │ ├── S_reserve.c │ ├── S_setup.c │ ├── S_sgets.c │ ├── S_square.c │ ├── S_string3.c │ ├── S_substr.c │ ├── demos │ │ ├── incore.V │ │ ├── incore.c │ │ ├── makefile │ │ ├── places │ │ ├── replace.V │ │ ├── replace.c │ │ ├── reverse.V │ │ └── reverse.c │ └── makefile ├── Strstream │ ├── Strstream.c │ └── makefile ├── Symbol │ ├── Symbol.c │ ├── Symbol_in.c │ ├── Symbol_out.c │ ├── demos │ │ ├── makefile │ │ ├── symtab.V │ │ └── symtab.c │ ├── makefile │ └── string_set.c ├── Time │ ├── Duration.c │ ├── Place.c │ ├── Time.c │ ├── Time_prev.c │ ├── Timelib.h │ ├── Tprint.c │ ├── ctime │ │ └── time_comm.c │ ├── demos │ │ ├── 1-1.V │ │ ├── 1-1.c │ │ ├── 1-2.V │ │ ├── 1-2.c │ │ ├── appoint.h │ │ ├── appts │ │ ├── cal.V │ │ ├── cal.c │ │ ├── cal.h │ │ ├── daylight.V │ │ ├── daylight.c │ │ ├── example-1.c │ │ ├── example-2.c │ │ ├── loop.V │ │ ├── loop.c │ │ ├── makefile │ │ ├── paranoid.V │ │ └── paranoid.c │ ├── makefile │ ├── mytime.h │ ├── tm.h │ └── tm │ │ ├── mystrdup.c │ │ ├── tmdata.c │ │ ├── tmdate.c │ │ ├── tmfix.c │ │ ├── tmform.c │ │ ├── tmgoff.c │ │ ├── tmleap.c │ │ ├── tmlex.c │ │ ├── tmmake.c │ │ ├── tmpoff.c │ │ ├── tmtime.c │ │ ├── tmtype.c │ │ ├── tmword.c │ │ └── tmzone.c ├── aoutdem │ ├── README │ ├── SVR4demangle.c │ ├── aoutdem.h │ ├── demangle.c │ ├── hpux │ │ ├── demangle.c │ │ ├── hpdemangle.1 │ │ └── makefile │ ├── makefile │ ├── mips │ │ ├── demangle.c │ │ └── makefile │ ├── osfcn2.h │ ├── parse.c │ ├── solaris │ │ ├── Link.c │ │ ├── Memspace.c │ │ ├── demangle.c │ │ ├── incl │ │ │ ├── Link.1 │ │ │ ├── Link.h │ │ │ ├── Memspace.1 │ │ │ ├── Memspace.h │ │ │ ├── idebug.1 │ │ │ ├── idebug.h │ │ │ ├── sym.h │ │ │ ├── util.c │ │ │ └── util.h │ │ ├── makefile │ │ └── sym.c │ ├── system.c │ ├── system.h │ ├── under.c │ └── values.h ├── demangle │ ├── README.dem │ ├── dem.c │ ├── dem.h │ ├── demMain.c │ ├── makefile │ └── osrc │ │ ├── String.c │ │ ├── String.h │ │ ├── args.c │ │ ├── c++filt.c │ │ ├── dem.c │ │ ├── demangle.c │ │ ├── elf_dem.h │ │ ├── errfilt.c │ │ ├── makefile │ │ ├── nplist.c │ │ └── strtol.c ├── fs │ ├── README │ ├── copylib │ ├── demos │ │ ├── PDclipboard.ve │ │ ├── life.vec │ │ ├── life2.vec │ │ ├── life3.vec │ │ ├── makefile │ │ ├── matrix.vec │ │ ├── memory.vec │ │ ├── memory2.vec │ │ ├── prog.h │ │ ├── prog1.V │ │ ├── prog1.c │ │ ├── prog2.V │ │ ├── prog2.c │ │ ├── prog3.V │ │ ├── prog3.c │ │ ├── prog4.V │ │ ├── prog4.c │ │ ├── prog5.V │ │ └── prog5.c │ ├── fsippsrc │ │ ├── CXXLexer.c │ │ ├── CXXLexer.h │ │ ├── CXXToken.c │ │ ├── CXXToken.h │ │ ├── Lexer.c │ │ ├── Lexer.h │ │ ├── Token.h │ │ ├── TokenType.h │ │ ├── fsipp.c │ │ ├── fsipp.h │ │ ├── makefile │ │ ├── parse.c │ │ ├── scope.c │ │ └── scope.h │ ├── libsrc │ │ ├── _delete.c │ │ ├── _new.c │ │ ├── fslib.h │ │ ├── makefile │ │ ├── map.c │ │ ├── placenew.c │ │ └── reg.c │ └── makefile ├── hier │ ├── CXXLexer.c │ ├── CXXLexer.h │ ├── CXXToken.c │ ├── CXXToken.h │ ├── Lexer.c │ ├── Lexer.h │ ├── README │ ├── Token.c │ ├── Token.h │ ├── TokenType.h │ ├── bin │ │ └── hier │ ├── hier.h │ ├── hier2.c │ ├── makefile │ └── parse.c ├── incl │ ├── bin │ │ └── incl.sh │ ├── incl2.c │ └── makefile ├── ipc │ ├── demos │ │ ├── assert.h │ │ ├── makefile │ │ ├── testipc.V │ │ └── testipc.c │ ├── ipcbuf.c │ ├── ipclib.h │ ├── ipcmisc.c │ ├── ipcstream.c │ ├── makefile │ └── streamdefs.h ├── publik │ ├── CXXLexer.c │ ├── CXXLexer.h │ ├── CXXToken.c │ ├── CXXToken.h │ ├── Lexer.c │ ├── Lexer.h │ ├── README │ ├── Token.c │ ├── Token.h │ ├── TokenType.h │ ├── bin │ │ └── publik │ ├── makefile │ ├── parse.c │ ├── pub-script │ ├── publik.h │ ├── publik2.c │ ├── scope.c │ └── scope.h └── special │ ├── Block.dummy1 │ ├── Block.dummy2 │ ├── List.dummy1 │ ├── List.dummy2 │ ├── List.dummy3 │ ├── Map.dummy1 │ ├── Map.dummy2 │ ├── README │ ├── makefile │ ├── set.dummy1 │ ├── set.dummy2 │ ├── set.dummy3 │ ├── setofp.dummy1 │ └── setofp.dummy2 ├── man ├── man1 │ ├── CC.1 │ ├── c++filt.1 │ └── demangle.1 ├── man3 │ └── .keep └── man4 │ └── .keep ├── mk-mingw32.sh ├── mk-mingw64.sh ├── plan9-cfront-port-status.ms ├── scratch ├── Makefile ├── bsd.sed ├── lib │ └── .keep ├── mnch │ └── .keep └── src │ └── .keep ├── src ├── Bits.cpp ├── Bits.h ├── Block.h ├── Makefile ├── _stdio.c ├── alloc.cpp ├── block.cpp ├── cfront.h ├── dcl.cpp ├── dcl2.cpp ├── dcl3.cpp ├── dcl4.cpp ├── del.cpp ├── discrim.cpp ├── error.cpp ├── expand.cpp ├── expr.cpp ├── expr2.cpp ├── expr3.cpp ├── find.cpp ├── gram.y ├── hash.cpp ├── hash.h ├── lalex.cpp ├── lex.cpp ├── main.cpp ├── node_classes.h ├── norm.cpp ├── norm2.cpp ├── overload.h ├── print.cpp ├── print2.cpp ├── repr.cpp ├── sdelicense.h ├── sdetoolnum.h ├── simpl.cpp ├── simpl2.cpp ├── size.cpp ├── size.h ├── szal │ └── szal.c ├── table.cpp ├── template.cpp ├── template.h ├── token.h ├── tqueue.h ├── tree_copy.cpp ├── tree_copy.h ├── tree_walk.cpp ├── tree_walk.h ├── typ.cpp ├── typ2.cpp ├── typedef.h ├── y.tab.cpp └── yystype.h ├── tmpdir └── .keep └── tools ├── demangler ├── Makefile ├── README.dem ├── dem.c └── dem.h ├── pt ├── Makefile ├── README.ptenv ├── pt.h ├── ptcomp.c ├── ptlink.c └── ptutil.c └── tests ├── 00-COMMON.sh ├── 01-PREPARE-tests.sh ├── 02-RUN-tests.sh └── README /00-BAT_prepare.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | ln -s bat/*.sh . 4 | -------------------------------------------------------------------------------- /CC: -------------------------------------------------------------------------------- 1 | CC3 -------------------------------------------------------------------------------- /_munch/_main.c: -------------------------------------------------------------------------------- 1 | /* @(#) _main.c 1.2 1/27/86 17:47:56 */ 2 | /*ident "@(#)cfront:lib/static/_main.c 1.2"*/ 3 | 4 | typedef void (*PFV)(); 5 | 6 | extern int atexit(void*); 7 | extern PFV _ctors[]; 8 | extern void __dtors(); 9 | 10 | void _main() 11 | { 12 | atexit((PFV)__dtors); 13 | 14 | PFV* pf=_ctors; 15 | for (; *pf; pf++) (**pf)(); 16 | } 17 | -------------------------------------------------------------------------------- /_munch/dtors.c: -------------------------------------------------------------------------------- 1 | /*ident "@(#)cls4:Munch/dtors.c 1.3" */ 2 | /******************************************************************************* 3 | 4 | C++ source for the C++ Language System, Release 3.0. This product 5 | is a new release of the original cfront developed in the computer 6 | science research center of AT&T Bell Laboratories. 7 | 8 | Copyright (c) 1993 UNIX System Laboratories, Inc. 9 | Copyright (c) 1991, 1992 AT&T and UNIX System Laboratories, Inc. 10 | Copyright (c) 1984, 1989, 1990 AT&T. All Rights Reserved. 11 | 12 | THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE of AT&T and UNIX System 13 | Laboratories, Inc. The copyright notice above does not evidence 14 | any actual or intended publication of such source code. 15 | 16 | *******************************************************************************/ 17 | typedef void (*PFV)(); 18 | 19 | void __dtors() 20 | { 21 | extern PFV _dtors[]; 22 | static int ddone; 23 | if (ddone == 0) { // once only 24 | ddone = 1; 25 | PFV* pf = _dtors; 26 | while (*pf) pf++; 27 | while (_dtors < pf) (**--pf)(); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /bat/00-CLEAN.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | rm LOG.0? 2> /dev/null 4 | rm cfront cfront.old munch munch.old libC.a libC.a.old 2> /dev/null 5 | 6 | [ -L incl ] && rm incl 7 | make -C src clean 2> /dev/null 8 | make -C scratch clean 2> /dev/null 9 | 10 | rm lib/mk/*.o lib/mk/*..c 2> /dev/null 11 | rm lib/complex/mk/*.o lib/complex/mk/*.a lib/complex/mk/*..c 2> /dev/null 12 | 13 | D=demo/hello 14 | rm $D/hello.i $D/hello..c $D/hello.o $D/hello..o 2> /dev/null 15 | rm $D/hello.tmp 2> /dev/null 16 | rm $D/hello.cdts..c $D/hello.cdts.o $D/a.out 2> /dev/null 17 | rm $D/hello 2> /dev/null 18 | rm $D/c++_c_output..c $D/c++_c_output_C $D/c++_c_output_c 2> /dev/null 19 | 20 | make -C tools/demangler clobber 2> /dev/null 21 | make -C tools/pt clobber 2> /dev/null 22 | rm ptcomp ptlink c++filt 2> /dev/null 23 | 24 | make -C lib/complex/mk clean 2> /dev/null 25 | rm libcomplex*.a 2> /dev/null 26 | 27 | for i in *.sh; do 28 | [ -L $i ] && rm $i 29 | done 30 | 31 | [ -L CC ] && { 32 | rm CC 33 | ln -s CC3 CC 34 | } 35 | -------------------------------------------------------------------------------- /bat/01-MAKE-incl.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # generate (configure) incl directory 3 | 4 | # currently this step is dummy: include headers 5 | # are a mix from the cfront-1 and plan9 port 6 | # headers 7 | 8 | [ -L incl ] && rm incl 9 | ln -s incl-master/incl-linux32 incl 10 | echo OK 11 | -------------------------------------------------------------------------------- /bat/02-MAKE-cfront.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | [ ! -d incl ] && { 4 | echo "Error: run 01-MAKE-incl.sh first" 5 | exit 1 6 | } 7 | 8 | make -C src 2>&1 | tee LOG.02 9 | [ $? != 0 ] && { 10 | echo "Error!" 11 | exit 1 12 | } 13 | echo OK 14 | -------------------------------------------------------------------------------- /bat/03-MAKE-libC.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # make libC and munch 3 | 4 | [ ! -x cfront ] && { 5 | echo "Error: run 02-MAKE-cfront.sh first" 6 | exit 1 7 | } 8 | 9 | rm munch 2> /dev/null 10 | make 2>&1 | tee LOG.03 11 | 12 | # compile a test program 13 | 14 | D=demo/hello 15 | U=../.. 16 | 17 | cd $D 18 | $U/CC hello.C -o hello +i 19 | ./hello 20 | cd $U 21 | -------------------------------------------------------------------------------- /bat/04-MAKE-itself.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # bootstrap cfront by itself 3 | # this and next 2 steps can be skipped 4 | 5 | [ ! -x cfront -o ! libC.a ] && { 6 | echo "Error: run 02-MAKE-cfront.sh first" 7 | exit 1 8 | } 9 | 10 | make -C src clean 2> /dev/null 11 | make CXX=`pwd`/CC -C src 2>&1 | tee LOG.04 12 | [ ! -x src/cfront ] && { 13 | echo 14 | echo "Error: failed to bootstrap" 15 | exit 1 16 | } 17 | 18 | make -C src clean 2> /dev/null 19 | make CXX=`pwd`/CC -C src 2>&1 | tee -a LOG.04 20 | [ ! -x src/cfront ] && { 21 | echo 22 | echo "Error: failed to bootstrap" 23 | exit 1 24 | } 25 | 26 | make -C src clean 2> /dev/null 27 | make CXX=`pwd`/CC -C src 2>&1 | tee -a LOG.04 28 | [ ! -x src/cfront ] && { 29 | echo 30 | echo "Error: failed to bootstrap" 31 | exit 1 32 | } 33 | 34 | strip cfront cfront.old 35 | diff cfront cfront.old 36 | [ $? != 0 ] && { 37 | echo 38 | echo "Error: failed to bootstrap" 39 | exit 1 40 | } 41 | echo 42 | echo "OK" 43 | exit 0 44 | -------------------------------------------------------------------------------- /bat/05-FILL-scratch.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # fill a scratch directory with plain old C 3 | 4 | [ ! -x cfront ] && { 5 | echo "Error: run 02-MAKE-cfront.sh first" 6 | exit 1 7 | } 8 | 9 | make -C scratch clean 10 | make fillscratch 2>&1 | tee LOG.05 11 | -------------------------------------------------------------------------------- /bat/06-MAKE-from-scratch.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # build libCC.a, munch and cfront from a scratch directory 3 | 4 | [ ! -x cfront ] && { 5 | echo "Error: run 02-MAKE-cfront.sh first" 6 | exit 1 7 | } 8 | 9 | make -C scratch 2>&1 | tee LOG.06 10 | [ $? != 0 ] && { 11 | echo "Error: failed to build cfront from a scratch directory" 12 | exit 1 13 | } 14 | echo 15 | echo "OK" 16 | echo "You can try to repeat steps 4, 5, 6" 17 | -------------------------------------------------------------------------------- /bat/07-MAKE-tools.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | make -C tools/demangler 2>&1 | tee LOG.07 4 | [ $? != 0 ] && { 5 | echo "Error: failed to build c++filt" 6 | exit 1 7 | } 8 | 9 | make -C tools/pt 2>&1 | tee -a LOG.07 10 | [ $? != 0 ] && { 11 | echo "Error: failed to build ptcomp/ptlink" 12 | exit 1 13 | } 14 | echo 15 | echo "OK" 16 | -------------------------------------------------------------------------------- /bat/08-MAKE-more-libs.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # make libcomplex.a, ... 3 | 4 | [ ! -x cfront ] && { 5 | echo "Error: run 02-MAKE-cfront.sh first" 6 | exit 1 7 | } 8 | 9 | make -C lib/complex/mk 10 | [ ! -f libcomplex.a ] && { 11 | echo 12 | echo "Error: failed to prepare libcomplex.a" 13 | exit 1 14 | } 15 | echo 16 | echo "OK" 17 | exit 0 18 | -------------------------------------------------------------------------------- /demo/complex/runtests: -------------------------------------------------------------------------------- 1 | #ident "@(#)cls4:demo/complex/runtests 1.1" 2 | ############################################################################### 3 | # 4 | # C++ source for the C++ Language System, Release 3.0. This product 5 | # is a new release of the original cfront developed in the computer 6 | # science research center of AT&T Bell Laboratories. 7 | # 8 | # Copyright (c) 1991 AT&T and UNIX System Laboratories, Inc. 9 | # Copyright (c) 1984, 1989, 1990 AT&T. All Rights Reserved. 10 | # 11 | # THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE of AT&T and UNIX System 12 | # 13 | # Laboratories, Inc. The copyright notice above does not evidence 14 | # any actual or intended publication of such source code. 15 | # 16 | ############################################################################### 17 | for test in $* 18 | do 19 | ./${test}.E > ${test}.out 2>&1 20 | grep "failed" ${test}.out > /dev/null 2>&1 21 | if test $? -eq 1 22 | then echo "${test}: passed" 23 | else echo "${test}: FAILED" 24 | fi 25 | rm -f ${test}.out 26 | done 27 | -------------------------------------------------------------------------------- /demo/generic/Generic.V: -------------------------------------------------------------------------------- 1 | 321 2 | -------------------------------------------------------------------------------- /demo/generic/Vector.V: -------------------------------------------------------------------------------- 1 | 9 8 7 6 5 4 3 2 1 0 2 | Caught error "vector index out of range" (2) 3 | Caught error "bad vector size" (1) 4 | -------------------------------------------------------------------------------- /demo/generic/runtests: -------------------------------------------------------------------------------- 1 | #ident "@(#)cls4:demo/generic/runtests 1.1" 2 | ############################################################################### 3 | # 4 | # C++ source for the C++ Language System, Release 3.0. This product 5 | # is a new release of the original cfront developed in the computer 6 | # science research center of AT&T Bell Laboratories. 7 | # 8 | # Copyright (c) 1991 AT&T and UNIX System Laboratories, Inc. 9 | # Copyright (c) 1984, 1989, 1990 AT&T. All Rights Reserved. 10 | # 11 | # THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE of AT&T and UNIX System 12 | # 13 | # Laboratories, Inc. The copyright notice above does not evidence 14 | # any actual or intended publication of such source code. 15 | # 16 | ############################################################################### 17 | 18 | for test in $* 19 | do 20 | ./${test}.E > ${test}.r 2>&1 21 | sed -e "/^#/d" ${test}.V | 22 | diff ${test}.r - > /dev/null 2>&1 23 | if test $? -eq 0 24 | then echo "${test}: passed"; 25 | else echo "${test}: FAILED"; 26 | fi 27 | rm -f ${test}.r 28 | rm -f core 29 | done 30 | -------------------------------------------------------------------------------- /demo/hello/Makefile: -------------------------------------------------------------------------------- 1 | CCOMP = gcc 2 | 3 | all: 4 | ./hello.sh $(MSIZE) 5 | 6 | clean: 7 | ./hello.clean.sh 8 | -------------------------------------------------------------------------------- /demo/hello/c++_c_output.clean.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | rm c++_c_output..c c++_c_output_C c++_c_output_c 2> /dev/null 4 | -------------------------------------------------------------------------------- /demo/hello/c++_c_output.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | D=../.. 4 | 5 | if [ ! -x ${D}/cfront ]; then 6 | echo "error: cfront compiler not found" 7 | exit 8 | fi 9 | 10 | ${D}/CC c++_c_output.C -o c++_c_output_C +i 11 | cc c++_c_output.c -o c++_c_output_c 12 | 13 | echo 14 | echo "Output of the c++ program (c++_c_output_C)" 15 | ./c++_c_output_C 16 | 17 | echo 18 | echo "Output of the C program (c++_c_output_c)" 19 | ./c++_c_output_c 20 | 21 | echo 22 | echo "Must be the same" 23 | -------------------------------------------------------------------------------- /demo/hello/hello.clean.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | rm -f hello hello.tmp hello..c hello.o hello..o hello.i 4 | rm -f hello.cdts..c hello.cdts.o a.out 5 | -------------------------------------------------------------------------------- /demo/hello/hello.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main() 4 | { 5 | cout << "Hello, World!\n"; 6 | return 0; 7 | } 8 | -------------------------------------------------------------------------------- /demo/hello/hello.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # manual steps to compile a program 4 | # http://lists.nongnu.org/archive/html/tinycc-devel/2014-12/binCQHJXV7ywM.bin 5 | # 6 | # The CC script now work. 7 | # Anyway, here is how to compile a C++ file manually 8 | 9 | 10 | D=../.. 11 | 12 | if [ ! -x ${D}/cfront ]; then 13 | echo "error: cfront compiler not found" 14 | exit 15 | fi 16 | 17 | gcc -E ${MSIZE} -I${D}/incl hello.cpp > hello.i # run preprocessor 18 | ${D}/cfront +a1 +L +fhello.cpp < hello.i > hello..c # run cfront 19 | gcc -fno-builtin-clog ${MSIZE} hello..c ${D}/libC.a -o hello.tmp # compile and link plain C 20 | 21 | # For static con/destructors, the nm/munch thingy is needed 22 | 23 | nm hello.tmp | ${D}/munch > hello.cdts..c # run mn against linked binary and filter 24 | gcc -fno-builtin-clog ${MSIZE} hello..c hello.cdts..c ${D}/libC.a -o hello # compile and link again 25 | 26 | ./hello 27 | -------------------------------------------------------------------------------- /demo/stream/lengthdemo.V: -------------------------------------------------------------------------------- 1 | 397.6 = 33.14feet = 10.1m 2 | 96 = 8feet = 2.438m 3 | 9.504e+06 = 7.92e+05feet = 2.414e+05m 4 | -------------------------------------------------------------------------------- /demo/string/Makefile: -------------------------------------------------------------------------------- 1 | CC=../../CC 2 | LIBS= 3 | CCFLAGS=-Wall -g -DNO_EXCEPTION -I../../incl $(MSIZE) 4 | CCOMP = gcc 5 | #ISTL=--stl -I../../stl 6 | G= 7 | LDFLAGS=$(G) 8 | SHELL=sh 9 | 10 | .SUFFIXES: .E 11 | 12 | .cpp.E: 13 | $(CC) $(CCFLAGS) $(ISTL) $(LDFLAGS) -o $*.E $< $(LIBS) 14 | 15 | .cpp.o: 16 | $(CC) $(CCFLAGS) $(ISTL) -c $< 17 | 18 | all: 19 | $(SHELL) ./regress 20 | 21 | clean: 22 | -@rm -f *.o *.E *.r *.ii core *.c 23 | -@rm -rf ptrepository 24 | -------------------------------------------------------------------------------- /demo/string/append.V: -------------------------------------------------------------------------------- 1 | s1=<> 2 | s1=<> 3 | s2= 4 | s2= 5 | s3= 6 | s3= 7 | s1= 8 | s1= 9 | s1= 10 | s1= 11 | s1= 12 | s1= 13 | s1= 14 | s1= 15 | s1= 16 | s1= 17 | s1= 18 | s1= 19 | s1= 20 | s1= 21 | s1= 22 | s1= 23 | s1= 24 | s1= 25 | -------------------------------------------------------------------------------- /demo/string/assign.V: -------------------------------------------------------------------------------- 1 | s1=<> 2 | s1=<> 3 | s2= 4 | s2= 5 | s3= 6 | s3= 7 | s1= 8 | s1= 9 | s1= 10 | s1= 11 | s1= 12 | s1= 13 | s1= 14 | s1= 15 | s1= 16 | s1= 17 | s1= 18 | s1= 19 | s1= 20 | s1= 21 | s1= 22 | s1= 23 | -------------------------------------------------------------------------------- /demo/string/const.V: -------------------------------------------------------------------------------- 1 | s1=<> 2 | s1=<> 3 | s2= 4 | s2= 5 | s3= 6 | s3= 7 | s4= 8 | s4= 9 | s5= 10 | s5= 11 | s6= 12 | s6= 13 | s7= 14 | s7= 15 | s8= 16 | s8= 17 | s9= 18 | s9= 19 | -------------------------------------------------------------------------------- /demo/string/input.V: -------------------------------------------------------------------------------- 1 | this 2 | this 3 | test 4 | test 5 | TEST 6 | TEST 7 | tes 8 | tes 9 | this is a test 10 | this is a test 11 | more 12 | more 13 | -------------------------------------------------------------------------------- /demo/string/insert.V: -------------------------------------------------------------------------------- 1 | s1=<> 2 | s1=<> 3 | s2= 4 | s2= 5 | s3= 6 | s3= 7 | s1= 8 | s1= 9 | s1= 10 | s1= 11 | s1= 12 | s1= 13 | s1= 14 | s1= 15 | s1= 16 | s1= 17 | s1= 18 | s1= 19 | s1= 20 | s1= 21 | s1= 22 | s1= 23 | s1= 24 | s1= 25 | -------------------------------------------------------------------------------- /demo/string/output.V: -------------------------------------------------------------------------------- 1 | this is a test 2 | this is a test 3 | < this> 4 | < this> 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /demo/string/remove1.V: -------------------------------------------------------------------------------- 1 | s1=<> 2 | s1=<> 3 | s2= 4 | s2= 5 | s3= 6 | s3= 7 | s1= 8 | s1= 9 | s1= 10 | s1= 11 | s1= 12 | s1= 13 | s1= 14 | s1= 15 | s1= 16 | s1= 17 | s1= 18 | s1= 19 | -------------------------------------------------------------------------------- /demo/string/replace.V: -------------------------------------------------------------------------------- 1 | s1=<> 2 | s1=<> 3 | s2= 4 | s2= 5 | s3= 6 | s3= 7 | s1= 8 | s1= 9 | s1= 10 | s1= 11 | s1= 12 | s1= 13 | s1= 14 | s1= 15 | s1= 16 | s1= 17 | s1= 18 | s1= 19 | s1= 20 | s1= 21 | s1= 22 | s1= 23 | s1= 24 | s1= 25 | s1= 26 | s1= 27 | s1= 28 | s1= 29 | s1= 30 | s1= 31 | -------------------------------------------------------------------------------- /demo/string/strmap.V: -------------------------------------------------------------------------------- 1 | key=Madison, value=Dolly 2 | key=Adams, value=Abagail 3 | key=Bush, value=Barbara 4 | key=Carter, value=Rosalyn 5 | key=Clinton, value=Hillary 6 | key=Ford, value=Betty 7 | key=Madison, value=Dolly 8 | key=Reagan, value=Nancy 9 | -------------------------------------------------------------------------------- /incl: -------------------------------------------------------------------------------- 1 | incl-master/incl-linux32 -------------------------------------------------------------------------------- /incl-master/incl-linux32/01-SC-README: -------------------------------------------------------------------------------- 1 | SC/01-SC-README -------------------------------------------------------------------------------- /incl-master/incl-linux32/Args.h: -------------------------------------------------------------------------------- 1 | SC/Args.h -------------------------------------------------------------------------------- /incl-master/incl-linux32/Array_alg.c: -------------------------------------------------------------------------------- 1 | SC/Array_alg.c -------------------------------------------------------------------------------- /incl-master/incl-linux32/Array_alg.h: -------------------------------------------------------------------------------- 1 | SC/Array_alg.h -------------------------------------------------------------------------------- /incl-master/incl-linux32/Bits.h: -------------------------------------------------------------------------------- 1 | SC/Bits.h -------------------------------------------------------------------------------- /incl-master/incl-linux32/Block.c: -------------------------------------------------------------------------------- 1 | SC/Block.c -------------------------------------------------------------------------------- /incl-master/incl-linux32/Block.h: -------------------------------------------------------------------------------- 1 | SC/Block.h -------------------------------------------------------------------------------- /incl-master/incl-linux32/CC/01-CC-README: -------------------------------------------------------------------------------- 1 | This is libC.a headers 2 | This headers are needed for bootsrap step 3 | -------------------------------------------------------------------------------- /incl-master/incl-linux32/CC/generic.h: -------------------------------------------------------------------------------- 1 | #ifndef GENERICH 2 | #define GENERICH 1 3 | #pragma lib "ape/libap.a" 4 | #pragma lib "c++/libC.a" 5 | 6 | #define __name2(a,b) a ## b 7 | #define __name3(a,b,c) a ## b ## c 8 | #define __name4(a,b,c,d) a ## b ## c ## d 9 | #define name2(a,b) __name2(a,b) 10 | #define name3(a,b,c) __name3(a,b,c) 11 | #define name4(a,b,c,d) __name4(a,b,c,d) 12 | 13 | #define declare(a,t) name2(a,declare)(t) 14 | #define implement(a,t) name2(a,implement)(t) 15 | #define declare2(a,t1,t2) name2(a,declare2)(t1,t2) 16 | #define implement2(a,t1,t2) name2(a,implement2)(t1,t2) 17 | 18 | 19 | extern int genericerror(int,char*); 20 | typedef int (*GPT)(int,char*); 21 | #define set_handler(generic,type,x) name4(set_,type,generic,_handler)(x) 22 | #define errorhandler(generic,type) name3(type,generic,handler) 23 | #define callerror(generic,type,a,b) (*errorhandler(generic,type))(a,b) 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /incl-master/incl-linux32/CC/new.h: -------------------------------------------------------------------------------- 1 | /*ident "@(#)cls4:incl-master/const-headers/new.h 1.2" */ 2 | /******************************************************************************* 3 | 4 | C++ source for the C++ Language System, Release 3.0. This product 5 | is a new release of the original cfront developed in the computer 6 | science research center of AT&T Bell Laboratories. 7 | 8 | Copyright (c) 1991, 1992 AT&T and UNIX System Laboratories, Inc. 9 | Copyright (c) 1984, 1989, 1990 AT&T. All Rights Reserved. 10 | 11 | THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE of AT&T and UNIX System 12 | Laboratories, Inc. The copyright notice above does not evidence 13 | any actual or intended publication of such source code. 14 | 15 | *******************************************************************************/ 16 | #ifndef __NEW_H 17 | #define __NEW_H 18 | 19 | #pragma lib "c++/libC.a" 20 | 21 | #ifndef __STDDEF_H 22 | #include 23 | #endif 24 | 25 | extern void (*set_new_handler (void(*)()))(); 26 | 27 | void *operator new(size_t, void*); 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /incl-master/incl-linux32/CC/std_bool.h: -------------------------------------------------------------------------------- 1 | /*ident "@(#) @(#)std_bool.h 1.1.1.2" */ 2 | /****************************************************************************** 3 | * 4 | * C++ Standard Library 5 | * 6 | * Copyright (c) 1996 Lucent Technologies. All Rights Reserved. 7 | * 8 | * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF Lucent Technologies. 9 | * The copyright notice above does not evidence any actual or 10 | * intended publication of such source code. 11 | * 12 | ******************************************************************************/ 13 | 14 | #ifndef STD_BOOL 15 | #define STD_BOOL 16 | typedef int bool; 17 | const bool false = 0; 18 | const bool true = 1; 19 | #define BOOL_IS_TYPEDEF 1 20 | #endif 21 | -------------------------------------------------------------------------------- /incl-master/incl-linux32/CC/std_string.h: -------------------------------------------------------------------------------- 1 | /*ident "@(#) @(#)std_string.h 1.1.1.2" */ 2 | /****************************************************************************** 3 | * 4 | * C++ Standard Library 5 | * 6 | * Copyright (c) 1996 Lucent Technologies. All Rights Reserved. 7 | * 8 | * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF Lucent Technologies. 9 | * The copyright notice above does not evidence any actual or 10 | * intended publication of such source code. 11 | * 12 | ******************************************************************************/ 13 | 14 | #ifndef STDSTRINGHEDG 15 | #define STDSTRINGHEDG 16 | 17 | #include "std_bool.h" 18 | #include "str_imp.h" 19 | #include "wstr_imp.h" 20 | 21 | #endif 22 | -------------------------------------------------------------------------------- /incl-master/incl-linux32/CC/wstr_imp.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mingodad/cfront-3/93109c04c214cbe5c941cad6c71f335c2cd25e03/incl-master/incl-linux32/CC/wstr_imp.h -------------------------------------------------------------------------------- /incl-master/incl-linux32/Fsm.h: -------------------------------------------------------------------------------- 1 | SC/Fsm.h -------------------------------------------------------------------------------- /incl-master/incl-linux32/G2text.h: -------------------------------------------------------------------------------- 1 | SC/G2text.h -------------------------------------------------------------------------------- /incl-master/incl-linux32/Graph.h: -------------------------------------------------------------------------------- 1 | SC/Graph.h -------------------------------------------------------------------------------- /incl-master/incl-linux32/Graph_alg.h: -------------------------------------------------------------------------------- 1 | SC/Graph_alg.h -------------------------------------------------------------------------------- /incl-master/incl-linux32/List.c: -------------------------------------------------------------------------------- 1 | SC/List.c -------------------------------------------------------------------------------- /incl-master/incl-linux32/List.h: -------------------------------------------------------------------------------- 1 | SC/List.h -------------------------------------------------------------------------------- /incl-master/incl-linux32/List_old.c: -------------------------------------------------------------------------------- 1 | SC/List_old.c -------------------------------------------------------------------------------- /incl-master/incl-linux32/List_old.h: -------------------------------------------------------------------------------- 1 | SC/List_old.h -------------------------------------------------------------------------------- /incl-master/incl-linux32/Map.c: -------------------------------------------------------------------------------- 1 | SC/Map.c -------------------------------------------------------------------------------- /incl-master/incl-linux32/Map.h: -------------------------------------------------------------------------------- 1 | SC/Map.h -------------------------------------------------------------------------------- /incl-master/incl-linux32/Objection.h: -------------------------------------------------------------------------------- 1 | SC/Objection.h -------------------------------------------------------------------------------- /incl-master/incl-linux32/Path.h: -------------------------------------------------------------------------------- 1 | SC/Path.h -------------------------------------------------------------------------------- /incl-master/incl-linux32/Pool.h: -------------------------------------------------------------------------------- 1 | SC/Pool.h -------------------------------------------------------------------------------- /incl-master/incl-linux32/Regex.h: -------------------------------------------------------------------------------- 1 | SC/Regex.h -------------------------------------------------------------------------------- /incl-master/incl-linux32/SC/01-SC-README: -------------------------------------------------------------------------------- 1 | This is libSC headers 2 | This headers are not needed for bootstrap 3 | -------------------------------------------------------------------------------- /incl-master/incl-linux32/SC/cctype: -------------------------------------------------------------------------------- 1 | /*ident "@(#) @(#)cctype 1.1.1.2" */ 2 | /****************************************************************************** 3 | * 4 | * C++ Standard Library 5 | * 6 | * Copyright (c) 1996 Lucent Technologies. All Rights Reserved. 7 | * 8 | * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF Lucent Technologies. 9 | * The copyright notice above does not evidence any actual or 10 | * intended publication of such source code. 11 | * 12 | ******************************************************************************/ 13 | 14 | #ifndef CCTYPEEDG 15 | #define CCTYPEEDG 16 | 17 | #include "compiler_type.h" 18 | 19 | #ifdef NAMESPACES_LUCENT 20 | namespace std { 21 | #endif 22 | 23 | #include 24 | 25 | #ifdef NAMESPACES_LUCENT 26 | } 27 | using namespace std; 28 | #endif 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /incl-master/incl-linux32/SC/g2++.h: -------------------------------------------------------------------------------- 1 | /*ident "@(#)G2++:incl/g2++.h 3.1" */ 2 | /****************************************************************************** 3 | * 4 | * C++ Standard Components, Release 3.0. 5 | * 6 | * Copyright (c) 1991, 1992 AT&T and Unix System Laboratories, Inc. 7 | * Copyright (c) 1988, 1989, 1990 AT&T. All Rights Reserved. 8 | * 9 | * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T and Unix System 10 | * Laboratories, Inc. The copyright notice above does not evidence 11 | * any actual or intended publication of such source code. 12 | * 13 | ******************************************************************************/ 14 | 15 | #ifndef G2PLUSPLUSH 16 | #define G2PLUSPLUSH 17 | 18 | // Untyped I/O 19 | 20 | #include 21 | #include 22 | 23 | class istream; 24 | class ostream; 25 | 26 | istream& operator>>(istream& is,G2BUF& tree); 27 | ostream& operator<<(ostream& os,G2BUF& tree); 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /incl-master/incl-linux32/SC/g2manip.h: -------------------------------------------------------------------------------- 1 | /*ident "@(#)G2++:incl/g2manip.h 3.1" */ 2 | /****************************************************************************** 3 | * 4 | * C++ Standard Components, Release 3.0. 5 | * 6 | * Copyright (c) 1991, 1992 AT&T and Unix System Laboratories, Inc. 7 | * Copyright (c) 1988, 1989, 1990 AT&T. All Rights Reserved. 8 | * 9 | * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T and Unix System 10 | * Laboratories, Inc. The copyright notice above does not evidence 11 | * any actual or intended publication of such source code. 12 | * 13 | ******************************************************************************/ 14 | 15 | #ifndef G2MANIPH 16 | #define G2MANIPH 17 | 18 | #include 19 | 20 | class istream; 21 | class ostream; 22 | 23 | String getname_ATTLC(istream& is); 24 | String g2seek(istream& is); 25 | String g2seek(istream& is, const String& name); 26 | 27 | #endif 28 | -------------------------------------------------------------------------------- /incl-master/incl-linux32/SC/string: -------------------------------------------------------------------------------- 1 | /*ident "@(#) @(#)string 1.1.1.2" */ 2 | /****************************************************************************** 3 | * 4 | * C++ Standard Library 5 | * 6 | * Copyright (c) 1996 Lucent Technologies. All Rights Reserved. 7 | * 8 | * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF Lucent Technologies. 9 | * The copyright notice above does not evidence any actual or 10 | * intended publication of such source code. 11 | * 12 | ******************************************************************************/ 13 | 14 | #ifndef STRINGHEDG 15 | #define STRINGHEDG 16 | 17 | #include "std_string.h" 18 | 19 | #ifdef NAMESPACES_LUCENT 20 | using namespace std; 21 | #endif 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /incl-master/incl-linux32/Search_path.h: -------------------------------------------------------------------------------- 1 | SC/Search_path.h -------------------------------------------------------------------------------- /incl-master/incl-linux32/Stopwatch.h: -------------------------------------------------------------------------------- 1 | SC/Stopwatch.h -------------------------------------------------------------------------------- /incl-master/incl-linux32/String.h: -------------------------------------------------------------------------------- 1 | SC/String.h -------------------------------------------------------------------------------- /incl-master/incl-linux32/Symbol.h: -------------------------------------------------------------------------------- 1 | SC/Symbol.h -------------------------------------------------------------------------------- /incl-master/incl-linux32/Ticket.h: -------------------------------------------------------------------------------- 1 | SC/Ticket.h -------------------------------------------------------------------------------- /incl-master/incl-linux32/Time.h: -------------------------------------------------------------------------------- 1 | SC/Time.h -------------------------------------------------------------------------------- /incl-master/incl-linux32/Tmppath.h: -------------------------------------------------------------------------------- 1 | SC/Tmppath.h -------------------------------------------------------------------------------- /incl-master/incl-linux32/Vblock.c: -------------------------------------------------------------------------------- 1 | SC/Vblock.c -------------------------------------------------------------------------------- /incl-master/incl-linux32/Vblock.h: -------------------------------------------------------------------------------- 1 | SC/Vblock.h -------------------------------------------------------------------------------- /incl-master/incl-linux32/assert.h: -------------------------------------------------------------------------------- 1 | /* @(#) assert.h 1.2 1/27/86 17:46:34 */ 2 | /*ident "@(#)cfront:incl/assert.h 1.2"*/ 3 | #ifdef NDEBUG 4 | #define assert(EX) 5 | #else 6 | extern void _assert(char*, char*, int); 7 | #define assert(EX) if (EX) ; else _assert("EX", __FILE__, __LINE__) 8 | #endif 9 | -------------------------------------------------------------------------------- /incl-master/incl-linux32/bag.c: -------------------------------------------------------------------------------- 1 | SC/bag.c -------------------------------------------------------------------------------- /incl-master/incl-linux32/bag.h: -------------------------------------------------------------------------------- 1 | SC/bag.h -------------------------------------------------------------------------------- /incl-master/incl-linux32/basic_string.c: -------------------------------------------------------------------------------- 1 | SC/basic_string.c -------------------------------------------------------------------------------- /incl-master/incl-linux32/basic_string.h: -------------------------------------------------------------------------------- 1 | SC/basic_string.h -------------------------------------------------------------------------------- /incl-master/incl-linux32/cctype: -------------------------------------------------------------------------------- 1 | SC/cctype -------------------------------------------------------------------------------- /incl-master/incl-linux32/common.h: -------------------------------------------------------------------------------- 1 | CC/common.h -------------------------------------------------------------------------------- /incl-master/incl-linux32/compiler_type.h: -------------------------------------------------------------------------------- 1 | CC/compiler_type.h -------------------------------------------------------------------------------- /incl-master/incl-linux32/complex.h: -------------------------------------------------------------------------------- 1 | CC/complex.h -------------------------------------------------------------------------------- /incl-master/incl-linux32/errno.h: -------------------------------------------------------------------------------- 1 | /* @(#) errno.h 1.3 1/27/86 17:46:39 */ 2 | /*ident "@(#)cfront:incl/errno.h 1.3" */ 3 | /* 4 | * Error codes 5 | */ 6 | 7 | #include 8 | #if !defined(WIN32) 9 | #ifdef __cplusplus 10 | extern "C" 11 | #endif 12 | int* _get_errno(); 13 | #define errno (*_get_errno()) 14 | #endif -------------------------------------------------------------------------------- /incl-master/incl-linux32/fstream.h: -------------------------------------------------------------------------------- 1 | CC/fstream.h -------------------------------------------------------------------------------- /incl-master/incl-linux32/ftw.h: -------------------------------------------------------------------------------- 1 | /* @(#) ftw.h 1.3 1/27/86 17:46:42 */ 2 | /*ident "@(#)cfront:incl/ftw.h 1.3"*/ 3 | /* 4 | * Codes for the third argument to the user-supplied function 5 | * which is passed as the second argument to ftw 6 | */ 7 | 8 | #define FTW_F 0 /* file */ 9 | #define FTW_D 1 /* directory */ 10 | #define FTW_DNR 2 /* directory without read permission */ 11 | #define FTW_NS 3 /* unknown type, stat failed */ 12 | 13 | typedef int (*PF) (); 14 | extern int ftw (const char*, PF, int); 15 | -------------------------------------------------------------------------------- /incl-master/incl-linux32/g2++.h: -------------------------------------------------------------------------------- 1 | SC/g2++.h -------------------------------------------------------------------------------- /incl-master/incl-linux32/g2comp.h: -------------------------------------------------------------------------------- 1 | SC/g2comp.h -------------------------------------------------------------------------------- /incl-master/incl-linux32/g2ctype.h: -------------------------------------------------------------------------------- 1 | SC/g2ctype.h -------------------------------------------------------------------------------- /incl-master/incl-linux32/g2debug.h: -------------------------------------------------------------------------------- 1 | SC/g2debug.h -------------------------------------------------------------------------------- /incl-master/incl-linux32/g2desc.h: -------------------------------------------------------------------------------- 1 | SC/g2desc.h -------------------------------------------------------------------------------- /incl-master/incl-linux32/g2inline.h: -------------------------------------------------------------------------------- 1 | SC/g2inline.h -------------------------------------------------------------------------------- /incl-master/incl-linux32/g2io.h: -------------------------------------------------------------------------------- 1 | SC/g2io.h -------------------------------------------------------------------------------- /incl-master/incl-linux32/g2mach.h: -------------------------------------------------------------------------------- 1 | SC/g2mach.h -------------------------------------------------------------------------------- /incl-master/incl-linux32/g2manip.h: -------------------------------------------------------------------------------- 1 | SC/g2manip.h -------------------------------------------------------------------------------- /incl-master/incl-linux32/g2tree.h: -------------------------------------------------------------------------------- 1 | SC/g2tree.h -------------------------------------------------------------------------------- /incl-master/incl-linux32/g2values.h: -------------------------------------------------------------------------------- 1 | SC/g2values.h -------------------------------------------------------------------------------- /incl-master/incl-linux32/generic.h: -------------------------------------------------------------------------------- 1 | CC/generic.h -------------------------------------------------------------------------------- /incl-master/incl-linux32/grp.h: -------------------------------------------------------------------------------- 1 | /* @(#) grp.h 1.4 1/27/86 17:46:44 */ 2 | /*ident "@(#)cfront:incl/grp.h 1.4"*/ 3 | #ifndef FILE 4 | # include 5 | #endif 6 | 7 | struct group { /* see getgrent(3) */ 8 | char *gr_name; 9 | char *gr_passwd; 10 | int gr_gid; 11 | char **gr_mem; 12 | }; 13 | 14 | extern void endgrent (); 15 | extern group *fgetgrent (FILE*); 16 | extern group *getgrent (); 17 | extern group *getgrgid (int); 18 | extern group *getgrnam (const char*); 19 | extern void setgrent (); 20 | -------------------------------------------------------------------------------- /incl-master/incl-linux32/iomanip.h: -------------------------------------------------------------------------------- 1 | CC/iomanip.h -------------------------------------------------------------------------------- /incl-master/incl-linux32/iostream.h: -------------------------------------------------------------------------------- 1 | CC/iostream.h -------------------------------------------------------------------------------- /incl-master/incl-linux32/libc.h: -------------------------------------------------------------------------------- 1 | /* 2 | * short-cut include file 3 | */ 4 | 5 | #include 6 | #include 7 | #include 8 | -------------------------------------------------------------------------------- /incl-master/incl-linux32/malloc.h: -------------------------------------------------------------------------------- 1 | #ifndef __MALLOC__H 2 | #define __MALLOC__H 1 3 | 4 | #include 5 | 6 | extern "C" { 7 | #ifndef __GNUC__ 8 | void *malloc(size_t); 9 | void free(void *); 10 | void *realloc(void *, size_t); 11 | void *calloc(size_t, size_t); 12 | #else 13 | #include 14 | #endif 15 | } 16 | 17 | #endif 18 | -------------------------------------------------------------------------------- /incl-master/incl-linux32/memory.h: -------------------------------------------------------------------------------- 1 | /* 2 | * cheapo header 3 | */ 4 | #include 5 | -------------------------------------------------------------------------------- /incl-master/incl-linux32/mon.h: -------------------------------------------------------------------------------- 1 | /* @(#) mon.h 1.2 1/27/86 17:46:50 */ 2 | /*ident "@(#)cfront:incl/mon.h 1.2"*/ 3 | struct hdr { 4 | char *lpc; 5 | char *hpc; 6 | int nfns; 7 | }; 8 | 9 | struct cnt { 10 | char *fnpc; 11 | long mcnt; 12 | }; 13 | 14 | typedef unsigned short WORD; 15 | 16 | #define MON_OUT "mon.out" 17 | #define MPROGS0 (150 * sizeof(WORD)) /* 300 for pdp11, 600 for 32-bits */ 18 | #define MSCALE0 4 19 | #define NULL 0 20 | 21 | typedef int (*PF) (); 22 | extern void monitor (PF, PF, WORD*, int, int); 23 | -------------------------------------------------------------------------------- /incl-master/incl-linux32/new.h: -------------------------------------------------------------------------------- 1 | CC/new.h -------------------------------------------------------------------------------- /incl-master/incl-linux32/nlist.h: -------------------------------------------------------------------------------- 1 | /* @(#) nlist.h 1.3 1/27/86 17:46:51 */ 2 | /*ident "@(#)cfront:incl/nlist.h 1.3"*/ 3 | /* 4 | */ 5 | 6 | #if vax || u3b || M32 || u3b15 || u3b5 || u3b2 7 | 8 | /* symbol table entry structure */ 9 | 10 | struct nlist 11 | { 12 | char *n_name; /* symbol name */ 13 | long n_value; /* value of symbol */ 14 | short n_scnum; /* section number */ 15 | unsigned short n_type; /* type and derived type */ 16 | char n_sclass; /* storage class */ 17 | char n_numaux; /* number of aux. entries */ 18 | }; 19 | 20 | #else /* pdp11 || u370 */ 21 | 22 | struct nlist 23 | { 24 | char n_name[8]; /* symbol name */ 25 | #if pdp11 26 | int n_type; /* type of symbol in .o */ 27 | #else 28 | char n_type; 29 | char n_other; 30 | short n_desc; 31 | #endif 32 | unsigned n_value; /* value of symbol */ 33 | }; 34 | 35 | #endif 36 | 37 | extern int nlist (const char*, nlist*); 38 | -------------------------------------------------------------------------------- /incl-master/incl-linux32/osfcn.h: -------------------------------------------------------------------------------- 1 | #ifndef __OSFCN_H 2 | #define __OSFCN_H 1 3 | 4 | #ifdef __MINGW32__ 5 | #define _INC_MINGW_SECAPI 6 | #define _INC_CRTDEFS 7 | #ifdef __cfront__ 8 | #define __cdecl 9 | #endif 10 | #endif 11 | 12 | #if !(defined(__MINGW32__) || defined(__APPLE__)) 13 | #include 14 | #endif 15 | #include 16 | #include 17 | #include 18 | #ifndef __APPLE__ 19 | #include 20 | #endif 21 | #include 22 | #include 23 | #include 24 | #ifndef __APPLE__ 25 | #include 26 | #endif 27 | #if !(defined(_WIN32) || defined(__APPLE__)) 28 | #include 29 | #endif 30 | #endif 31 | -------------------------------------------------------------------------------- /incl-master/incl-linux32/plot.h: -------------------------------------------------------------------------------- 1 | /* @(#) plot.h 1.3 1/27/86 17:46:52 */ 2 | /*ident "@(#)cfront:incl/plot.h 1.3"*/ 3 | 4 | extern int arc (int, int, int, int, int, int), 5 | circle (int, int, int), 6 | closepl (), 7 | cont (int, int), 8 | erase (), 9 | label (const char*), 10 | line (int, int, int, int), 11 | linemod (const char*), 12 | move (int, int), 13 | openpl (), 14 | point (int, int), 15 | space (int, int, int, int); 16 | -------------------------------------------------------------------------------- /incl-master/incl-linux32/pw.h: -------------------------------------------------------------------------------- 1 | /* @(#) pw.h 1.1 1/27/86 17:46:53 */ 2 | /*ident "@(#)cfront:incl/pw.h 1.1"/ 3 | extern char* logname(), 4 | recmp (const char* ...), 5 | regexp (const char* ...); 6 | -------------------------------------------------------------------------------- /incl-master/incl-linux32/pwd.h: -------------------------------------------------------------------------------- 1 | /* @(#) pwd.h 1.4 1/27/86 17:46:54 */ 2 | /*ident "@(#)cfront:incl/pwd.h 1.4"*/ 3 | #ifndef FILE 4 | # include 5 | #endif 6 | 7 | struct passwd { 8 | char *pw_name; 9 | char *pw_passwd; 10 | int pw_uid; 11 | int pw_gid; 12 | char *pw_age; 13 | char *pw_comment; 14 | char *pw_gecos; 15 | char *pw_dir; 16 | char *pw_shell; 17 | }; 18 | 19 | struct comment { 20 | char *c_dept; 21 | char *c_name; 22 | char *c_acct; 23 | char *c_bin; 24 | }; 25 | 26 | extern passwd *getpwent (); 27 | extern passwd *getpwuid (); 28 | extern passwd *getpwnam (const char*); 29 | extern passwd *fgetpwent (FILE*); 30 | 31 | extern void setpwent (); 32 | extern void endpwent (); 33 | extern int putpwent (const passwd*, FILE*); 34 | -------------------------------------------------------------------------------- /incl-master/incl-linux32/rand48.h: -------------------------------------------------------------------------------- 1 | /* @(#) rand48.h 1.2 1/27/86 17:46:56 */ 2 | /*ident "@(#)cfront:incl/rand48.h 1.2"*/ 3 | extern double drand48 (), 4 | erand48 (unsigned short); 5 | 6 | extern long lrand48 (), 7 | nrand48 (unsigned short), 8 | mrand48 (), 9 | jrand48 (unsigned short); 10 | 11 | extern void lcong48 (unsigned short); 12 | extern void srand48 (long); 13 | 14 | extern unsigned short *seed48 (unsigned short); 15 | -------------------------------------------------------------------------------- /incl-master/incl-linux32/search.h: -------------------------------------------------------------------------------- 1 | /* @(#) search.h 1.3 1/27/86 17:46:57 */ 2 | /*ident "@(#)cfront:incl/search.h 1.3"*/ 3 | 4 | /* BSEARCH(3C) */ 5 | extern char *bsearch(const char*, char*, unsigned, int, int); 6 | 7 | /* HSEARCH(3C) */ 8 | typedef struct entry { char *key, *data; } ENTRY; 9 | typedef enum { FIND, ENTER } ACTION; 10 | 11 | extern ENTRY *hsearch (ENTRY,ACTION); 12 | extern int hcreate(unsigned); 13 | extern void hdestroy (); 14 | 15 | /* LSEARCH(3C) */ 16 | typedef int (*PF) (); 17 | extern char *lsearch (const char*, char*, unsigned*, unsigned, PF); 18 | extern char *lfind (const char*, char*, unsigned*, unsigned, PF); 19 | 20 | /* TSEARCH(3C) */ 21 | typedef enum { preorder, postorder, endorder, leaf } VISIT; 22 | 23 | extern char *tsearch (const char*, char**, int); 24 | extern char *tfind (const char*, char**, int); 25 | extern char *tdelete (const char*, char**, int); 26 | extern void twalk(char*,void (*)()); 27 | -------------------------------------------------------------------------------- /incl-master/incl-linux32/set.c: -------------------------------------------------------------------------------- 1 | SC/set.c -------------------------------------------------------------------------------- /incl-master/incl-linux32/set.h: -------------------------------------------------------------------------------- 1 | SC/set.h -------------------------------------------------------------------------------- /incl-master/incl-linux32/set_of_p.c: -------------------------------------------------------------------------------- 1 | SC/set_of_p.c -------------------------------------------------------------------------------- /incl-master/incl-linux32/set_of_p.h: -------------------------------------------------------------------------------- 1 | SC/set_of_p.h -------------------------------------------------------------------------------- /incl-master/incl-linux32/setjmp.h: -------------------------------------------------------------------------------- 1 | /* @(#) setjmp.h 1.2 1/27/86 17:46:58 */ 2 | /*ident "@(#)cfront:incl/setjmp.h 1.2"*/ 3 | #ifndef _JBLEN 4 | 5 | #if vax || M32 || u3b15 || u3b5 || u3b2 6 | #define _JBLEN 10 7 | #endif 8 | 9 | #if pdp11 10 | #define _JBLEN 3 11 | #endif 12 | 13 | #if u370 14 | #define _JBLEN 4 15 | #endif 16 | 17 | #if u3b 18 | #define _JBLEN 11 19 | #endif 20 | 21 | typedef int jmp_buf[_JBLEN]; 22 | 23 | extern int setjmp(jmp_buf); 24 | extern void longjmp(jmp_buf, int); 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /incl-master/incl-linux32/signal.h.xx: -------------------------------------------------------------------------------- 1 | /* @(#) signal.h 1.3 1/27/86 17:46:59 */ 2 | /*ident "@(#)cfront:incl/signal.h 1.3"*/ 3 | /* 3.0 SID # 1.3 */ 4 | 5 | //#ifndef _SIGNAL_H 6 | //#define _SIGNAL_H 7 | 8 | //#include 9 | #include 10 | 11 | extern "C" { 12 | //typedef int (*PF) (); 13 | // 14 | //extern int (*sigset(int, PF))(); 15 | //extern int (*ssignal (int, PF))(); 16 | //extern int gsignal (int); 17 | //extern int kill (int, int); 18 | 19 | void (*signal(int, void (*)(int)))(int); 20 | } 21 | 22 | //#endif 23 | -------------------------------------------------------------------------------- /incl-master/incl-linux32/std_bool.h: -------------------------------------------------------------------------------- 1 | CC/std_bool.h -------------------------------------------------------------------------------- /incl-master/incl-linux32/std_string.h: -------------------------------------------------------------------------------- 1 | CC/std_string.h -------------------------------------------------------------------------------- /incl-master/incl-linux32/stdarg.h: -------------------------------------------------------------------------------- 1 | /* @(#) stdarg.h 1.2 1/27/86 17:46:59 */ 2 | /*ident "@(#)cfront:incl/stdarg.h 1.2"*/ 3 | /* stdarg.h */ 4 | /* ADAPTED FROM: */ 5 | /* @(#)varargs.h 1.2 */ 6 | 7 | /* 8 | USAGE: 9 | f( arg-declarations ... ) { 10 | va_list ap; 11 | va_start(ap, parmN); // parmN == last named arg 12 | // ... 13 | type arg = va_arg(ap, type); 14 | // ... 15 | va_end(ap); 16 | } 17 | */ 18 | 19 | #ifndef va_start 20 | 21 | typedef char *va_list; 22 | #define va_end(ap) 23 | #ifdef u370 24 | #define va_start(ap, parmN) ap =\ 25 | (char *) ((int)&parmN + 2*sizeof(parmN) - 1 & -sizeof(parmN)) 26 | #define va_arg(ap, mode) ((mode *)(ap = \ 27 | (char *) ((int)ap + 2*sizeof(mode) - 1 & -sizeof(mode))))[-1] 28 | #else 29 | #define va_start(ap, parmN) ap = (char *)( &parmN+1 ) 30 | #define va_arg(ap, mode) ((mode *)(ap += sizeof(mode)))[-1] 31 | #endif 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /incl-master/incl-linux32/stddef.h: -------------------------------------------------------------------------------- 1 | /* @(#) stdio.h 1.8 1/31/86 13:40:51 */ 2 | /*ident "@(#)cfront:incl/stdio.h 1.8"*/ 3 | 4 | #ifndef __CF_STDDEF_H 5 | #define __CF_STDDEF_H 6 | 7 | #if defined(_WIN32) && !defined(_WIN64) 8 | typedef int ssize_t; 9 | typedef unsigned int size_t; 10 | #elif defined(_WIN64) 11 | typedef long long ssize_t; 12 | typedef unsigned long long size_t; 13 | #else //UNIX 14 | #if __SIZEOF_LONG__ == __SIZEOF_INT__ 15 | typedef int ssize_t; 16 | typedef unsigned int size_t; 17 | #else 18 | typedef long ssize_t; 19 | typedef unsigned long size_t; 20 | #endif 21 | #endif 22 | 23 | #endif //__CF_STDDEF_H 24 | -------------------------------------------------------------------------------- /incl-master/incl-linux32/stdiostream.h: -------------------------------------------------------------------------------- 1 | CC/stdiostream.h -------------------------------------------------------------------------------- /incl-master/incl-linux32/stdlib.h: -------------------------------------------------------------------------------- 1 | /* @(#) stdlib.h 1.4 1/27/86 17:47:01 */ 2 | /*ident "@(#)cfront:incl/stdlib.h 1.4"*/ 3 | 4 | extern "C" { 5 | 6 | #ifndef __STDDEF_H 7 | #include 8 | #endif 9 | 10 | void abort(void); 11 | double atof (const char*); 12 | int atoi (const char*); 13 | long atol (const char*); 14 | void* calloc (size_t,size_t); 15 | void exit (int); 16 | void free (void*); 17 | char* getenv (const char*); 18 | void* malloc (size_t); 19 | int rand (); 20 | void* realloc (void*, size_t); 21 | void srand (unsigned); 22 | double strtod (const char*, char**); 23 | long strtol (const char*, char**, int); 24 | int system (const char*); 25 | } 26 | -------------------------------------------------------------------------------- /incl-master/incl-linux32/str_imp.h: -------------------------------------------------------------------------------- 1 | CC/str_imp.h -------------------------------------------------------------------------------- /incl-master/incl-linux32/stream.h: -------------------------------------------------------------------------------- 1 | CC/stream.h -------------------------------------------------------------------------------- /incl-master/incl-linux32/string: -------------------------------------------------------------------------------- 1 | SC/string -------------------------------------------------------------------------------- /incl-master/incl-linux32/string.h: -------------------------------------------------------------------------------- 1 | /* @(#) string.h 1.3 1/27/86 17:47:04 */ 2 | /*ident "@(#)cfront:incl/string.h 1.3"*/ 3 | 4 | extern "C" { 5 | 6 | #ifndef __STDDEF_H 7 | #include 8 | #endif 9 | 10 | char 11 | *strcpy(char*, const char*), 12 | *strncpy(char*, const char*, size_t), 13 | *strcat(char*, const char*), 14 | *strncat(char*, const char*, size_t), 15 | *strchr(const char*, int), 16 | *strrchr(const char*, int), 17 | *strpbrk(const char*, const char*), 18 | *strtok(char*, const char*), 19 | *strdup(const char*); 20 | int 21 | strcmp(const char*, const char*), 22 | strncmp(const char*, const char*, size_t); 23 | size_t 24 | strlen(const char*), 25 | strspn(const char*, const char*), 26 | strcspn(const char*, const char*); 27 | void 28 | *memccpy(char *, const char *, int, int), 29 | *memchr(const void *, int, size_t), 30 | *memcpy(void *, const void *, size_t), 31 | *memset(void *, int, size_t); 32 | int memcmp(const void *, const void *, size_t); 33 | } 34 | -------------------------------------------------------------------------------- /incl-master/incl-linux32/stringexcept.h: -------------------------------------------------------------------------------- 1 | CC/stringexcept.h -------------------------------------------------------------------------------- /incl-master/incl-linux32/strstream.h: -------------------------------------------------------------------------------- 1 | CC/strstream.h -------------------------------------------------------------------------------- /incl-master/incl-linux32/sys/ipc.h: -------------------------------------------------------------------------------- 1 | /* @(#) ipc.h 1.4 1/27/86 17:47:05 */ 2 | /*ident "@(#)cfront:incl/sys/ipc.h 1.4"*/ 3 | /* Common IPC Access Structure */ 4 | // must be included. 5 | 6 | struct ipc_perm { 7 | ushort uid; /* owner's user id */ 8 | ushort gid; /* owner's group id */ 9 | ushort cuid; /* creator's user id */ 10 | ushort cgid; /* creator's group id */ 11 | ushort mode; /* access modes */ 12 | ushort seq; /* slot usage sequence number */ 13 | key_t key; /* key */ 14 | }; 15 | 16 | /* Common IPC Definitions. */ 17 | /* Mode bits. */ 18 | #define IPC_ALLOC 0100000 /* entry currently allocated */ 19 | #define IPC_CREAT 0001000 /* create entry if key doesn't exist */ 20 | #define IPC_EXCL 0002000 /* fail if key exists */ 21 | #define IPC_NOWAIT 0004000 /* error if request must wait */ 22 | 23 | /* Keys. */ 24 | #define IPC_PRIVATE (key_t)0 /* private key */ 25 | 26 | /* Control Commands. */ 27 | #define IPC_RMID 0 /* remove identifier */ 28 | #define IPC_SET 1 /* set options */ 29 | #define IPC_STAT 2 /* get options */ 30 | 31 | 32 | extern key_t ftok(const char*, char); 33 | -------------------------------------------------------------------------------- /incl-master/incl-linux32/sys/lock.h: -------------------------------------------------------------------------------- 1 | /* @(#) lock.h 1.2 1/27/86 17:47:07 */ 2 | /*ident "@(#)cfront:incl/sys/lock.h 1.2"*/ 3 | /* 4 | * flags for locking procs and texts 5 | */ 6 | #define UNLOCK 0 7 | #define PROCLOCK 1 8 | #define TXTLOCK 2 9 | #define DATLOCK 4 10 | 11 | extern int plock (int); 12 | -------------------------------------------------------------------------------- /incl-master/incl-linux32/sys/times.h: -------------------------------------------------------------------------------- 1 | /* @(#) times.h 1.2 1/27/86 17:47:13 */ 2 | /*ident "@(#)cfront:incl/sys/times.h 1.2"*/ 3 | /* 4 | * Structure returned by times() 5 | */ 6 | struct tms { 7 | time_t tms_utime; /* user time */ 8 | time_t tms_stime; /* system time */ 9 | time_t tms_cutime; /* user time, children */ 10 | time_t tms_cstime; /* system time, children */ 11 | }; 12 | 13 | extern long times (tms*); 14 | -------------------------------------------------------------------------------- /incl-master/incl-linux32/sys/utsname.h: -------------------------------------------------------------------------------- 1 | /* @(#) utsname.h 1.3 1/27/86 17:47:14 */ 2 | /*ident "@(#)cfront:incl/sys/utsname.h 1.3"*/ 3 | struct utsname { 4 | char sysname[9]; 5 | char nodename[9]; 6 | char release[9]; 7 | char version[9]; 8 | char machine[9]; 9 | }; 10 | 11 | extern int uname (utsname*); 12 | -------------------------------------------------------------------------------- /incl-master/incl-linux32/sysent.h: -------------------------------------------------------------------------------- 1 | CC/sysent.h -------------------------------------------------------------------------------- /incl-master/incl-linux32/task.h: -------------------------------------------------------------------------------- 1 | CC/task.h -------------------------------------------------------------------------------- /incl-master/incl-linux32/time.h: -------------------------------------------------------------------------------- 1 | /* @(#) time.h 1.2 1/27/86 17:47:18 */ 2 | /*ident "@(#)cfront:incl/time.h 1.2"*/ 3 | 4 | #if 0 5 | struct tm { /* see ctime(3) */ 6 | int tm_sec; 7 | int tm_min; 8 | int tm_hour; 9 | int tm_mday; 10 | int tm_mon; 11 | int tm_year; 12 | int tm_wday; 13 | int tm_yday; 14 | int tm_isdst; 15 | }; 16 | 17 | extern "C" { 18 | long time(long*), 19 | clock (); 20 | tm *gmtime(long*), 21 | *localtime(long*); 22 | char *ctime(long*), 23 | *asctime(tm*); 24 | void tzset(); 25 | long timezone; 26 | int daylight; 27 | char *tzname[2]; 28 | } 29 | #endif 30 | -------------------------------------------------------------------------------- /incl-master/incl-linux32/ustat.h: -------------------------------------------------------------------------------- 1 | /* @(#) ustat.h 1.2 1/27/86 17:47:24 */ 2 | /*ident "@(#)cfront:incl/ustat.h 1.2"*/ 3 | 4 | /* must be included */ 5 | 6 | struct ustat { 7 | daddr_t f_tfree; /* total free */ 8 | ino_t f_tinode; /* total inodes free */ 9 | char f_fname[6]; /* filsys name */ 10 | char f_fpack[6]; /* filsys pack name */ 11 | }; 12 | 13 | extern int ustat(int, ustat*); 14 | -------------------------------------------------------------------------------- /incl-master/incl-linux32/utime.h: -------------------------------------------------------------------------------- 1 | /* @(#) utime.h 1.1 1/27/86 17:47:25 */ 2 | /*ident "@(#)cfront:incl/utime.h 1.1"*/ 3 | 4 | #ifndef utimbuf 5 | //struct utimbuf { 6 | // time_t actime; 7 | // time_t modtime; 8 | // } 9 | 10 | //extern int utime (const char*, utimbuf*); 11 | #endif 12 | -------------------------------------------------------------------------------- /incl-master/incl-linux32/values.h: -------------------------------------------------------------------------------- 1 | CC/values.h -------------------------------------------------------------------------------- /incl-master/incl-linux32/vector.h: -------------------------------------------------------------------------------- 1 | CC/vector.h -------------------------------------------------------------------------------- /incl-master/incl-linux32/wstr_imp.h: -------------------------------------------------------------------------------- 1 | CC/wstr_imp.h -------------------------------------------------------------------------------- /lib/complex/complex/arg.cpp: -------------------------------------------------------------------------------- 1 | /*ident "@(#)cls4:lib/complex/complex/arg.c 1.3" */ 2 | /******************************************************************************* 3 | 4 | C++ source for the C++ Language System, Release 3.0. This product 5 | is a new release of the original cfront developed in the computer 6 | science research center of AT&T Bell Laboratories. 7 | 8 | Copyright (c) 1993 UNIX System Laboratories, Inc. 9 | Copyright (c) 1991, 1992 AT&T and UNIX System Laboratories, Inc. 10 | Copyright (c) 1984, 1989, 1990 AT&T. All Rights Reserved. 11 | 12 | THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE of AT&T and UNIX System 13 | Laboratories, Inc. The copyright notice above does not evidence 14 | any actual or intended publication of such source code. 15 | 16 | *******************************************************************************/ 17 | #include 18 | 19 | double 20 | arg(complex z) 21 | { 22 | if ( z.re == 0 && z.im == 0 ) return 0; 23 | 24 | return atan2(z.im,z.re); 25 | } 26 | -------------------------------------------------------------------------------- /lib/complex/complex/const.h: -------------------------------------------------------------------------------- 1 | /*ident "@(#)cls4:lib/complex/complex/const.h 1.3" */ 2 | /******************************************************************************* 3 | 4 | C++ source for the C++ Language System, Release 3.0. This product 5 | is a new release of the original cfront developed in the computer 6 | science research center of AT&T Bell Laboratories. 7 | 8 | Copyright (c) 1993 UNIX System Laboratories, Inc. 9 | Copyright (c) 1991, 1992 AT&T and UNIX System Laboratories, Inc. 10 | Copyright (c) 1984, 1989, 1990 AT&T. All Rights Reserved. 11 | 12 | THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE of AT&T and UNIX System 13 | Laboratories, Inc. The copyright notice above does not evidence 14 | any actual or intended publication of such source code. 15 | 16 | *******************************************************************************/ 17 | #define ABS(x) ((x<0) ? -(x) : x) 18 | 19 | #define MAX_EXPONENT 88.0 20 | #define MIN_EXPONENT -88.0 21 | 22 | #define GREATEST 1.701411834604692293e38 23 | -------------------------------------------------------------------------------- /lib/complex/complex/error.cpp: -------------------------------------------------------------------------------- 1 | /*ident "@(#)cls4:lib/complex/complex/error.c 1.3" */ 2 | /******************************************************************************* 3 | 4 | C++ source for the C++ Language System, Release 3.0. This product 5 | is a new release of the original cfront developed in the computer 6 | science research center of AT&T Bell Laboratories. 7 | 8 | Copyright (c) 1993 UNIX System Laboratories, Inc. 9 | Copyright (c) 1991, 1992 AT&T and UNIX System Laboratories, Inc. 10 | Copyright (c) 1984, 1989, 1990 AT&T. All Rights Reserved. 11 | 12 | THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE of AT&T and UNIX System 13 | Laboratories, Inc. The copyright notice above does not evidence 14 | any actual or intended publication of such source code. 15 | 16 | *******************************************************************************/ 17 | #include 18 | 19 | int 20 | complex_error( c_exception& ) 21 | { 22 | return( 0 ); 23 | } 24 | -------------------------------------------------------------------------------- /lib/complex/complex/polar.cpp: -------------------------------------------------------------------------------- 1 | /*ident "@(#)cls4:lib/complex/complex/polar.c 1.3" */ 2 | /******************************************************************************* 3 | 4 | C++ source for the C++ Language System, Release 3.0. This product 5 | is a new release of the original cfront developed in the computer 6 | science research center of AT&T Bell Laboratories. 7 | 8 | Copyright (c) 1993 UNIX System Laboratories, Inc. 9 | Copyright (c) 1991, 1992 AT&T and UNIX System Laboratories, Inc. 10 | Copyright (c) 1984, 1989, 1990 AT&T. All Rights Reserved. 11 | 12 | THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE of AT&T and UNIX System 13 | Laboratories, Inc. The copyright notice above does not evidence 14 | any actual or intended publication of such source code. 15 | 16 | *******************************************************************************/ 17 | #include 18 | 19 | complex 20 | polar(double r, double theta) 21 | { 22 | return complex(r * cos(theta), r * sin(theta) ); 23 | } 24 | -------------------------------------------------------------------------------- /lib/generic/generic.cpp: -------------------------------------------------------------------------------- 1 | /*ident "@(#)cls4:lib/generic/generic.c 1.4" */ 2 | /******************************************************************************* 3 | 4 | C++ source for the C++ Language System, Release 3.0. This product 5 | is a new release of the original cfront developed in the computer 6 | science research center of AT&T Bell Laboratories. 7 | 8 | Copyright (c) 1993 UNIX System Laboratories, Inc. 9 | Copyright (c) 1991, 1992 AT&T and UNIX System Laboratories, Inc. 10 | Copyright (c) 1984, 1989, 1990 AT&T. All Rights Reserved. 11 | 12 | THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE of AT&T and UNIX System 13 | Laboratories, Inc. The copyright notice above does not evidence 14 | any actual or intended publication of such source code. 15 | 16 | *******************************************************************************/ 17 | #include 18 | #include 19 | 20 | extern int genericerror(int n, char* s) 21 | { 22 | fprintf(stderr,"%s %d\n",s?s:"error in generic library function",n); 23 | // abort(111); 24 | abort(); 25 | return 0; 26 | } 27 | -------------------------------------------------------------------------------- /lib/mk/_stdio.c: -------------------------------------------------------------------------------- 1 | /* stdio.c */ 2 | 3 | #include 4 | #include 5 | 6 | FILE* _get_stdin() 7 | { 8 | return stdin; 9 | } 10 | 11 | FILE* _get_stdout() 12 | { 13 | return stdout; 14 | } 15 | 16 | FILE* _get_stderr() 17 | { 18 | return stderr; 19 | } 20 | #if !defined(WIN32) 21 | int* _get_errno() 22 | { 23 | return &errno; 24 | } 25 | #endif 26 | -------------------------------------------------------------------------------- /lib/new/_delete.cpp: -------------------------------------------------------------------------------- 1 | /*ident "@(#)cls4:lib/new/_delete.c 1.3" */ 2 | /******************************************************************************* 3 | 4 | C++ source for the C++ Language System, Release 3.0. This product 5 | is a new release of the original cfront developed in the computer 6 | science research center of AT&T Bell Laboratories. 7 | 8 | Copyright (c) 1993 UNIX System Laboratories, Inc. 9 | Copyright (c) 1991, 1992 AT&T and UNIX System Laboratories, Inc. 10 | Copyright (c) 1984, 1989, 1990 AT&T. All Rights Reserved. 11 | 12 | THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE of AT&T and UNIX System 13 | Laboratories, Inc. The copyright notice above does not evidence 14 | any actual or intended publication of such source code. 15 | 16 | *******************************************************************************/ 17 | extern "C" { 18 | extern void free(char*); 19 | } 20 | 21 | extern void operator delete(void* p) 22 | { 23 | if (p) free( (char*)p ); 24 | } 25 | -------------------------------------------------------------------------------- /lib/new/_handler.cpp: -------------------------------------------------------------------------------- 1 | /*ident "@(#)cls4:lib/new/_handler.c 1.3" */ 2 | /******************************************************************************* 3 | 4 | C++ source for the C++ Language System, Release 3.0. This product 5 | is a new release of the original cfront developed in the computer 6 | science research center of AT&T Bell Laboratories. 7 | 8 | Copyright (c) 1993 UNIX System Laboratories, Inc. 9 | Copyright (c) 1991, 1992 AT&T and UNIX System Laboratories, Inc. 10 | Copyright (c) 1984, 1989, 1990 AT&T. All Rights Reserved. 11 | 12 | THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE of AT&T and UNIX System 13 | Laboratories, Inc. The copyright notice above does not evidence 14 | any actual or intended publication of such source code. 15 | 16 | *******************************************************************************/ 17 | 18 | typedef void (*PFVV)(); 19 | extern PFVV _new_handler = 0; 20 | 21 | extern PFVV set_new_handler(PFVV handler) 22 | { 23 | PFVV rr = _new_handler; 24 | _new_handler = handler; 25 | return rr; 26 | } 27 | -------------------------------------------------------------------------------- /lib/new/placenew.cpp: -------------------------------------------------------------------------------- 1 | /*ident "@(#)cls4:lib/new/placenew.c 1.3" */ 2 | /******************************************************************************* 3 | 4 | C++ source for the C++ Language System, Release 3.0. This product 5 | is a new release of the original cfront developed in the computer 6 | science research center of AT&T Bell Laboratories. 7 | 8 | Copyright (c) 1993 UNIX System Laboratories, Inc. 9 | Copyright (c) 1991, 1992 AT&T and UNIX System Laboratories, Inc. 10 | Copyright (c) 1984, 1989, 1990 AT&T. All Rights Reserved. 11 | 12 | THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE of AT&T and UNIX System 13 | Laboratories, Inc. The copyright notice above does not evidence 14 | any actual or intended publication of such source code. 15 | 16 | *******************************************************************************/ 17 | #include 18 | 19 | void* operator new (size_t, void* p) 20 | { 21 | return p; 22 | } 23 | -------------------------------------------------------------------------------- /lib/static/_ctor.cpp: -------------------------------------------------------------------------------- 1 | /*ident "@(#)cls4:lib/static/_ctor.c 1.3" */ 2 | /******************************************************************************* 3 | 4 | C++ source for the C++ Language System, Release 3.0. This product 5 | is a new release of the original cfront developed in the computer 6 | science research center of AT&T Bell Laboratories. 7 | 8 | Copyright (c) 1993 UNIX System Laboratories, Inc. 9 | Copyright (c) 1991, 1992 AT&T and UNIX System Laboratories, Inc. 10 | Copyright (c) 1984, 1989, 1990 AT&T. All Rights Reserved. 11 | 12 | THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE of AT&T and UNIX System 13 | Laboratories, Inc. The copyright notice above does not evidence 14 | any actual or intended publication of such source code. 15 | 16 | *******************************************************************************/ 17 | typedef void (*PFV)(); 18 | extern PFV _ctors[] = { 0 }; 19 | -------------------------------------------------------------------------------- /lib/static/_dtor.cpp: -------------------------------------------------------------------------------- 1 | /*ident "@(#)cls4:lib/static/_dtor.c 1.3" */ 2 | /******************************************************************************* 3 | 4 | C++ source for the C++ Language System, Release 3.0. This product 5 | is a new release of the original cfront developed in the computer 6 | science research center of AT&T Bell Laboratories. 7 | 8 | Copyright (c) 1993 UNIX System Laboratories, Inc. 9 | Copyright (c) 1991, 1992 AT&T and UNIX System Laboratories, Inc. 10 | Copyright (c) 1984, 1989, 1990 AT&T. All Rights Reserved. 11 | 12 | THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE of AT&T and UNIX System 13 | Laboratories, Inc. The copyright notice above does not evidence 14 | any actual or intended publication of such source code. 15 | 16 | *******************************************************************************/ 17 | typedef void (*PFV)(); 18 | extern PFV _dtors[] = { 0 }; 19 | -------------------------------------------------------------------------------- /lib/static/exit_svr4.cpp: -------------------------------------------------------------------------------- 1 | /*ident "@(#)cls4:lib/static/exit.c 1.1" */ 2 | /******************************************************************************* 3 | 4 | C++ source for the C++ Language System, Release 3.0. This product 5 | is a new release of the original cfront developed in the computer 6 | science research center of AT&T Bell Laboratories. 7 | 8 | Copyright (c) 1991 AT&T and UNIX System Laboratories, Inc. 9 | Copyright (c) 1984, 1989, 1990 AT&T. All Rights Reserved. 10 | 11 | THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE of AT&T and UNIX System 12 | Laboratories, Inc. The copyright notice above does not evidence 13 | any actual or intended publication of such source code. 14 | 15 | *******************************************************************************/ 16 | 17 | extern "C" { 18 | extern void _exit(int); 19 | extern void _cleanup(); 20 | extern void _exithandle(); 21 | } 22 | extern void __dtors(); 23 | 24 | extern "C" { 25 | extern void exit(int i); 26 | } 27 | 28 | extern void exit(int i) 29 | { 30 | _exithandle(); 31 | __dtors(); 32 | _cleanup(); 33 | _exit(i); 34 | } 35 | -------------------------------------------------------------------------------- /lib/static/exit_unused.cpp: -------------------------------------------------------------------------------- 1 | /*ident "@(#)cls4:lib/static/exit.c 1.3" */ 2 | /******************************************************************************* 3 | 4 | C++ source for the C++ Language System, Release 3.0. This product 5 | is a new release of the original cfront developed in the computer 6 | science research center of AT&T Bell Laboratories. 7 | 8 | Copyright (c) 1993 UNIX System Laboratories, Inc. 9 | Copyright (c) 1991, 1992 AT&T and UNIX System Laboratories, Inc. 10 | Copyright (c) 1984, 1989, 1990 AT&T. All Rights Reserved. 11 | 12 | THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE of AT&T and UNIX System 13 | Laboratories, Inc. The copyright notice above does not evidence 14 | any actual or intended publication of such source code. 15 | 16 | *******************************************************************************/ 17 | 18 | extern "C" { 19 | extern void _exit(int); 20 | extern void _cleanup(); 21 | } 22 | extern void __dtors(); 23 | 24 | extern "C" { 25 | extern void exit(int i); 26 | } 27 | 28 | extern void exit(int i) 29 | { 30 | __dtors(); 31 | _cleanup(); 32 | _exit(i); 33 | } 34 | -------------------------------------------------------------------------------- /lib/static/pure.cpp: -------------------------------------------------------------------------------- 1 | /*ident "@(#)cls4:lib/static/pure.c 1.3" */ 2 | /******************************************************************************* 3 | 4 | C++ source for the C++ Language System, Release 3.0. This product 5 | is a new release of the original cfront developed in the computer 6 | science research center of AT&T Bell Laboratories. 7 | 8 | Copyright (c) 1993 UNIX System Laboratories, Inc. 9 | Copyright (c) 1991, 1992 AT&T and UNIX System Laboratories, Inc. 10 | Copyright (c) 1984, 1989, 1990 AT&T. All Rights Reserved. 11 | 12 | THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE of AT&T and UNIX System 13 | Laboratories, Inc. The copyright notice above does not evidence 14 | any actual or intended publication of such source code. 15 | 16 | *******************************************************************************/ 17 | 18 | extern "C" void abort(); 19 | extern "C" void __pure_virtual_called() { abort(); } 20 | 21 | -------------------------------------------------------------------------------- /libSC/Args/Argsarg.c: -------------------------------------------------------------------------------- 1 | /*ident "@(#)Args:Argsarg.c 3.1" */ 2 | /****************************************************************************** 3 | * 4 | * C++ Standard Components, Release 3.0. 5 | * 6 | * Copyright (c) 1991, 1992 AT&T and Unix System Laboratories, Inc. 7 | * Copyright (c) 1988, 1989, 1990 AT&T. All Rights Reserved. 8 | * 9 | * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T and Unix System 10 | * Laboratories, Inc. The copyright notice above does not evidence 11 | * any actual or intended publication of such source code. 12 | * 13 | ******************************************************************************/ 14 | 15 | #include "Argslib.h" 16 | 17 | const char* 18 | Args::arg(int i) const { 19 | if (i >= nargs_ || i < 0) 20 | return 0; 21 | Arg *arg; 22 | for (arg = firstarg; i--; arg = arg->next); 23 | return arg->p; 24 | } 25 | -------------------------------------------------------------------------------- /libSC/Args/Argsflag.c: -------------------------------------------------------------------------------- 1 | /*ident "@(#)Args:Argsflag.c 3.1" */ 2 | /****************************************************************************** 3 | * 4 | * C++ Standard Components, Release 3.0. 5 | * 6 | * Copyright (c) 1991, 1992 AT&T and Unix System Laboratories, Inc. 7 | * Copyright (c) 1988, 1989, 1990 AT&T. All Rights Reserved. 8 | * 9 | * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T and Unix System 10 | * Laboratories, Inc. The copyright notice above does not evidence 11 | * any actual or intended publication of such source code. 12 | * 13 | ******************************************************************************/ 14 | 15 | #include "Argslib.h" 16 | 17 | char 18 | Args::flag(char option) const { 19 | for (Opt* opt = lastopt; opt != 0; opt = opt->prev) { 20 | if (opt->is(option)) 21 | return opt->flag_; 22 | } 23 | return nul; 24 | } 25 | 26 | char 27 | Args::flag(const char* option) const { 28 | for (Opt* opt = lastopt; opt != 0; opt = opt->prev) { 29 | if (opt->is(option)) 30 | return opt->flag_; 31 | } 32 | return nul; 33 | } 34 | -------------------------------------------------------------------------------- /libSC/Args/Argslib.h: -------------------------------------------------------------------------------- 1 | /*ident "@(#)Args:Argslib.h 3.1" */ 2 | /****************************************************************************** 3 | * 4 | * C++ Standard Components, Release 3.0. 5 | * 6 | * Copyright (c) 1991, 1992 AT&T and Unix System Laboratories, Inc. 7 | * Copyright (c) 1988, 1989, 1990 AT&T. All Rights Reserved. 8 | * 9 | * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T and Unix System 10 | * Laboratories, Inc. The copyright notice above does not evidence 11 | * any actual or intended publication of such source code. 12 | * 13 | ******************************************************************************/ 14 | 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | 21 | #define nul '\0' 22 | #define valchar ':' 23 | #define subchar ';' 24 | 25 | -------------------------------------------------------------------------------- /libSC/Args/Argsvalue.c: -------------------------------------------------------------------------------- 1 | /*ident "@(#)Args:Argsvalue.c 3.1" */ 2 | /****************************************************************************** 3 | * 4 | * C++ Standard Components, Release 3.0. 5 | * 6 | * Copyright (c) 1991, 1992 AT&T and Unix System Laboratories, Inc. 7 | * Copyright (c) 1988, 1989, 1990 AT&T. All Rights Reserved. 8 | * 9 | * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T and Unix System 10 | * Laboratories, Inc. The copyright notice above does not evidence 11 | * any actual or intended publication of such source code. 12 | * 13 | ******************************************************************************/ 14 | 15 | #include "Argslib.h" 16 | 17 | const char* 18 | Args::value(char option) const { 19 | for (Opt* opt = lastopt; opt != 0; opt = opt->prev) { 20 | if (opt->is(option)) 21 | return opt->value_; 22 | } 23 | return 0; 24 | } 25 | 26 | const char* 27 | Args::value(const char* option) const { 28 | for (Opt* opt = lastopt; opt != 0; opt = opt->prev) { 29 | if (opt->is(option)) 30 | return opt->value_; 31 | } 32 | return 0; 33 | } 34 | -------------------------------------------------------------------------------- /libSC/Args/demos/example.V: -------------------------------------------------------------------------------- 1 | example.E -align symbol -I incl1 foo.c -I incl2 -D FOO 2 | align(symbol) 3 | add_includedir(incl1) 4 | add_includedir(incl2) 5 | add_define(FOO, ) 6 | compile(foo.c) 7 | compile_only = 0 8 | optimize = 0 9 | allow_anachronisms = 1 10 | profiling = 0 11 | output_filename = a.out 12 | dryrun = 0 13 | example.E -o blech -O -o -O -DFOO=BAR,BAZ foo.c -dryrun 14 | add_define(FOO, BAR) 15 | add_define(BAZ, ) 16 | compile(foo.c) 17 | compile_only = 0 18 | optimize = 1 19 | allow_anachronisms = 1 20 | profiling = 0 21 | output_filename = -O 22 | dryrun = 1 23 | -------------------------------------------------------------------------------- /libSC/Args/demos/example.sh: -------------------------------------------------------------------------------- 1 | #ident "@(#)Args:demos/example.sh 3.1" 2 | ############################################################################### 3 | # 4 | # C++ Standard Components, Release 3.0. 5 | # 6 | # Copyright (c) 1991, 1992 AT&T and Unix System Laboratories, Inc. 7 | # Copyright (c) 1988, 1989, 1990 AT&T. All Rights Reserved. 8 | # 9 | # THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T and Unix System 10 | # Laboratories, Inc. The copyright notice above does not evidence 11 | # any actual or intended publication of such source code. 12 | # 13 | ############################################################################### 14 | 15 | #Args args(argc, argv, "co:OI:D:p", "D", 1, 1, keywords); 16 | 17 | echo "example.E -align symbol -I incl1 foo.c -I incl2 -D FOO" 18 | ./example.E -align symbol -I incl1 foo.c -I incl2 -D FOO 19 | 20 | echo "example.E -o blech -O -o -O -DFOO=BAR,BAZ foo.c -dryrun" 21 | ./example.E -o blech -O -o -O -DFOO=BAR,BAZ foo.c -dryrun 22 | -------------------------------------------------------------------------------- /libSC/Args/demos/makefile: -------------------------------------------------------------------------------- 1 | #ident "@(#)Args:demos/makefile 3.1" 2 | ############################################################################### 3 | # 4 | # C++ Standard Components, Release 3.0. 5 | # 6 | # Copyright (c) 1991, 1992 AT&T and Unix System Laboratories, Inc. 7 | # Copyright (c) 1988, 1989, 1990 AT&T. All Rights Reserved. 8 | # 9 | # THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T and Unix System 10 | # Laboratories, Inc. The copyright notice above does not evidence 11 | # any actual or intended publication of such source code. 12 | # 13 | ############################################################################### 14 | 15 | include $(SLELIB)/demorules 16 | 17 | all: 18 | $(SHELL) $(SLEBIN)/regress 19 | 20 | example.r: example.E 21 | chmod +x ./example.sh 22 | $(SHELL) ./example.sh >example.r 2>&1 23 | 24 | clean: 25 | rm -rf *.ii *.o *.r *.E core ptrepository .variant 26 | -------------------------------------------------------------------------------- /libSC/Array_alg/makefile: -------------------------------------------------------------------------------- 1 | #ident "@(#)Array_alg:makefile 3.1" 2 | ############################################################################### 3 | # 4 | # C++ Standard Components, Release 3.0. 5 | # 6 | # Copyright (c) 1991, 1992 AT&T and Unix System Laboratories, Inc. 7 | # Copyright (c) 1988, 1989, 1990 AT&T. All Rights Reserved. 8 | # 9 | # THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T and Unix System 10 | # Laboratories, Inc. The copyright notice above does not evidence 11 | # any actual or intended publication of such source code. 12 | # 13 | ############################################################################### 14 | 15 | CC=CC 16 | ROOT=../.. 17 | O=-O 18 | CCFLAGS= +w $(O) -I$(ROOT)/incl -DBUILDING_LIBRARY -DNDEBUG 19 | 20 | OBJ = 21 | 22 | all: 23 | 24 | clean: 25 | 26 | clobber: 27 | 28 | force: 29 | -------------------------------------------------------------------------------- /libSC/Bits/makefile: -------------------------------------------------------------------------------- 1 | #ident "@(#)Bits:makefile 3.1" 2 | ############################################################################### 3 | # 4 | # C++ Standard Components, Release 3.0. 5 | # 6 | # Copyright (c) 1991, 1992 AT&T and Unix System Laboratories, Inc. 7 | # Copyright (c) 1988, 1989, 1990 AT&T. All Rights Reserved. 8 | # 9 | # THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T and Unix System 10 | # Laboratories, Inc. The copyright notice above does not evidence 11 | # any actual or intended publication of such source code. 12 | # 13 | ############################################################################### 14 | 15 | CC=CC 16 | ROOT=../.. 17 | O=-O 18 | CCFLAGS = +w $(O) -I$(ROOT)/incl -DBUILDING_LIBRARY -DNDEBUG 19 | BSD= 20 | 21 | OBS=Bits.o 22 | 23 | libBits.a: $(OBS) 24 | @if [ -d Templates.DB ]; then \ 25 | arit Bits $(OBS); \ 26 | else \ 27 | ar cr libBits.a $(OBS); \ 28 | fi 29 | if test "$(SYS)" = BSD; then ranlib libBits.a; fi 30 | 31 | Bits.o: Bits.c 32 | $(CC) -c $(CCFLAGS) Bits.c 33 | 34 | clean: 35 | rm -f *.o 36 | rm -f *.out *.a try 37 | 38 | clobber: clean 39 | 40 | 41 | -------------------------------------------------------------------------------- /libSC/Block/Vblock_dtor.c: -------------------------------------------------------------------------------- 1 | /*ident "@(#)Vblock_dtor.c 1.1.2.1" */ 2 | /****************************************************************************** 3 | * 4 | * C++ Standard Components, Release 3.0. 5 | * 6 | * Copyright (c) 1991, 1992 AT&T and Unix System Laboratories, Inc. 7 | * Copyright (c) 1988, 1989, 1990 AT&T. All Rights Reserved. 8 | * 9 | * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T and Unix System 10 | * Laboratories, Inc. The copyright notice above does not evidence 11 | * any actual or intended publication of such source code. 12 | * 13 | ******************************************************************************/ 14 | 15 | #include "Vblock.h" 16 | 17 | Vb_ATTLC::Vb_ATTLC() 18 | { 19 | } 20 | 21 | Vb_ATTLC::~Vb_ATTLC() 22 | { 23 | } 24 | -------------------------------------------------------------------------------- /libSC/Block/demos/Blockset.V: -------------------------------------------------------------------------------- 1 | {1,3,5,7,9,11,13,15,17,19} 2 | -------------------------------------------------------------------------------- /libSC/Block/demos/makefile: -------------------------------------------------------------------------------- 1 | #ident "@(#)Block:demos/makefile 3.1" 2 | ############################################################################### 3 | # 4 | # C++ Standard Components, Release 3.0. 5 | # 6 | # Copyright (c) 1991, 1992 AT&T and Unix System Laboratories, Inc. 7 | # Copyright (c) 1988, 1989, 1990 AT&T. All Rights Reserved. 8 | # 9 | # THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T and Unix System 10 | # Laboratories, Inc. The copyright notice above does not evidence 11 | # any actual or intended publication of such source code. 12 | # 13 | ############################################################################### 14 | 15 | include $(SLELIB)/demorules 16 | 17 | all: 18 | $(SHELL) $(SLEBIN)/regress 19 | 20 | clean: 21 | rm -rf *.ii *.o *.r *.E core ptrepository .variant 22 | -------------------------------------------------------------------------------- /libSC/Block/makefile: -------------------------------------------------------------------------------- 1 | #ident "@(#)Block:makefile 3.1" 2 | ############################################################################### 3 | # 4 | # C++ Standard Components, Release 3.0. 5 | # 6 | # Copyright (c) 1991, 1992 AT&T and Unix System Laboratories, Inc. 7 | # Copyright (c) 1988, 1989, 1990 AT&T. All Rights Reserved. 8 | # 9 | # THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T and Unix System 10 | # Laboratories, Inc. The copyright notice above does not evidence 11 | # any actual or intended publication of such source code. 12 | # 13 | ############################################################################### 14 | 15 | CC=CC 16 | SYS= 17 | ROOT=../.. 18 | CCFLAGS = +w -O -I$(ROOT)/incl -DBUILDING_LIBRARY 19 | BSD= 20 | 21 | SRC = Vblock_dtor.c 22 | 23 | OBS = Vblock_dtor.o 24 | 25 | libBlock.a: $(OBS) 26 | ar cr libBlock.a $(OBS) 27 | if test $(SYS) = BSD; then ranlib libBlock.a; fi 28 | 29 | Vblock_dtor.o : Vblock_dtor.c 30 | $(CC) $(CCFLAGS) -c Vblock_dtor.c 31 | 32 | clean: 33 | rm -f *.o *.a 34 | 35 | clobber: clean 36 | -------------------------------------------------------------------------------- /libSC/CC/makefile: -------------------------------------------------------------------------------- 1 | #ident "@(#)CC:makefile 3.1" 2 | ############################################################################### 3 | # 4 | # C++ Standard Components, Release 3.0. 5 | # 6 | # Copyright (c) 1991, 1992 AT&T and Unix System Laboratories, Inc. 7 | # Copyright (c) 1988, 1989, 1990 AT&T. All Rights Reserved. 8 | # 9 | # THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T and Unix System 10 | # Laboratories, Inc. The copyright notice above does not evidence 11 | # any actual or intended publication of such source code. 12 | # 13 | ############################################################################### 14 | 15 | ############################################################ 16 | # 17 | # CC driver and tests 18 | # 19 | ############################################################ 20 | 21 | ############################################################ 22 | # you shouldn't have to change anything below this line 23 | ############################################################ 24 | 25 | all: 26 | 27 | clean: force 28 | 29 | force: 30 | -------------------------------------------------------------------------------- /libSC/Fsm/demos/3-3.V: -------------------------------------------------------------------------------- 1 | $$ABlEwAsI$$ErEIsAwElBA$$ 2 | -------------------------------------------------------------------------------- /libSC/Fsm/demos/candy.V: -------------------------------------------------------------------------------- 1 | click 2 | click 3 | click 4 | click 5 | click 6 | click 7 | click 8 | click 9 | CANDY 10 | CANDY 11 | click 12 | click 13 | clickclick 14 | clickclick 15 | GUM 16 | GUM 17 | clickclick 18 | clickclick 19 | click 20 | click 21 | RETURN15CENTS 22 | RETURN15CENTS 23 | 0 0 1 24 | 0 0 1 25 | 1 0 2 26 | 1 0 2 27 | 2 0 3 28 | 2 0 3 29 | 3 0 4 30 | 3 0 4 31 | 4 3 0 32 | 4 3 0 33 | 0 0 1 34 | 0 0 1 35 | 1 1 3 36 | 1 1 3 37 | 3 2 0 38 | 3 2 0 39 | 0 1 2 40 | 0 1 2 41 | 2 0 3 42 | 2 0 3 43 | 3 3 0 44 | 3 3 0 45 | -------------------------------------------------------------------------------- /libSC/Fsm/demos/makefile: -------------------------------------------------------------------------------- 1 | #ident "@(#)Fsm:demos/makefile 3.1" 2 | ############################################################################### 3 | # 4 | # C++ Standard Components, Release 3.0. 5 | # 6 | # Copyright (c) 1991, 1992 AT&T and Unix System Laboratories, Inc. 7 | # Copyright (c) 1988, 1989, 1990 AT&T. All Rights Reserved. 8 | # 9 | # THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T and Unix System 10 | # Laboratories, Inc. The copyright notice above does not evidence 11 | # any actual or intended publication of such source code. 12 | # 13 | ############################################################################### 14 | 15 | include $(SLELIB)/demorules 16 | 17 | all: 18 | $(SHELL) $(SLEBIN)/regress 19 | 20 | clean: 21 | rm -rf *.ii *.o *.r *.E core ptrepository .variant 22 | -------------------------------------------------------------------------------- /libSC/G2++/compsrc/demos/test1.g: -------------------------------------------------------------------------------- 1 | test1 2 | one SHORT 3 | two 4 | * 5 | sub1 SHORT 6 | sub2 SHORT 7 | 8 | -------------------------------------------------------------------------------- /libSC/G2++/compsrc/demos/test2.V: -------------------------------------------------------------------------------- 1 | test1 2 | one 1 3 | two 1 4 | 0 5 | sub1 2 6 | sub2 3 7 | 8 | -------------------------------------------------------------------------------- /libSC/G2++/compsrc/demos/test2.c: -------------------------------------------------------------------------------- 1 | /*ident "@(#)G2++:compsrc/demos/test2.c 3.1" */ 2 | /****************************************************************************** 3 | * 4 | * C++ Standard Components, Release 3.0. 5 | * 6 | * Copyright (c) 1991, 1992 AT&T and Unix System Laboratories, Inc. 7 | * Copyright (c) 1988, 1989, 1990 AT&T. All Rights Reserved. 8 | * 9 | * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T and Unix System 10 | * Laboratories, Inc. The copyright notice above does not evidence 11 | * any actual or intended publication of such source code. 12 | * 13 | ******************************************************************************/ 14 | 15 | #include 16 | #include "g2desc.h" 17 | #include "test1.h" 18 | 19 | main() { 20 | TEST1 t; 21 | t.one = 1; 22 | 23 | t.two[0].sub1 = 2; 24 | t.two[0].sub2 = 3; 25 | 26 | cout << t; 27 | 28 | return 0; 29 | } 30 | -------------------------------------------------------------------------------- /libSC/G2++/g2++lib/Block_G2NODE.c: -------------------------------------------------------------------------------- 1 | /*ident "@(#)G2++:g2++lib/Block_G2NODE.c 3.1" */ 2 | /****************************************************************************** 3 | * 4 | * C++ Standard Components, Release 3.0. 5 | * 6 | * Copyright (c) 1991, 1992 AT&T and Unix System Laboratories, Inc. 7 | * Copyright (c) 1988, 1989, 1990 AT&T. All Rights Reserved. 8 | * 9 | * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T and Unix System 10 | * Laboratories, Inc. The copyright notice above does not evidence 11 | * any actual or intended publication of such source code. 12 | * 13 | ******************************************************************************/ 14 | 15 | #ifdef __GNUG__ 16 | #pragma implementation "Block.h" 17 | #include 18 | #include 19 | template class Block; 20 | #endif 21 | -------------------------------------------------------------------------------- /libSC/G2++/g2++lib/demos/demo1.V: -------------------------------------------------------------------------------- 1 | usr 2 | login bob 3 | id 4 | usr 123 5 | grp 457 6 | name Robert E. Lee 7 | logdir /usr/bob 8 | shell /bin/ksh 9 | 10 | usr 11 | login slv 12 | id 13 | usr 194 14 | grp 101 15 | name Susan L. Vogel 16 | logdir /usrs8/slv 17 | shell /usr/tools/bin/ksh 18 | 19 | usr 20 | login ark 21 | id 22 | usr 49180 23 | grp 156 24 | name Koenig 25 | logdir /usrs11/ark 26 | 27 | usr 28 | login hotshot 29 | id 30 | usr 181 31 | grp 159 32 | name john snare 33 | logdir /usrs2/awb/hotshot 34 | shell /usr/tools/bin/ksh 35 | 36 | -------------------------------------------------------------------------------- /libSC/G2++/g2++lib/demos/demo1.c: -------------------------------------------------------------------------------- 1 | /*ident "@(#)G2++:g2++lib/demos/demo1.c 3.1" */ 2 | /****************************************************************************** 3 | * 4 | * C++ Standard Components, Release 3.0. 5 | * 6 | * Copyright (c) 1991, 1992 AT&T and Unix System Laboratories, Inc. 7 | * Copyright (c) 1988, 1989, 1990 AT&T. All Rights Reserved. 8 | * 9 | * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T and Unix System 10 | * Laboratories, Inc. The copyright notice above does not evidence 11 | * any actual or intended publication of such source code. 12 | * 13 | ******************************************************************************/ 14 | 15 | #include "usr.h" 16 | #include 17 | 18 | main(){ 19 | USR u; 20 | 21 | while( cin >> u ){ 22 | u.id.grp += 1; 23 | cout << u; 24 | } 25 | return 0; 26 | } 27 | -------------------------------------------------------------------------------- /libSC/G2++/g2++lib/demos/demo2.V: -------------------------------------------------------------------------------- 1 | usr 2 | login bob 3 | id 4 | usr 123 5 | grp 456 6 | name Robert E. Lee 7 | logdir /usr/bob 8 | shell /bin/ksh 9 | 10 | usr 11 | login slv 12 | id 13 | usr 194 14 | grp 100 15 | name Susan L. Vogel 16 | logdir /usrs8/slv 17 | shell /usr/tools/bin/ksh 18 | 19 | usr 20 | login ark 21 | id 22 | usr 49180 23 | grp 155 24 | name Koenig 25 | logdir /usrs11/ark 26 | 27 | usr 28 | login hotshot 29 | id 30 | usr 181 31 | grp 158 32 | name john snare 33 | logdir /usrs2/awb/hotshot 34 | shell /usr/tools/bin/ksh 35 | 36 | -------------------------------------------------------------------------------- /libSC/G2++/g2++lib/demos/demo2.c: -------------------------------------------------------------------------------- 1 | /*ident "@(#)G2++:g2++lib/demos/demo2.c 3.1" */ 2 | /****************************************************************************** 3 | * 4 | * C++ Standard Components, Release 3.0. 5 | * 6 | * Copyright (c) 1991, 1992 AT&T and Unix System Laboratories, Inc. 7 | * Copyright (c) 1988, 1989, 1990 AT&T. All Rights Reserved. 8 | * 9 | * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T and Unix System 10 | * Laboratories, Inc. The copyright notice above does not evidence 11 | * any actual or intended publication of such source code. 12 | * 13 | ******************************************************************************/ 14 | 15 | #include "usr.h" 16 | #include 17 | 18 | main(){ 19 | USR u; 20 | 21 | while( cin >> u ){ 22 | cout << u; 23 | } 24 | return 0; 25 | } 26 | -------------------------------------------------------------------------------- /libSC/G2++/g2++lib/demos/demo3.V: -------------------------------------------------------------------------------- 1 | usr 2 | login bob 3 | id 4 | usr 123 5 | grp 457 6 | name Robert E. Lee 7 | logdir /usr/bob 8 | shell /bin/ksh 9 | 10 | usr 11 | login slv 12 | id 13 | usr 194 14 | grp 101 15 | name Susan L. Vogel 16 | logdir /usrs8/slv 17 | shell /usr/tools/bin/ksh 18 | 19 | usr 20 | login ark 21 | id 22 | usr 49180 23 | grp 156 24 | name Koenig 25 | logdir /usrs11/ark 26 | 27 | usr 28 | login hotshot 29 | id 30 | usr 181 31 | grp 159 32 | name john snare 33 | logdir /usrs2/awb/hotshot 34 | shell /usr/tools/bin/ksh 35 | 36 | -------------------------------------------------------------------------------- /libSC/G2++/g2++lib/demos/demo3.c: -------------------------------------------------------------------------------- 1 | /*ident "@(#)G2++:g2++lib/demos/demo3.c 3.1" */ 2 | /****************************************************************************** 3 | * 4 | * C++ Standard Components, Release 3.0. 5 | * 6 | * Copyright (c) 1991, 1992 AT&T and Unix System Laboratories, Inc. 7 | * Copyright (c) 1988, 1989, 1990 AT&T. All Rights Reserved. 8 | * 9 | * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T and Unix System 10 | * Laboratories, Inc. The copyright notice above does not evidence 11 | * any actual or intended publication of such source code. 12 | * 13 | ******************************************************************************/ 14 | 15 | #include "usr.h" 16 | #include 17 | 18 | main(){ 19 | USR u; 20 | 21 | while( cin >> u ){ 22 | u.id.grp += 1; 23 | cout << u; 24 | } 25 | return 0; 26 | } 27 | -------------------------------------------------------------------------------- /libSC/G2++/g2++lib/demos/demo4.V: -------------------------------------------------------------------------------- 1 | usr 2 | login bob 3 | id 4 | usr 123 5 | grp 457 6 | name Robert E. Lee 7 | logdir /usr/bob 8 | shell /bin/ksh 9 | 10 | foo 11 | bar 10 12 | 13 | usr 14 | login slv 15 | id 16 | usr 194 17 | grp 101 18 | name Susan L. Vogel 19 | logdir /usrs8/slv 20 | shell /usr/tools/bin/ksh 21 | 22 | foo 23 | bar 20 24 | 25 | usr 26 | login ark 27 | id 28 | usr 49180 29 | grp 156 30 | name Koenig 31 | logdir /usrs11/ark 32 | 33 | usr 34 | login hotshot 35 | id 36 | usr 181 37 | grp 159 38 | name john snare 39 | logdir /usrs2/awb/hotshot 40 | shell /usr/tools/bin/ksh 41 | 42 | -------------------------------------------------------------------------------- /libSC/G2++/g2++lib/demos/demo4.c: -------------------------------------------------------------------------------- 1 | /*ident "@(#)G2++:g2++lib/demos/demo4.c 3.1" */ 2 | /****************************************************************************** 3 | * 4 | * C++ Standard Components, Release 3.0. 5 | * 6 | * Copyright (c) 1991, 1992 AT&T and Unix System Laboratories, Inc. 7 | * Copyright (c) 1988, 1989, 1990 AT&T. All Rights Reserved. 8 | * 9 | * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T and Unix System 10 | * Laboratories, Inc. The copyright notice above does not evidence 11 | * any actual or intended publication of such source code. 12 | * 13 | ******************************************************************************/ 14 | 15 | #include "usr.h" 16 | #include 17 | 18 | main(){ 19 | String name; 20 | 21 | while( (name=g2seek(cin)) != "" ){ 22 | 23 | if( name == "usr" ){ 24 | USR u; 25 | cin >> u; 26 | u.id.grp += 1; 27 | cout << u; 28 | }else{ 29 | G2BUF buf; 30 | cin >> buf; 31 | cout << buf; 32 | } 33 | } 34 | return 0; 35 | } 36 | -------------------------------------------------------------------------------- /libSC/G2++/g2++lib/demos/demo5.V: -------------------------------------------------------------------------------- 1 | 0: usr 2 | 1: login bob 3 | 1: id 4 | 2: usr 123 5 | 2: grp 456 6 | 1: name Robert E. Lee 7 | 1: logdir /usr/bob 8 | 1: shell /bin/ksh 9 | 0: foo 10 | 1: bar 10 11 | 0: usr 12 | 1: login slv 13 | 1: id 14 | 2: usr 194 15 | 2: grp 100 16 | 1: name Susan L. Vogel 17 | 1: logdir /usrs8/slv 18 | 1: shell /usr/tools/bin/ksh 19 | 0: foo 20 | 1: bar 20 21 | 0: usr 22 | 1: login ark 23 | 1: id 24 | 2: usr 49180 25 | 2: grp 155 26 | 1: name Koenig 27 | 1: logdir /usrs11/ark 28 | 0: usr 29 | 1: login hotshot 30 | 1: id 31 | 2: usr 181 32 | 2: grp 158 33 | 1: name john snare 34 | 1: logdir /usrs2/awb/hotshot 35 | 1: shell /usr/tools/bin/ksh 36 | -------------------------------------------------------------------------------- /libSC/G2++/g2++lib/demos/usr.data: -------------------------------------------------------------------------------- 1 | usr 2 | login bob 3 | id 4 | usr 123 5 | grp 456 6 | name Robert E. Lee 7 | logdir /usr/bob 8 | shell /bin/ksh 9 | 10 | foo 11 | bar 10 12 | 13 | usr 14 | login slv 15 | id 16 | usr 194 17 | grp 100 18 | name Susan L. Vogel 19 | logdir /usrs8/slv 20 | shell /usr/tools/bin/ksh 21 | 22 | foo 23 | bar 20 24 | 25 | usr 26 | login ark 27 | id 28 | usr 49180 29 | grp 155 30 | name Koenig 31 | logdir /usrs11/ark 32 | 33 | usr 34 | login hotshot 35 | id 36 | usr 181 37 | grp 158 38 | name john snare 39 | logdir /usrs2/awb/hotshot 40 | shell /usr/tools/bin/ksh 41 | 42 | -------------------------------------------------------------------------------- /libSC/G2++/g2++lib/demos/usr.g: -------------------------------------------------------------------------------- 1 | # user record 2 | # (another way of looking at /etc/passwd entries) 3 | usr 4 | login 10 # login id of user 5 | id 6 | usr LONG # user id 7 | grp LONG # group id 8 | name 100 # human name of user & other stuff 9 | logdir 50 # user's login directory 10 | shell 50 # user's shell 11 | -------------------------------------------------------------------------------- /libSC/G2++/g2++lib/g2uio.c: -------------------------------------------------------------------------------- 1 | /*ident "@(#)G2++:g2++lib/g2uio.c 3.1" */ 2 | /****************************************************************************** 3 | * 4 | * C++ Standard Components, Release 3.0. 5 | * 6 | * Copyright (c) 1991, 1992 AT&T and Unix System Laboratories, Inc. 7 | * Copyright (c) 1988, 1989, 1990 AT&T. All Rights Reserved. 8 | * 9 | * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T and Unix System 10 | * Laboratories, Inc. The copyright notice above does not evidence 11 | * any actual or intended publication of such source code. 12 | * 13 | ******************************************************************************/ 14 | 15 | #include 16 | #include 17 | #include 18 | 19 | istream& operator>>(istream& is,G2BUF& tree){ 20 | getbuf_ATTLC(&tree,is); 21 | return is; 22 | } 23 | ostream& operator<<(ostream& os,G2BUF& tree){ 24 | putbuf_ATTLC(&tree,os); 25 | return os; 26 | } 27 | -------------------------------------------------------------------------------- /libSC/G2++/g2++lib/version.c: -------------------------------------------------------------------------------- 1 | /*ident "@(#)G2++:g2++lib/version.c 3.1" */ 2 | /****************************************************************************** 3 | * 4 | * C++ Standard Components, Release 3.0. 5 | * 6 | * Copyright (c) 1991, 1992 AT&T and Unix System Laboratories, Inc. 7 | * Copyright (c) 1988, 1989, 1990 AT&T. All Rights Reserved. 8 | * 9 | * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T and Unix System 10 | * Laboratories, Inc. The copyright notice above does not evidence 11 | * any actual or intended publication of such source code. 12 | * 13 | ******************************************************************************/ 14 | 15 | -------------------------------------------------------------------------------- /libSC/Graph/Set_Graph.c: -------------------------------------------------------------------------------- 1 | /*ident "@(#)Graph:Set_Graph.c 3.1" */ 2 | /****************************************************************************** 3 | * 4 | * C++ Standard Components, Release 3.0. 5 | * 6 | * Copyright (c) 1991, 1992 AT&T and Unix System Laboratories, Inc. 7 | * Copyright (c) 1988, 1989, 1990 AT&T. All Rights Reserved. 8 | * 9 | * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T and Unix System 10 | * Laboratories, Inc. The copyright notice above does not evidence 11 | * any actual or intended publication of such source code. 12 | * 13 | ******************************************************************************/ 14 | 15 | #ifdef __GNUG__ 16 | #pragma implementation "set_of_p.h" 17 | #include 18 | #include 19 | #include 20 | static ostream& operator<<(ostream& os, const Graph &g) { return os; } 21 | static ostream& operator<<(ostream& os, const Vertex &v) { return os; } 22 | static ostream& operator<<(ostream& os, const Edge &e) { return os; } 23 | template class Set_of_p; 24 | #endif 25 | -------------------------------------------------------------------------------- /libSC/Graph/demos/Cities.V: -------------------------------------------------------------------------------- 1 | SFRAN: 1 2 | LA: 1 3 | CHGO: 1 4 | DLLS: 0 5 | BOST: 1 6 | NYC: 1 7 | e with id 0: 1 8 | e with id 1: 1 9 | e with id 2: 1 10 | e with id 3: 1 11 | e with id 4: 1 12 | e with id 5: 1 13 | e with id 6: 1 14 | e with id 7: 1 15 | e with id 8: 1 16 | e with id 9: 0 17 | e with id 10: 1 18 | -------------------------------------------------------------------------------- /libSC/Graph/demos/makefile: -------------------------------------------------------------------------------- 1 | #ident "@(#)Graph:demos/makefile 3.1" 2 | ############################################################################### 3 | # 4 | # C++ Standard Components, Release 3.0. 5 | # 6 | # Copyright (c) 1991, 1992 AT&T and Unix System Laboratories, Inc. 7 | # Copyright (c) 1988, 1989, 1990 AT&T. All Rights Reserved. 8 | # 9 | # THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T and Unix System 10 | # Laboratories, Inc. The copyright notice above does not evidence 11 | # any actual or intended publication of such source code. 12 | # 13 | ############################################################################### 14 | 15 | include $(SLELIB)/demorules 16 | 17 | all: 18 | $(SHELL) $(SLEBIN)/regress 19 | 20 | clean: 21 | rm -rf *.ii *.o *.r *.E core ptrepository .variant 22 | -------------------------------------------------------------------------------- /libSC/Graph_alg/Graph_alg.c: -------------------------------------------------------------------------------- 1 | /*ident "@(#)Graph_alg:Graph_alg.c 3.1" */ 2 | /****************************************************************************** 3 | * 4 | * C++ Standard Components, Release 3.0. 5 | * 6 | * Copyright (c) 1991, 1992 AT&T and Unix System Laboratories, Inc. 7 | * Copyright (c) 1988, 1989, 1990 AT&T. All Rights Reserved. 8 | * 9 | * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T and Unix System 10 | * Laboratories, Inc. The copyright notice above does not evidence 11 | * any actual or intended publication of such source code. 12 | * 13 | ******************************************************************************/ 14 | 15 | #include "Graph_alg.h" 16 | 17 | Graph_algimplement(Graph,Vertex,Edge) 18 | -------------------------------------------------------------------------------- /libSC/Graph_alg/demos/GA_aptsdemo.V: -------------------------------------------------------------------------------- 1 | artic pts: The Vertex sets are equal 2 | -------------------------------------------------------------------------------- /libSC/Graph_alg/demos/GA_bfsdemo.V: -------------------------------------------------------------------------------- 1 | bfs: The two Vertex sets are equal 2 | -------------------------------------------------------------------------------- /libSC/Graph_alg/demos/GA_cycdemo.V: -------------------------------------------------------------------------------- 1 | a cycle was found: this is not a tree 2 | cyc: The two Vertex sets are equal 3 | -------------------------------------------------------------------------------- /libSC/Graph_alg/demos/makefile: -------------------------------------------------------------------------------- 1 | #ident "@(#)Graph_alg:demos/makefile 3.1" 2 | ############################################################################### 3 | # 4 | # C++ Standard Components, Release 3.0. 5 | # 6 | # Copyright (c) 1991, 1992 AT&T and Unix System Laboratories, Inc. 7 | # Copyright (c) 1988, 1989, 1990 AT&T. All Rights Reserved. 8 | # 9 | # THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T and Unix System 10 | # Laboratories, Inc. The copyright notice above does not evidence 11 | # any actual or intended publication of such source code. 12 | # 13 | ############################################################################### 14 | 15 | include $(SLELIB)/demorules 16 | 17 | all: 18 | $(SHELL) $(SLEBIN)/regress 19 | 20 | clean: 21 | rm -rf *.ii *.o *.r *.E core ptrepository .variant 22 | -------------------------------------------------------------------------------- /libSC/List/demos/Pair.V: -------------------------------------------------------------------------------- 1 | ( Name: bar count: 1, Name: baz count: 1, Name: foo count: 1 ) 2 | -------------------------------------------------------------------------------- /libSC/List/demos/Student.V: -------------------------------------------------------------------------------- 1 | ( George: A, Arthur: D, Chester: C, Willy: B ) 2 | ( Arthur: D, Chester: C, George: A, Willy: B ) 3 | ( George: A, Willy: B, Chester: C, Arthur: D ) 4 | -------------------------------------------------------------------------------- /libSC/List/demos/makefile: -------------------------------------------------------------------------------- 1 | #ident "@(#)List:demos/makefile 3.1" 2 | ############################################################################### 3 | # 4 | # C++ Standard Components, Release 3.0. 5 | # 6 | # Copyright (c) 1991, 1992 AT&T and Unix System Laboratories, Inc. 7 | # Copyright (c) 1988, 1989, 1990 AT&T. All Rights Reserved. 8 | # 9 | # THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T and Unix System 10 | # Laboratories, Inc. The copyright notice above does not evidence 11 | # any actual or intended publication of such source code. 12 | # 13 | ############################################################################### 14 | 15 | include $(SLELIB)/demorules 16 | 17 | all: 18 | $(SHELL) $(SLEBIN)/regress 19 | 20 | Pair.r: Pair.E 21 | echo "foo bar baz" | ./Pair.E >Pair.r 22 | 23 | clean: 24 | rm -rf *.ii *.o *.r *.E core ptrepository .variant 25 | -------------------------------------------------------------------------------- /libSC/List_old/demos/Pair.V: -------------------------------------------------------------------------------- 1 | ( Name: bar count: 1, Name: baz count: 1, Name: foo count: 1 ) 2 | -------------------------------------------------------------------------------- /libSC/List_old/demos/Student.V: -------------------------------------------------------------------------------- 1 | ( George: A, Arthur: D, Chester: C, Willy: B ) 2 | ( Arthur: D, Chester: C, George: A, Willy: B ) 3 | ( George: A, Willy: B, Chester: C, Arthur: D ) 4 | -------------------------------------------------------------------------------- /libSC/List_old/demos/makefile: -------------------------------------------------------------------------------- 1 | #ident "@(#)List_old:demos/makefile 3.1" 2 | ############################################################################### 3 | # 4 | # C++ Standard Components, Release 3.0. 5 | # 6 | # Copyright (c) 1991, 1992 AT&T and Unix System Laboratories, Inc. 7 | # Copyright (c) 1988, 1989, 1990 AT&T. All Rights Reserved. 8 | # 9 | # THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T and Unix System 10 | # Laboratories, Inc. The copyright notice above does not evidence 11 | # any actual or intended publication of such source code. 12 | # 13 | ############################################################################### 14 | 15 | include $(SLELIB)/demorules 16 | 17 | all: 18 | $(SHELL) $(SLEBIN)/regress 19 | 20 | Pair.r: Pair.E 21 | echo "foo bar baz" | ./Pair.E >Pair.r 22 | 23 | clean: 24 | rm -rf *.ii *.o *.r *.E core ptrepository .variant 25 | -------------------------------------------------------------------------------- /libSC/Map/demos/clothes: -------------------------------------------------------------------------------- 1 | pants belt 2 | left_sock left_shoe 3 | right_sock right_shoe 4 | shirt shirt 5 | pants left_shoe 6 | pants right_shoe 7 | -------------------------------------------------------------------------------- /libSC/Map/demos/example.V: -------------------------------------------------------------------------------- 1 | {[ #include 3 ][ (cin 1 ][ 0; 1 ][ << 2 ][ 1 ][ 1 ][ 1 ][ >> 1 ][ Map 1 ][ String 1 ][ count 1 ][ count; 1 ][ count[word]++; 1 ][ cout 1 ][ endl; 1 ][ main() 1 ][ return 1 ][ while 1 ][ word) 1 ][ word; 1 ][ { 1 ][ } 1 ]} 2 | -------------------------------------------------------------------------------- /libSC/Map/demos/example.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | main() { 6 | Map count; 7 | String word; 8 | 9 | while (cin >> word) 10 | count[word]++; 11 | 12 | cout << count << endl; 13 | return 0; 14 | } 15 | -------------------------------------------------------------------------------- /libSC/Map/demos/makefile: -------------------------------------------------------------------------------- 1 | #ident "@(#)Map:demos/makefile 3.1" 2 | ############################################################################### 3 | # 4 | # C++ Standard Components, Release 3.0. 5 | # 6 | # Copyright (c) 1991, 1992 AT&T and Unix System Laboratories, Inc. 7 | # Copyright (c) 1988, 1989, 1990 AT&T. All Rights Reserved. 8 | # 9 | # THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T and Unix System 10 | # Laboratories, Inc. The copyright notice above does not evidence 11 | # any actual or intended publication of such source code. 12 | # 13 | ############################################################################### 14 | 15 | include $(SLELIB)/demorules 16 | 17 | all: 18 | $(SHELL) $(SLEBIN)/regress 19 | 20 | example.r: example.E 21 | cat example.c | ./example.E >example.r 22 | 23 | topsort.r: topsort.E 24 | cat clothes | ./topsort.E >topsort.r 25 | 26 | clean: 27 | rm -rf *.ii *.o *.r *.E core ptrepository .variant 28 | -------------------------------------------------------------------------------- /libSC/Map/demos/topsort.V: -------------------------------------------------------------------------------- 1 | left_sock 2 | pants 3 | right_sock 4 | shirt 5 | belt 6 | left_shoe 7 | right_shoe 8 | -------------------------------------------------------------------------------- /libSC/Map/makefile: -------------------------------------------------------------------------------- 1 | #ident "@(#)Map:makefile 3.1" 2 | ############################################################################### 3 | # 4 | # C++ Standard Components, Release 3.0. 5 | # 6 | # Copyright (c) 1991, 1992 AT&T and Unix System Laboratories, Inc. 7 | # Copyright (c) 1988, 1989, 1990 AT&T. All Rights Reserved. 8 | # 9 | # THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T and Unix System 10 | # Laboratories, Inc. The copyright notice above does not evidence 11 | # any actual or intended publication of such source code. 12 | # 13 | ############################################################################### 14 | 15 | CC=CC 16 | CCFLAGS=-O -DBUILDING_LIBRARY +w 17 | BSD= 18 | 19 | comp=Map 20 | SRC=Map.c 21 | OBS=Map.o 22 | 23 | lib$(comp).a: $(OBS) 24 | ar cr lib$(comp).a $(OBS) 25 | if test "$(SYS)" = BSD; then ranlib lib$(comp).a; fi 26 | 27 | Map.o: Map.c 28 | $(CC) $(CCFLAGS) -c Map.c 29 | 30 | clean: 31 | rm -f *.o *.a core 32 | 33 | clobber: clean 34 | 35 | tests: always 36 | cd tests; $(MAKE) 37 | 38 | always: 39 | -------------------------------------------------------------------------------- /libSC/Objection/makefile: -------------------------------------------------------------------------------- 1 | #ident "@(#)Objection:makefile 3.1" 2 | ############################################################################### 3 | # 4 | # C++ Standard Components, Release 3.0. 5 | # 6 | # Copyright (c) 1991, 1992 AT&T and Unix System Laboratories, Inc. 7 | # Copyright (c) 1988, 1989, 1990 AT&T. All Rights Reserved. 8 | # 9 | # THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T and Unix System 10 | # Laboratories, Inc. The copyright notice above does not evidence 11 | # any actual or intended publication of such source code. 12 | # 13 | ############################################################################### 14 | 15 | CC=CC 16 | SYS= 17 | ROOT=../.. 18 | CCFLAGS = +w -O -I$(ROOT)/incl -DBUILDING_LIBRARY 19 | BSD= 20 | 21 | SRC = Objection.c 22 | 23 | OBS = Objection.o 24 | 25 | libObject.a: $(OBS) 26 | ar cr libObject.a $(OBS) 27 | if test $(SYS) = BSD; then ranlib libObject.a; fi 28 | 29 | Objection.o : Objection.c 30 | $(CC) $(CCFLAGS) -c Objection.c 31 | 32 | tests: 33 | 34 | clean: 35 | rm -f *.o *.a 36 | 37 | clobber: clean 38 | 39 | -------------------------------------------------------------------------------- /libSC/Path/ctlist.c: -------------------------------------------------------------------------------- 1 | /*ident "@(#)Path:ctlist.c 3.1" */ 2 | /****************************************************************************** 3 | * 4 | * C++ Standard Components, Release 3.0. 5 | * 6 | * Copyright (c) 1991, 1992 AT&T and Unix System Laboratories, Inc. 7 | * Copyright (c) 1988, 1989, 1990 AT&T. All Rights Reserved. 8 | * 9 | * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T and Unix System 10 | * Laboratories, Inc. The copyright notice above does not evidence 11 | * any actual or intended publication of such source code. 12 | * 13 | ******************************************************************************/ 14 | 15 | #include "Pathlib.h" 16 | #include 17 | 18 | Path::Path(const List & exploded) 19 | { 20 | List & tmp = (List &)exploded; 21 | Listiter it(tmp); 22 | while (!it.at_end()) 23 | { 24 | rep += (String)*(it.next()); 25 | rep += '/'; 26 | } 27 | canonicalize(); 28 | } 29 | -------------------------------------------------------------------------------- /libSC/Path/demos/explode.V: -------------------------------------------------------------------------------- 1 | foo/luxury/yacht/baz.c 2 | -------------------------------------------------------------------------------- /libSC/Path/demos/explode.c: -------------------------------------------------------------------------------- 1 | /*ident "@(#)Path:demos/explode.c 3.1" */ 2 | /****************************************************************************** 3 | * 4 | * C++ Standard Components, Release 3.0. 5 | * 6 | * Copyright (c) 1991, 1992 AT&T and Unix System Laboratories, Inc. 7 | * Copyright (c) 1988, 1989, 1990 AT&T. All Rights Reserved. 8 | * 9 | * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T and Unix System 10 | * Laboratories, Inc. The copyright notice above does not evidence 11 | * any actual or intended publication of such source code. 12 | * 13 | ******************************************************************************/ 14 | 15 | #include 16 | #include 17 | #include 18 | 19 | main() { 20 | Path p("foo/bar/baz.c"); 21 | List l; 22 | p.explode(l); // l is "( foo bar baz.c )" 23 | l[(unsigned)1] = "luxury/yacht"; // l is "( foo luxury/yacht baz.c )" 24 | Path q(l); // "foo/luxury/yacht/baz.c" 25 | cout << q << endl; 26 | return 0; 27 | } 28 | -------------------------------------------------------------------------------- /libSC/Path/demos/makefile: -------------------------------------------------------------------------------- 1 | #ident "@(#)Path:demos/makefile 3.1" 2 | ############################################################################### 3 | # 4 | # C++ Standard Components, Release 3.0. 5 | # 6 | # Copyright (c) 1991, 1992 AT&T and Unix System Laboratories, Inc. 7 | # Copyright (c) 1988, 1989, 1990 AT&T. All Rights Reserved. 8 | # 9 | # THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T and Unix System 10 | # Laboratories, Inc. The copyright notice above does not evidence 11 | # any actual or intended publication of such source code. 12 | # 13 | ############################################################################### 14 | 15 | include $(SLELIB)/demorules 16 | 17 | all: 18 | $(SHELL) $(SLEBIN)/regress 19 | 20 | wild.r: wild.E 21 | echo "" > wild.r 22 | 23 | more.r: more.E 24 | rm -rf more.V 25 | cd .; echo `type cat` > more.V 26 | ./more.E >more.r 27 | 28 | clean: 29 | rm -rf *.ii *.o *.r *.E core ptrepository .variant 30 | -------------------------------------------------------------------------------- /libSC/Path/demos/more.V: -------------------------------------------------------------------------------- 1 | cat is /bin/cat 2 | -------------------------------------------------------------------------------- /libSC/Path/demos/more.c: -------------------------------------------------------------------------------- 1 | /*ident "@(#)Path:demos/more.c 3.1" */ 2 | /****************************************************************************** 3 | * 4 | * C++ Standard Components, Release 3.0. 5 | * 6 | * Copyright (c) 1991, 1992 AT&T and Unix System Laboratories, Inc. 7 | * Copyright (c) 1988, 1989, 1990 AT&T. All Rights Reserved. 8 | * 9 | * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T and Unix System 10 | * Laboratories, Inc. The copyright notice above does not evidence 11 | * any actual or intended publication of such source code. 12 | * 13 | ******************************************************************************/ 14 | 15 | #include 16 | #include 17 | 18 | main() { 19 | Path p("cat"); 20 | Path cat; 21 | if (PATH.find(p, cat)) 22 | cout << "cat is " << cat << endl; 23 | else 24 | cout << "cat not found" << endl; 25 | return 0; 26 | } 27 | -------------------------------------------------------------------------------- /libSC/Path/demos/usrbin.V: -------------------------------------------------------------------------------- 1 | /usr/bin: removed 2 | -------------------------------------------------------------------------------- /libSC/Path/demos/wild.V: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /libSC/Path/demos/wild.c: -------------------------------------------------------------------------------- 1 | /*ident "@(#)Path:demos/wild.c 3.1" */ 2 | /****************************************************************************** 3 | * 4 | * C++ Standard Components, Release 3.0. 5 | * 6 | * Copyright (c) 1991, 1992 AT&T and Unix System Laboratories, Inc. 7 | * Copyright (c) 1988, 1989, 1990 AT&T. All Rights Reserved. 8 | * 9 | * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T and Unix System 10 | * Laboratories, Inc. The copyright notice above does not evidence 11 | * any actual or intended publication of such source code. 12 | * 13 | ******************************************************************************/ 14 | 15 | #include 16 | #include 17 | #include 18 | 19 | main() { 20 | Path p("~/*.c"); 21 | p.expand_tilde(); // "/my/home/directory/ *.c" 22 | List mydotcs; 23 | p.expand_wildcards(mydotcs); 24 | // l is "( /my/home/directory/foo.c /my/home/directory/bar.c )" 25 | // cout << p << " ==> " << mydotcs << endl; 26 | cout << p << " ==> "; 27 | cout << mydotcs << endl; 28 | return 0; 29 | } 30 | -------------------------------------------------------------------------------- /libSC/Path/die.c: -------------------------------------------------------------------------------- 1 | /*ident "@(#)Path:die.c 3.1" */ 2 | /****************************************************************************** 3 | * 4 | * C++ Standard Components, Release 3.0. 5 | * 6 | * Copyright (c) 1991, 1992 AT&T and Unix System Laboratories, Inc. 7 | * Copyright (c) 1988, 1989, 1990 AT&T. All Rights Reserved. 8 | * 9 | * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T and Unix System 10 | * Laboratories, Inc. The copyright notice above does not evidence 11 | * any actual or intended publication of such source code. 12 | * 13 | ******************************************************************************/ 14 | 15 | #include "Pathlib.h" 16 | #include 17 | #include 18 | 19 | int Path::die(const char * msg) 20 | { 21 | write(2, msg, strlen(msg)); 22 | write(2, "\n", 1); 23 | abort(); 24 | return 0; 25 | } 26 | -------------------------------------------------------------------------------- /libSC/Path/gendefines: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # for each function f in the arg list which is in the section 3 4 | # library on this machine, print out "#define F 1" 5 | 6 | for func 7 | do echo "main() { $func(); }" > $$.c 8 | cc $$.c >/dev/null 2>&1 9 | rm -f $$.c 10 | if [ $? -eq 0 ] 11 | then FUNC=`echo $func | tr a-z A-Z` 12 | echo "#define $FUNC 1" 13 | fi 14 | done 15 | 16 | -------------------------------------------------------------------------------- /libSC/Path/is_wd.c: -------------------------------------------------------------------------------- 1 | /*ident "@(#)Path:is_wd.c 3.1" */ 2 | /****************************************************************************** 3 | * 4 | * C++ Standard Components, Release 3.0. 5 | * 6 | * Copyright (c) 1991, 1992 AT&T and Unix System Laboratories, Inc. 7 | * Copyright (c) 1988, 1989, 1990 AT&T. All Rights Reserved. 8 | * 9 | * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T and Unix System 10 | * Laboratories, Inc. The copyright notice above does not evidence 11 | * any actual or intended publication of such source code. 12 | * 13 | ******************************************************************************/ 14 | 15 | #include "Pathlib.h" 16 | 17 | int Path::is_wd() const 18 | { 19 | if (rep == ".") 20 | return 1; 21 | if (is_absolute()) 22 | return (*this == xgetwd()); 23 | return 0; 24 | } 25 | -------------------------------------------------------------------------------- /libSC/Path/ksh/group.c: -------------------------------------------------------------------------------- 1 | /*ident "@(#)Path:ksh/group.c 3.1" */ 2 | #include 3 | 4 | main() 5 | { 6 | system("groups"); 7 | info(); 8 | setegid(4); 9 | info(); 10 | setrgid(22); 11 | info(); 12 | setrgid(13); 13 | info(); 14 | } 15 | 16 | info() 17 | { 18 | int groups[10]; 19 | register int n; 20 | printf ("real gid is %d, effective gid is %d, groups are:", getgid(), getegid()); 21 | n = getgroups(10,groups); 22 | while(--n >= 0) 23 | printf ("\t%d", groups[n]); 24 | printf ("\n"); 25 | } 26 | -------------------------------------------------------------------------------- /libSC/Path/ksh/sh_config.h: -------------------------------------------------------------------------------- 1 | /*ident "@(#)Path:ksh/sh_config.h 3.1" */ 2 | #ifndef _sh_config 3 | #define _sh_config 1 4 | 5 | #include 6 | #include 7 | 8 | #define VOID void 9 | #if 0 10 | typedef int pid_t; 11 | typedef long clock_t; 12 | #endif 13 | #define const /* empty */ 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /libSC/Path/ksh/t.c: -------------------------------------------------------------------------------- 1 | /*ident "@(#)Path:ksh/t.c 3.1" */ 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | static VPool *pool; 9 | 10 | static void poolcreate(size_t n, size_t exp) 11 | { 12 | pool = new VPool(n, exp); 13 | } 14 | 15 | static void found(const char *p) 16 | { 17 | cout << "found: " << p << endl; 18 | } 19 | 20 | static char * alloc() 21 | { 22 | return (char*)pool->alloc(); 23 | } 24 | 25 | static void shrink(char *p, size_t n) 26 | { 27 | int i = pool->shrink(p, n); 28 | assert(i==1); 29 | } 30 | 31 | extern "C" path_expand(const char *, 32 | void (*found)(const char *), 33 | void (*poolcreate)(size_t, size_t), 34 | char * (*alloc)(), 35 | void (*shrink)(char *, size_t)); 36 | 37 | main() 38 | { 39 | String s; 40 | while (1) 41 | { 42 | cout << "Pattern to expand? "; 43 | cin >> s; 44 | int i = path_expand(s, found, poolcreate, alloc, shrink); 45 | // cout << i << " files (mem utilization was " << pool->memory_utilization() << ")\n"; 46 | delete pool; 47 | } 48 | 49 | } 50 | -------------------------------------------------------------------------------- /libSC/Path/ksh/test.h: -------------------------------------------------------------------------------- 1 | /*ident "@(#)Path:ksh/test.h 3.1" */ 2 | /* 3 | * UNIX shell 4 | * 5 | * David Korn 6 | * AT&T Bell Laboratories 7 | * 8 | */ 9 | 10 | /* 11 | * These are the valid test operators 12 | */ 13 | 14 | #define TEST_EF 3 15 | #define TEST_NT 10 16 | #define TEST_OT 12 17 | 18 | #if 0 19 | extern const char test_unops[]; 20 | extern const struct sysnod test_optable[]; 21 | extern const char e_test[]; 22 | extern const char e_bracket[]; 23 | extern const char e_paren[]; 24 | extern const char e_testop[]; 25 | #endif 26 | -------------------------------------------------------------------------------- /libSC/Path/libx/makefile: -------------------------------------------------------------------------------- 1 | #ident "@(#)Path:libx/makefile 3.1" 2 | ############################################################################### 3 | # 4 | # C++ Standard Components, Release 3.0. 5 | # 6 | # Copyright (c) 1991, 1992 AT&T and Unix System Laboratories, Inc. 7 | # Copyright (c) 1988, 1989, 1990 AT&T. All Rights Reserved. 8 | # 9 | # THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T and Unix System 10 | # Laboratories, Inc. The copyright notice above does not evidence 11 | # any actual or intended publication of such source code. 12 | # 13 | ############################################################################### 14 | 15 | 16 | # These routines are stolen from libx. You can find 17 | # the entire libx library in the ksh or nmake source. 18 | # 19 | CC=cc 20 | LDFLAGS=-g 21 | CFLAGS=-g 22 | OFILES=strmatch.o 23 | 24 | all: libx.a 25 | 26 | t: t.c 27 | cc -o t t.c libx.a 28 | 29 | libx.a: $(OFILES) 30 | /bin/rm -f $@ 31 | ar rc $@ $(OFILES) 32 | ranlib $@ 33 | 34 | clean: 35 | rm -f $(OFILES) 36 | -------------------------------------------------------------------------------- /libSC/Path/libx/t.c: -------------------------------------------------------------------------------- 1 | /*ident "@(#)Path:libx/t.c 3.1" */ 2 | #include 3 | 4 | main() 5 | { 6 | printf ("%d\n", strmatch("abc", "a*")); 7 | } 8 | -------------------------------------------------------------------------------- /libSC/Path/no_wd.c: -------------------------------------------------------------------------------- 1 | /*ident "@(#)Path:no_wd.c 3.1" */ 2 | /****************************************************************************** 3 | * 4 | * C++ Standard Components, Release 3.0. 5 | * 6 | * Copyright (c) 1991, 1992 AT&T and Unix System Laboratories, Inc. 7 | * Copyright (c) 1988, 1989, 1990 AT&T. All Rights Reserved. 8 | * 9 | * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T and Unix System 10 | * Laboratories, Inc. The copyright notice above does not evidence 11 | * any actual or intended publication of such source code. 12 | * 13 | ******************************************************************************/ 14 | 15 | #include "Pathlib.h" 16 | 17 | Objection Path::no_wd; 18 | 19 | -------------------------------------------------------------------------------- /libSC/Path/slash.c: -------------------------------------------------------------------------------- 1 | /*ident "@(#)Path:slash.c 3.1" */ 2 | /****************************************************************************** 3 | * 4 | * C++ Standard Components, Release 3.0. 5 | * 6 | * Copyright (c) 1991, 1992 AT&T and Unix System Laboratories, Inc. 7 | * Copyright (c) 1988, 1989, 1990 AT&T. All Rights Reserved. 8 | * 9 | * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T and Unix System 10 | * Laboratories, Inc. The copyright notice above does not evidence 11 | * any actual or intended publication of such source code. 12 | * 13 | ******************************************************************************/ 14 | 15 | #include "Pathlib.h" 16 | 17 | Path operator/(const Path & s, const Path & t) 18 | { 19 | String tmp = s; 20 | tmp += '/'; 21 | tmp += (String)t; 22 | return Path(tmp); 23 | } 24 | 25 | Path & Path::operator/=(const Path & t) 26 | { 27 | rep += '/'; 28 | rep += t.rep; 29 | canonicalize(); 30 | return *this; 31 | } 32 | 33 | -------------------------------------------------------------------------------- /libSC/Path/strdup.c: -------------------------------------------------------------------------------- 1 | /*ident "@(#)Path:strdup.c 3.1" */ 2 | /****************************************************************************** 3 | * 4 | * C++ Standard Components, Release 3.0. 5 | * 6 | * Copyright (c) 1991, 1992 AT&T and Unix System Laboratories, Inc. 7 | * Copyright (c) 1988, 1989, 1990 AT&T. All Rights Reserved. 8 | * 9 | * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T and Unix System 10 | * Laboratories, Inc. The copyright notice above does not evidence 11 | * any actual or intended publication of such source code. 12 | * 13 | ******************************************************************************/ 14 | 15 | #include 16 | #include 17 | #include 18 | #include 19 | 20 | extern "C" { 21 | char *strdup_ATTLC(const char *); 22 | } 23 | 24 | char *strdup_ATTLC(const char *s) 25 | { 26 | size_t n = strlen(s)+1; 27 | char *t = (char*)malloc(n); 28 | if (t != 0) 29 | memcpy(t, s, n); 30 | return t; 31 | } 32 | -------------------------------------------------------------------------------- /libSC/Path/stream1.c: -------------------------------------------------------------------------------- 1 | /*ident "@(#)Path:stream1.c 3.1" */ 2 | /****************************************************************************** 3 | * 4 | * C++ Standard Components, Release 3.0. 5 | * 6 | * Copyright (c) 1991, 1992 AT&T and Unix System Laboratories, Inc. 7 | * Copyright (c) 1988, 1989, 1990 AT&T. All Rights Reserved. 8 | * 9 | * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T and Unix System 10 | * Laboratories, Inc. The copyright notice above does not evidence 11 | * any actual or intended publication of such source code. 12 | * 13 | ******************************************************************************/ 14 | 15 | #include "Pathlib.h" 16 | #include 17 | #include 18 | 19 | ostream & operator<<(ostream & o, const Search_path & pth) 20 | { 21 | o << (String)pth; 22 | return o; 23 | } 24 | 25 | istream & operator>>(istream & is, Search_path & sp) 26 | { 27 | String s; 28 | is >> s; 29 | sp.make_empty(); 30 | sp.build_from(s); 31 | return is; 32 | } 33 | -------------------------------------------------------------------------------- /libSC/Path/stream2.c: -------------------------------------------------------------------------------- 1 | /*ident "@(#)Path:stream2.c 3.1" */ 2 | /****************************************************************************** 3 | * 4 | * C++ Standard Components, Release 3.0. 5 | * 6 | * Copyright (c) 1991, 1992 AT&T and Unix System Laboratories, Inc. 7 | * Copyright (c) 1988, 1989, 1990 AT&T. All Rights Reserved. 8 | * 9 | * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T and Unix System 10 | * Laboratories, Inc. The copyright notice above does not evidence 11 | * any actual or intended publication of such source code. 12 | * 13 | ******************************************************************************/ 14 | 15 | #include "Pathlib.h" 16 | #include 17 | 18 | ostream & operator<<(ostream & o, const Path & f) { 19 | o << (String)f; 20 | return o; 21 | } 22 | 23 | istream & operator>>(istream & i, Path & f) { 24 | String s; 25 | i >> s; 26 | f = s; 27 | return i; 28 | } 29 | 30 | -------------------------------------------------------------------------------- /libSC/Pool/demos/Thinglist.V: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mingodad/cfront-3/93109c04c214cbe5c941cad6c71f335c2cd25e03/libSC/Pool/demos/Thinglist.V -------------------------------------------------------------------------------- /libSC/Pool/demos/makefile: -------------------------------------------------------------------------------- 1 | #ident "@(#)Pool:demos/makefile 3.1" 2 | ############################################################################### 3 | # 4 | # C++ Standard Components, Release 3.0. 5 | # 6 | # Copyright (c) 1991, 1992 AT&T and Unix System Laboratories, Inc. 7 | # Copyright (c) 1988, 1989, 1990 AT&T. All Rights Reserved. 8 | # 9 | # THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T and Unix System 10 | # Laboratories, Inc. The copyright notice above does not evidence 11 | # any actual or intended publication of such source code. 12 | # 13 | ############################################################################### 14 | 15 | include $(SLELIB)/demorules 16 | 17 | all: 18 | $(SHELL) $(SLEBIN)/regress 19 | 20 | clean: 21 | rm -rf *.ii *.o *.r *.E core ptrepository .variant 22 | -------------------------------------------------------------------------------- /libSC/Pool/makefile: -------------------------------------------------------------------------------- 1 | #ident "@(#)Pool:makefile 3.1" 2 | ############################################################################### 3 | # 4 | # C++ Standard Components, Release 3.0. 5 | # 6 | # Copyright (c) 1991, 1992 AT&T and Unix System Laboratories, Inc. 7 | # Copyright (c) 1988, 1989, 1990 AT&T. All Rights Reserved. 8 | # 9 | # THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T and Unix System 10 | # Laboratories, Inc. The copyright notice above does not evidence 11 | # any actual or intended publication of such source code. 12 | # 13 | ############################################################################### 14 | 15 | CC=CC 16 | SYS= 17 | ROOT=../.. 18 | CCFLAGS = +w -O -I$(ROOT)/incl -DBUILDING_LIBRARY 19 | BSD= 20 | 21 | SRC = Pool.c Vpool.c 22 | 23 | OBS = Pool.o Vpool.o 24 | 25 | libPool.a: $(OBS) 26 | ar cr libPool.a $(OBS) 27 | if test $(SYS) = BSD; then ranlib libPool.a; fi 28 | 29 | Pool.o : Pool.c 30 | $(CC) $(CCFLAGS) -c Pool.c 31 | 32 | Vpool.o : Vpool.c 33 | $(CC) $(CCFLAGS) -c Vpool.c 34 | 35 | tests: 36 | 37 | clean: 38 | rm -f *.o *.a 39 | 40 | clobber: clean 41 | 42 | -------------------------------------------------------------------------------- /libSC/Regex/Alnum.c: -------------------------------------------------------------------------------- 1 | /*ident "@(#)Regex:Alnum.c 3.1" */ 2 | /****************************************************************************** 3 | * 4 | * C++ Standard Components, Release 3.0. 5 | * 6 | * Copyright (c) 1991, 1992 AT&T and Unix System Laboratories, Inc. 7 | * Copyright (c) 1988, 1989, 1990 AT&T. All Rights Reserved. 8 | * 9 | * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T and Unix System 10 | * Laboratories, Inc. The copyright notice above does not evidence 11 | * any actual or intended publication of such source code. 12 | * 13 | ******************************************************************************/ 14 | 15 | #ifdef initbugfixed 16 | #include "Regexlib.h" 17 | 18 | Regex Regex::Alphanumeric("^[0-9a-z]+$", Regex::case_insensitive); 19 | #endif 20 | 21 | 22 | -------------------------------------------------------------------------------- /libSC/Regex/Alpha.c: -------------------------------------------------------------------------------- 1 | /*ident "@(#)Regex:Alpha.c 3.1" */ 2 | /****************************************************************************** 3 | * 4 | * C++ Standard Components, Release 3.0. 5 | * 6 | * Copyright (c) 1991, 1992 AT&T and Unix System Laboratories, Inc. 7 | * Copyright (c) 1988, 1989, 1990 AT&T. All Rights Reserved. 8 | * 9 | * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T and Unix System 10 | * Laboratories, Inc. The copyright notice above does not evidence 11 | * any actual or intended publication of such source code. 12 | * 13 | ******************************************************************************/ 14 | 15 | #ifdef initbugfixed 16 | #include "Regexlib.h" 17 | 18 | Regex Regex::Alpha("^[a-z]+$", Regex::case_insensitive); 19 | #endif 20 | 21 | 22 | -------------------------------------------------------------------------------- /libSC/Regex/Double.c: -------------------------------------------------------------------------------- 1 | /*ident "@(#)Regex:Double.c 3.1" */ 2 | /****************************************************************************** 3 | * 4 | * C++ Standard Components, Release 3.0. 5 | * 6 | * Copyright (c) 1991, 1992 AT&T and Unix System Laboratories, Inc. 7 | * Copyright (c) 1988, 1989, 1990 AT&T. All Rights Reserved. 8 | * 9 | * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T and Unix System 10 | * Laboratories, Inc. The copyright notice above does not evidence 11 | * any actual or intended publication of such source code. 12 | * 13 | ******************************************************************************/ 14 | 15 | #ifdef initbugfixed 16 | #include "Regexlib.h" 17 | 18 | Regex Regex::Double ("^(\\+|-)?((\\.[0-9]+)|([0-9]+(\\.[0-9]*)?))(e(\\+|-)?[0-9]+)?$", Regex::case_insensitive); 19 | #endif 20 | -------------------------------------------------------------------------------- /libSC/Regex/Float.c: -------------------------------------------------------------------------------- 1 | /*ident "@(#)Regex:Float.c 3.1" */ 2 | /****************************************************************************** 3 | * 4 | * C++ Standard Components, Release 3.0. 5 | * 6 | * Copyright (c) 1991, 1992 AT&T and Unix System Laboratories, Inc. 7 | * Copyright (c) 1988, 1989, 1990 AT&T. All Rights Reserved. 8 | * 9 | * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T and Unix System 10 | * Laboratories, Inc. The copyright notice above does not evidence 11 | * any actual or intended publication of such source code. 12 | * 13 | ******************************************************************************/ 14 | 15 | #ifdef initbugfixed 16 | #include "Regexlib.h" 17 | 18 | Regex Regex::Float ("^(\\+|-)?((\\.[0-9]+)|([0-9]+(\\.[0-9]*)?))$"); 19 | #endif 20 | 21 | 22 | -------------------------------------------------------------------------------- /libSC/Regex/Ident.c: -------------------------------------------------------------------------------- 1 | /*ident "@(#)Regex:Ident.c 3.1" */ 2 | /****************************************************************************** 3 | * 4 | * C++ Standard Components, Release 3.0. 5 | * 6 | * Copyright (c) 1991, 1992 AT&T and Unix System Laboratories, Inc. 7 | * Copyright (c) 1988, 1989, 1990 AT&T. All Rights Reserved. 8 | * 9 | * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T and Unix System 10 | * Laboratories, Inc. The copyright notice above does not evidence 11 | * any actual or intended publication of such source code. 12 | * 13 | ******************************************************************************/ 14 | 15 | #ifdef initbugfixed 16 | #include "Regexlib.h" 17 | 18 | Regex Regex::Identifier("^[a-z_][a-z0-9_]*$", Regex::case_insensitive); 19 | #endif 20 | 21 | 22 | -------------------------------------------------------------------------------- /libSC/Regex/Int.c: -------------------------------------------------------------------------------- 1 | /*ident "@(#)Regex:Int.c 3.1" */ 2 | /****************************************************************************** 3 | * 4 | * C++ Standard Components, Release 3.0. 5 | * 6 | * Copyright (c) 1991, 1992 AT&T and Unix System Laboratories, Inc. 7 | * Copyright (c) 1988, 1989, 1990 AT&T. All Rights Reserved. 8 | * 9 | * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T and Unix System 10 | * Laboratories, Inc. The copyright notice above does not evidence 11 | * any actual or intended publication of such source code. 12 | * 13 | ******************************************************************************/ 14 | 15 | #ifdef initbugfixed 16 | #include "Regexlib.h" 17 | 18 | Regex Regex::Int ("^(\\+|-)?[0-9]+$"); 19 | #endif 20 | -------------------------------------------------------------------------------- /libSC/Regex/demos/6.V: -------------------------------------------------------------------------------- 1 | "oof" at 1 matched subexpression 2 2 | "oof" at 4 matched subexpression 2 3 | -------------------------------------------------------------------------------- /libSC/Regex/demos/6.c: -------------------------------------------------------------------------------- 1 | /*ident "@(#)Regex:demos/6.c 3.1" */ 2 | /****************************************************************************** 3 | * 4 | * C++ Standard Components, Release 3.0. 5 | * 6 | * Copyright (c) 1991, 1992 AT&T and Unix System Laboratories, Inc. 7 | * Copyright (c) 1988, 1989, 1990 AT&T. All Rights Reserved. 8 | * 9 | * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T and Unix System 10 | * Laboratories, Inc. The copyright notice above does not evidence 11 | * any actual or intended publication of such source code. 12 | * 13 | ******************************************************************************/ 14 | 15 | #include 16 | #include 17 | 18 | main() { 19 | Regex r("(foo)|(oof)"); 20 | Regexiter i(r, "foofoof", Regexiter::overlapping); 21 | Subex subs; 22 | while (i.next(subs)) { 23 | String s; 24 | Substrinfo ss = subs(2, s); 25 | if (ss) { 26 | cout << '\"' << s << "\" at " << ss.i; 27 | cout << " matched subexpression 2\n"; 28 | } 29 | } 30 | return 0; 31 | } 32 | -------------------------------------------------------------------------------- /libSC/Regex/demos/final-ex.V: -------------------------------------------------------------------------------- 1 | pattern matches substring "foobar" at 0 2 | subexpression (foo) matched target substring "foo" at 0 3 | subexpression ((bar)*) matched target substring "bar" at 3 4 | subexpression (bar) matched target substring "bar" at 3 5 | 6 | pattern matches substring "baz" at 6 7 | subexpression (baz) matched target substring "baz" at 6 8 | 9 | pattern matches substring "foo" at 9 10 | subexpression (foo) matched target substring "foo" at 9 11 | subexpression ((bar)*) matched target substring "" at 12 12 | 13 | pattern matches substring "baz" at 12 14 | subexpression (baz) matched target substring "baz" at 12 15 | 16 | -------------------------------------------------------------------------------- /libSC/Regex/demos/giveme.V: -------------------------------------------------------------------------------- 1 | Give me a pattern, please: invalid: unmatched ( 2 | Please give me a valid pattern: 3 | -------------------------------------------------------------------------------- /libSC/Regex/demos/giveme.c: -------------------------------------------------------------------------------- 1 | /*ident "@(#)Regex:demos/giveme.c 3.1" */ 2 | /****************************************************************************** 3 | * 4 | * C++ Standard Components, Release 3.0. 5 | * 6 | * Copyright (c) 1991, 1992 AT&T and Unix System Laboratories, Inc. 7 | * Copyright (c) 1988, 1989, 1990 AT&T. All Rights Reserved. 8 | * 9 | * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T and Unix System 10 | * Laboratories, Inc. The copyright notice above does not evidence 11 | * any actual or intended publication of such source code. 12 | * 13 | ******************************************************************************/ 14 | 15 | #include 16 | #include 17 | 18 | main() { 19 | cout << "Give me a pattern, please: "; 20 | String s; 21 | cin >> s; 22 | Regex r(s); 23 | while (!r) { 24 | cout << "invalid: " << r.the_error() << endl; 25 | cout << "Please give me a valid pattern: "; 26 | cin >> s; 27 | r.assign(s); 28 | } 29 | cout << endl; 30 | return 0; 31 | } 32 | -------------------------------------------------------------------------------- /libSC/Regex/demos/makefile: -------------------------------------------------------------------------------- 1 | #ident "@(#)Regex:demos/makefile 3.1" 2 | ############################################################################### 3 | # 4 | # C++ Standard Components, Release 3.0. 5 | # 6 | # Copyright (c) 1991, 1992 AT&T and Unix System Laboratories, Inc. 7 | # Copyright (c) 1988, 1989, 1990 AT&T. All Rights Reserved. 8 | # 9 | # THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T and Unix System 10 | # Laboratories, Inc. The copyright notice above does not evidence 11 | # any actual or intended publication of such source code. 12 | # 13 | ############################################################################### 14 | 15 | include $(SLELIB)/demorules 16 | 17 | all: 18 | $(SHELL) $(SLEBIN)/regress 19 | 20 | giveme.r: giveme.E 21 | echo "foo( foo*" | ./giveme.E >giveme.r 22 | 23 | clean: 24 | rm -rf *.ii *.o *.r *.E core ptrepository .variant 25 | -------------------------------------------------------------------------------- /libSC/Regex/libx/limits.h: -------------------------------------------------------------------------------- 1 | /*ident "@(#)Regex:libx/limits.h 3.1" */ 2 | 3 | /* 4 | * C language implementation integral type sizes 5 | */ 6 | 7 | #define CHAR_BIT 8 8 | #if __STDC__ 9 | #define UCHAR_MAX 255U 10 | #else 11 | #define UCHAR_MAX 255 12 | #endif 13 | #define SCHAR_MIN -128 14 | #define SCHAR_MAX 127 15 | #define CHAR_MIN SCHAR_MIN 16 | #define CHAR_MAX SCHAR_MAX 17 | #if __STDC__ 18 | #define USHRT_MAX 65535U 19 | #else 20 | #define USHRT_MAX 65535 21 | #endif 22 | #define SHRT_MIN -32768 23 | #define SHRT_MAX 32767 24 | #if __STDC__ 25 | #define UINT_MAX 4294967295U 26 | #else 27 | #define UINT_MAX 4294967295 28 | #endif 29 | #define INT_MIN -2147483648 30 | #define INT_MAX 2147483647 31 | #define ULONG_MAX UINT_MAX 32 | #define LONG_MIN INT_MIN 33 | #define LONG_MAX INT_MAX 34 | 35 | /* 36 | * system implementation limits 37 | */ 38 | 39 | #define ARG_MAX 1048576 40 | #define CLK_TCK 60 41 | #define MAX_CANON 256 42 | #define LINK_MAX 32767 43 | #define NGROUPS_MAX 16 44 | #define PATH_MAX 1024 45 | #define OPEN_MAX 64 46 | #define OPEN_MAX_CEIL OPEN_MAX 47 | -------------------------------------------------------------------------------- /libSC/Regex/libx/makefile: -------------------------------------------------------------------------------- 1 | #ident "@(#)Regex:libx/makefile 3.1" 2 | ############################################################################### 3 | # 4 | # C++ Standard Components, Release 3.0. 5 | # 6 | # Copyright (c) 1991, 1992 AT&T and Unix System Laboratories, Inc. 7 | # Copyright (c) 1988, 1989, 1990 AT&T. All Rights Reserved. 8 | # 9 | # THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T and Unix System 10 | # Laboratories, Inc. The copyright notice above does not evidence 11 | # any actual or intended publication of such source code. 12 | # 13 | ############################################################################### 14 | 15 | 16 | CC=cc 17 | CFLAGS=-I. -g 18 | OBS=recomp.o reexec.o resub.o reerror.o 19 | 20 | all: libre.a t 21 | 22 | t: t.o libre.a 23 | $(CC) -o t t.o libre.a 24 | 25 | libre.a: $(OBS) 26 | ar cr libre.a $(OBS) 27 | if test -x /usr/bin/ranlib; then ranlib libre.a ; fi 28 | 29 | -------------------------------------------------------------------------------- /libSC/Regex/libx/reerror.c: -------------------------------------------------------------------------------- 1 | /*ident "@(#)Regex:libx/reerror.c 3.1" */ 2 | /* 3 | * AT&T Bell Laboratories 4 | * 5 | * regular expression error routine 6 | */ 7 | 8 | #include 9 | #include 10 | 11 | void 12 | reerror_Regex_ATTLC(s) 13 | char* s; 14 | { 15 | printf("Regex error is %s\n", s); 16 | } 17 | -------------------------------------------------------------------------------- /libSC/Regex/libx/t.c: -------------------------------------------------------------------------------- 1 | /*ident "@(#)Regex:libx/t.c 3.1" */ 2 | 3 | #include "re.h" 4 | 5 | main() 6 | { 7 | char pat[50], s[50]; 8 | reprogram *prog; 9 | char *mess; 10 | int cs; 11 | 12 | printf("Pattern? "); 13 | scanf("%s", pat); 14 | while ((prog = recomp_Regex_ATTLC(pat, strlen(pat), RE_MATCH, &mess)) == 0) 15 | { 16 | printf("%s\nPattern? ", mess); 17 | scanf("%s", pat); 18 | } 19 | printf("Case sensitive matches? "); 20 | scanf("%d", &cs); 21 | while (1) 22 | { 23 | char old[100], new[100], dest[100]; 24 | int i; 25 | printf("String to match? "); 26 | scanf("%s", s); 27 | i = reexec_Regex_ATTLC(prog, s, cs); 28 | printf("%s: %d\n", pat, i); 29 | if (i) 30 | { 31 | printf("old string? "); 32 | scanf("%s", old); 33 | printf("new string? "); 34 | scanf("%s", new); 35 | resub_Regex_ATTLC(prog, old, new, dest, 0); 36 | printf("Result of substitution: %s\n", dest); 37 | } 38 | } 39 | } 40 | 41 | -------------------------------------------------------------------------------- /libSC/Set/Bag1.c: -------------------------------------------------------------------------------- 1 | /*ident "@(#)Set:Bag1.c 3.1" */ 2 | /****************************************************************************** 3 | * 4 | * C++ Standard Components, Release 3.0. 5 | * 6 | * Copyright (c) 1991, 1992 AT&T and Unix System Laboratories, Inc. 7 | * Copyright (c) 1988, 1989, 1990 AT&T. All Rights Reserved. 8 | * 9 | * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T and Unix System 10 | * Laboratories, Inc. The copyright notice above does not evidence 11 | * any actual or intended publication of such source code. 12 | * 13 | ******************************************************************************/ 14 | 15 | #include "Set.h" 16 | 17 | Pool* bag_internal_node_pool_ptr_ATTLC = 0; 18 | -------------------------------------------------------------------------------- /libSC/Set/Set1.c: -------------------------------------------------------------------------------- 1 | /*ident "@(#)Set:Set1.c 3.1" */ 2 | /****************************************************************************** 3 | * 4 | * C++ Standard Components, Release 3.0. 5 | * 6 | * Copyright (c) 1991, 1992 AT&T and Unix System Laboratories, Inc. 7 | * Copyright (c) 1988, 1989, 1990 AT&T. All Rights Reserved. 8 | * 9 | * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T and Unix System 10 | * Laboratories, Inc. The copyright notice above does not evidence 11 | * any actual or intended publication of such source code. 12 | * 13 | ******************************************************************************/ 14 | 15 | #include "Set.h" 16 | 17 | Pool* internal_node_pool_ptr_ATTLC = 0; 18 | -------------------------------------------------------------------------------- /libSC/Set/Set_of_p2.c: -------------------------------------------------------------------------------- 1 | /*ident "@(#)Set:Set_of_p2.c 3.1" */ 2 | /****************************************************************************** 3 | * 4 | * C++ Standard Components, Release 3.0. 5 | * 6 | * Copyright (c) 1991, 1992 AT&T and Unix System Laboratories, Inc. 7 | * Copyright (c) 1988, 1989, 1990 AT&T. All Rights Reserved. 8 | * 9 | * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T and Unix System 10 | * Laboratories, Inc. The copyright notice above does not evidence 11 | * any actual or intended publication of such source code. 12 | * 13 | ******************************************************************************/ 14 | 15 | #include "Set.h" 16 | 17 | Pool* pst_internal_node_pool_ptr_ATTLC = 0; 18 | -------------------------------------------------------------------------------- /libSC/Set/demos/3.V: -------------------------------------------------------------------------------- 1 | COUNT WORD 2 | 3 | 1 an 4 | 1 stream 5 | 1 of 6 | 1 gives: 7 | 2 this 8 | 1 Running 9 | 1 consisting 10 | 1 sentence 11 | 1 on 12 | 1 alone 13 | 1 input 14 | 1 program 15 | -------------------------------------------------------------------------------- /libSC/Set/demos/5.V: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mingodad/cfront-3/93109c04c214cbe5c941cad6c71f335c2cd25e03/libSC/Set/demos/5.V -------------------------------------------------------------------------------- /libSC/Set/demos/5.c: -------------------------------------------------------------------------------- 1 | /*ident "@(#)Set:demos/5.c 3.1" */ 2 | /****************************************************************************** 3 | * 4 | * C++ Standard Components, Release 3.0. 5 | * 6 | * Copyright (c) 1991, 1992 AT&T and Unix System Laboratories, Inc. 7 | * Copyright (c) 1988, 1989, 1990 AT&T. All Rights Reserved. 8 | * 9 | * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T and Unix System 10 | * Laboratories, Inc. The copyright notice above does not evidence 11 | * any actual or intended publication of such source code. 12 | * 13 | ******************************************************************************/ 14 | 15 | #include 16 | 17 | Set_or_Bag_hashval Set::hash(const int& t) 18 | { 19 | if ( t % 2 == 0 ) 20 | { 21 | return 2; 22 | } 23 | else if ( t < 0 ) 24 | { 25 | return 1; 26 | } 27 | else 28 | { 29 | return t+2; 30 | } 31 | } 32 | 33 | main() 34 | { 35 | Set s; 36 | 37 | for( int i = -20 ; i<1000 ; i++ ) 38 | { 39 | s.insert(i); 40 | } 41 | return 0; 42 | } 43 | -------------------------------------------------------------------------------- /libSC/Set/demos/Spool.V: -------------------------------------------------------------------------------- 1 | Spool: bad pointer: 0x7 2 | -------------------------------------------------------------------------------- /libSC/Set/demos/cartprod.V: -------------------------------------------------------------------------------- 1 | {<1,4>,<1,5>,<2,4>,<1,6>,<2,5>,<3,4>,<2,6>,<3,5>,<4,4>,<3,6>,<4,5>,<4,6>} 2 | -------------------------------------------------------------------------------- /libSC/Set/demos/input: -------------------------------------------------------------------------------- 1 | Running this program on an input stream consisting of this sentence alone gives: 2 | -------------------------------------------------------------------------------- /libSC/Set/demos/makefile: -------------------------------------------------------------------------------- 1 | #ident "@(#)Set:demos/makefile 3.1" 2 | ############################################################################### 3 | # 4 | # C++ Standard Components, Release 3.0. 5 | # 6 | # Copyright (c) 1991, 1992 AT&T and Unix System Laboratories, Inc. 7 | # Copyright (c) 1988, 1989, 1990 AT&T. All Rights Reserved. 8 | # 9 | # THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T and Unix System 10 | # Laboratories, Inc. The copyright notice above does not evidence 11 | # any actual or intended publication of such source code. 12 | # 13 | ############################################################################### 14 | 15 | include $(SLELIB)/demorules 16 | 17 | all: 18 | $(SHELL) $(SLEBIN)/regress 19 | 20 | 3.r: 3.E 21 | ./3.E >3.r Spool.r 2>&1 25 | 26 | clean: 27 | rm -rf *.ii *.o *.r *.E core ptrepository .variant 28 | -------------------------------------------------------------------------------- /libSC/Stopwatch/demos/3.V: -------------------------------------------------------------------------------- 1 | user time = 0 2 | -------------------------------------------------------------------------------- /libSC/Stopwatch/demos/3.c: -------------------------------------------------------------------------------- 1 | /*ident "@(#)Stopwatch:demos/3.c 3.1" */ 2 | /****************************************************************************** 3 | * 4 | * C++ Standard Components, Release 3.0. 5 | * 6 | * Copyright (c) 1991, 1992 AT&T and Unix System Laboratories, Inc. 7 | * Copyright (c) 1988, 1989, 1990 AT&T. All Rights Reserved. 8 | * 9 | * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T and Unix System 10 | * Laboratories, Inc. The copyright notice above does not evidence 11 | * any actual or intended publication of such source code. 12 | * 13 | ******************************************************************************/ 14 | 15 | #include 16 | #include 17 | 18 | main() { 19 | Stopwatch w; 20 | w.start(); 21 | // computation of interest 22 | // for (int i=0; i < 20000000; i++); 23 | w.stop(); 24 | cout << "user time = " << w.user() << endl; 25 | // cout << "real time = " << w.real() << endl; 26 | return 0; 27 | } 28 | -------------------------------------------------------------------------------- /libSC/Stopwatch/demos/makefile: -------------------------------------------------------------------------------- 1 | #ident "@(#)Stopwatch:demos/makefile 3.1" 2 | ############################################################################### 3 | # 4 | # C++ Standard Components, Release 3.0. 5 | # 6 | # Copyright (c) 1991, 1992 AT&T and Unix System Laboratories, Inc. 7 | # Copyright (c) 1988, 1989, 1990 AT&T. All Rights Reserved. 8 | # 9 | # THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T and Unix System 10 | # Laboratories, Inc. The copyright notice above does not evidence 11 | # any actual or intended publication of such source code. 12 | # 13 | ############################################################################### 14 | 15 | include $(SLELIB)/demorules 16 | 17 | all: 18 | $(SHELL) $(SLEBIN)/regress 19 | 20 | 21 | clean: 22 | rm -rf *.ii *.o *.r *.E core ptrepository .variant 23 | -------------------------------------------------------------------------------- /libSC/Stopwatch/makefile: -------------------------------------------------------------------------------- 1 | #ident "@(#)Stopwatch:makefile 3.1" 2 | ############################################################################### 3 | # 4 | # C++ Standard Components, Release 3.0. 5 | # 6 | # Copyright (c) 1991, 1992 AT&T and Unix System Laboratories, Inc. 7 | # Copyright (c) 1988, 1989, 1990 AT&T. All Rights Reserved. 8 | # 9 | # THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T and Unix System 10 | # Laboratories, Inc. The copyright notice above does not evidence 11 | # any actual or intended publication of such source code. 12 | # 13 | ############################################################################### 14 | 15 | CC=CC 16 | SYS= 17 | BSD= 18 | ROOT=../.. 19 | CCFLAGS = +w -O -I$(ROOT)/incl -DBUILDING_LIBRARY 20 | 21 | SRC = Stopwatch.c 22 | 23 | OBS = Stopwatch.o 24 | 25 | libSwatch.a: $(OBS) 26 | ar cr libSwatch.a $(OBS) 27 | if test "$(SYS)" = BSD; then ranlib libSwatch.a; fi 28 | 29 | Stopwatch.o : Stopwatch.c 30 | $(CC) $(CCFLAGS) -c Stopwatch.c 31 | 32 | clean: 33 | rm -f *.o *.a 34 | 35 | clobber: clean 36 | 37 | -------------------------------------------------------------------------------- /libSC/String/S_fputs.c: -------------------------------------------------------------------------------- 1 | /*ident "@(#)String:S_fputs.c 3.1" */ 2 | /****************************************************************************** 3 | * 4 | * C++ Standard Components, Release 3.0. 5 | * 6 | * Copyright (c) 1991, 1992 AT&T and Unix System Laboratories, Inc. 7 | * Copyright (c) 1988, 1989, 1990 AT&T. All Rights Reserved. 8 | * 9 | * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T and Unix System 10 | * Laboratories, Inc. The copyright notice above does not evidence 11 | * any actual or intended publication of such source code. 12 | * 13 | ******************************************************************************/ 14 | 15 | #define IN_STRING_LIB 16 | #include "String.h" 17 | 18 | int 19 | fputs(const String& s1, FILE* iop) 20 | { 21 | register char* s = s1.d->str; 22 | register char* e = s + s1.d->len; 23 | register int r; 24 | register int c; 25 | 26 | while (s < e) { 27 | c = *s++; 28 | r = putc(c, iop); 29 | } 30 | return(r); 31 | } 32 | -------------------------------------------------------------------------------- /libSC/String/S_puts.c: -------------------------------------------------------------------------------- 1 | /*ident "@(#)String:S_puts.c 3.1" */ 2 | /****************************************************************************** 3 | * 4 | * C++ Standard Components, Release 3.0. 5 | * 6 | * Copyright (c) 1991, 1992 AT&T and Unix System Laboratories, Inc. 7 | * Copyright (c) 1988, 1989, 1990 AT&T. All Rights Reserved. 8 | * 9 | * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T and Unix System 10 | * Laboratories, Inc. The copyright notice above does not evidence 11 | * any actual or intended publication of such source code. 12 | * 13 | ******************************************************************************/ 14 | 15 | #define IN_STRING_LIB 16 | #include "String.h" 17 | 18 | int 19 | puts(const String& s1) 20 | { 21 | register char* s = s1.d->str; 22 | register char* e = s + s1.d->len; 23 | register int c; 24 | 25 | while (s < e) { 26 | c = *s++; 27 | putchar(c); 28 | } 29 | return(putchar('\n')); 30 | } 31 | 32 | -------------------------------------------------------------------------------- /libSC/String/S_reserve.c: -------------------------------------------------------------------------------- 1 | /*ident "@(#)String:S_reserve.c 3.1" */ 2 | /****************************************************************************** 3 | * 4 | * C++ Standard Components, Release 3.0. 5 | * 6 | * Copyright (c) 1991, 1992 AT&T and Unix System Laboratories, Inc. 7 | * Copyright (c) 1988, 1989, 1990 AT&T. All Rights Reserved. 8 | * 9 | * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T and Unix System 10 | * Laboratories, Inc. The copyright notice above does not evidence 11 | * any actual or intended publication of such source code. 12 | * 13 | ******************************************************************************/ 14 | 15 | #define IN_STRING_LIB 16 | #include "String.h" 17 | 18 | void 19 | String::reserve_grow(int target) 20 | { 21 | Srep_ATTLC *x = Srep_ATTLC::new_srep(target); 22 | x->len = d->len; 23 | if (d->len != 0) { 24 | memcpy(x->str,d->str,d->len); 25 | } 26 | d->rcdec(); 27 | d = x; 28 | } 29 | -------------------------------------------------------------------------------- /libSC/String/S_square.c: -------------------------------------------------------------------------------- 1 | /*ident "@(#)String:S_square.c 3.1" */ 2 | /****************************************************************************** 3 | * 4 | * C++ Standard Components, Release 3.0. 5 | * 6 | * Copyright (c) 1991, 1992 AT&T and Unix System Laboratories, Inc. 7 | * Copyright (c) 1988, 1989, 1990 AT&T. All Rights Reserved. 8 | * 9 | * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T and Unix System 10 | * Laboratories, Inc. The copyright notice above does not evidence 11 | * any actual or intended publication of such source code. 12 | * 13 | ******************************************************************************/ 14 | 15 | #define IN_STRING_LIB 16 | #include "String.h" 17 | 18 | /* SUBCHAR STUFF */ 19 | char& 20 | String::operator[](unsigned i) 21 | { 22 | if(d->refc!=1) { 23 | register Srep_ATTLC* r = Srep_ATTLC::new_srep(length()); 24 | if (length() > 0) 25 | memcpy(r->str,d->str,length()); 26 | if (d->refc > 0) 27 | --(d->refc); 28 | d = r; 29 | } 30 | return d->str[i]; 31 | } 32 | -------------------------------------------------------------------------------- /libSC/String/demos/makefile: -------------------------------------------------------------------------------- 1 | #ident "@(#)String:demos/makefile 3.1" 2 | ############################################################################### 3 | # 4 | # C++ Standard Components, Release 3.0. 5 | # 6 | # Copyright (c) 1991, 1992 AT&T and Unix System Laboratories, Inc. 7 | # Copyright (c) 1988, 1989, 1990 AT&T. All Rights Reserved. 8 | # 9 | # THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T and Unix System 10 | # Laboratories, Inc. The copyright notice above does not evidence 11 | # any actual or intended publication of such source code. 12 | # 13 | ############################################################################### 14 | 15 | include $(SLELIB)/demorules 16 | 17 | all: 18 | $(SHELL) $(SLEBIN)/regress 19 | 20 | replace.r: replace.E 21 | echo "foo bar foobar foobarbaz" | ./replace.E bar BAR >replace.r 22 | 23 | incore.r: incore.E 24 | ./incore.E incore.r 25 | 26 | 27 | clean: 28 | rm -rf *.ii *.o *.r *.E core ptrepository .variant 29 | -------------------------------------------------------------------------------- /libSC/String/demos/replace.V: -------------------------------------------------------------------------------- 1 | foo BAR fooBAR fooBARbaz 2 | -------------------------------------------------------------------------------- /libSC/String/demos/reverse.V: -------------------------------------------------------------------------------- 1 | raboof 2 | -------------------------------------------------------------------------------- /libSC/String/demos/reverse.c: -------------------------------------------------------------------------------- 1 | /*ident "@(#)String:demos/reverse.c 3.1" */ 2 | /****************************************************************************** 3 | * 4 | * C++ Standard Components, Release 3.0. 5 | * 6 | * Copyright (c) 1991, 1992 AT&T and Unix System Laboratories, Inc. 7 | * Copyright (c) 1988, 1989, 1990 AT&T. All Rights Reserved. 8 | * 9 | * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T and Unix System 10 | * Laboratories, Inc. The copyright notice above does not evidence 11 | * any actual or intended publication of such source code. 12 | * 13 | ******************************************************************************/ 14 | 15 | #include 16 | #include 17 | 18 | String 19 | reverse(String s) { 20 | String rslt; 21 | 22 | for(int i=length(s)-1;i>=0;i--) 23 | rslt += s.char_at(i); 24 | 25 | return rslt; 26 | } 27 | 28 | main() { 29 | cout << reverse("foobar") << endl; 30 | return 0; 31 | } 32 | -------------------------------------------------------------------------------- /libSC/Strstream/makefile: -------------------------------------------------------------------------------- 1 | #ident "@(#)Strstream:makefile 3.1" 2 | ############################################################################### 3 | # 4 | # C++ Standard Components, Release 3.0. 5 | # 6 | # Copyright (c) 1991, 1992 AT&T and Unix System Laboratories, Inc. 7 | # Copyright (c) 1988, 1989, 1990 AT&T. All Rights Reserved. 8 | # 9 | # THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T and Unix System 10 | # Laboratories, Inc. The copyright notice above does not evidence 11 | # any actual or intended publication of such source code. 12 | # 13 | ############################################################################### 14 | 15 | CC=CC 16 | SYS= 17 | ROOT=../.. 18 | CCFLAGS = +w -O -I$(ROOT)/incl -DBUILDING_LIBRARY 19 | BSD= 20 | 21 | SRC = Strstream.c 22 | 23 | OBS = Strstream.o 24 | 25 | libStrstr.a: $(OBS) 26 | ar cr libStrstr.a $(OBS) 27 | if test "$(SYS)" = BSD; then ranlib libStrstr.a; fi 28 | 29 | Strstream.o : Strstream.c 30 | $(CC) $(CCFLAGS) -c Strstream.c 31 | 32 | clean: 33 | rm -f *.o *.a 34 | 35 | clobber: clean 36 | 37 | tests: always 38 | cd tests; $(MAKE) -e 39 | 40 | always: 41 | -------------------------------------------------------------------------------- /libSC/Symbol/Symbol_in.c: -------------------------------------------------------------------------------- 1 | /*ident "@(#)Symbol:Symbol_in.c 3.1" */ 2 | /****************************************************************************** 3 | * 4 | * C++ Standard Components, Release 3.0. 5 | * 6 | * Copyright (c) 1991, 1992 AT&T and Unix System Laboratories, Inc. 7 | * Copyright (c) 1988, 1989, 1990 AT&T. All Rights Reserved. 8 | * 9 | * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T and Unix System 10 | * Laboratories, Inc. The copyright notice above does not evidence 11 | * any actual or intended publication of such source code. 12 | * 13 | ******************************************************************************/ 14 | 15 | #include 16 | #include 17 | 18 | istream& 19 | operator>>(istream& is, Symbol& s) { 20 | String tmp; 21 | is >> tmp; 22 | if (is) { 23 | s = Symbol(tmp); 24 | } 25 | return is; 26 | } 27 | -------------------------------------------------------------------------------- /libSC/Symbol/Symbol_out.c: -------------------------------------------------------------------------------- 1 | /*ident "@(#)Symbol:Symbol_out.c 3.1" */ 2 | /****************************************************************************** 3 | * 4 | * C++ Standard Components, Release 3.0. 5 | * 6 | * Copyright (c) 1991, 1992 AT&T and Unix System Laboratories, Inc. 7 | * Copyright (c) 1988, 1989, 1990 AT&T. All Rights Reserved. 8 | * 9 | * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T and Unix System 10 | * Laboratories, Inc. The copyright notice above does not evidence 11 | * any actual or intended publication of such source code. 12 | * 13 | ******************************************************************************/ 14 | 15 | #include 16 | #include 17 | 18 | ostream& 19 | operator<<(ostream& os, const Symbol& s) { 20 | os << s.the_string(); 21 | return os; 22 | } 23 | -------------------------------------------------------------------------------- /libSC/Symbol/demos/makefile: -------------------------------------------------------------------------------- 1 | #ident "@(#)Symbol:demos/makefile 3.1" 2 | ############################################################################### 3 | # 4 | # C++ Standard Components, Release 3.0. 5 | # 6 | # Copyright (c) 1991, 1992 AT&T and Unix System Laboratories, Inc. 7 | # Copyright (c) 1988, 1989, 1990 AT&T. All Rights Reserved. 8 | # 9 | # THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T and Unix System 10 | # Laboratories, Inc. The copyright notice above does not evidence 11 | # any actual or intended publication of such source code. 12 | # 13 | ############################################################################### 14 | 15 | include $(SLELIB)/demorules 16 | 17 | NTRIALS=5 18 | NLOOKUPS=10 19 | 20 | all: 21 | $(SHELL) $(SLEBIN)/regress 22 | 23 | symtab.r: symtab.E 24 | ./symtab.E $(NTRIALS) $(NLOOKUPS) >symtab.r 25 | 26 | clean: 27 | rm -rf *.ii *.o *.r *.E core ptrepository .variant 28 | -------------------------------------------------------------------------------- /libSC/Symbol/demos/symtab.V: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /libSC/Symbol/string_set.c: -------------------------------------------------------------------------------- 1 | /*ident "@(#)Symbol:string_set.c 3.1" */ 2 | /****************************************************************************** 3 | * 4 | * C++ Standard Components, Release 3.0. 5 | * 6 | * Copyright (c) 1991, 1992 AT&T and Unix System Laboratories, Inc. 7 | * Copyright (c) 1988, 1989, 1990 AT&T. All Rights Reserved. 8 | * 9 | * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T and Unix System 10 | * Laboratories, Inc. The copyright notice above does not evidence 11 | * any actual or intended publication of such source code. 12 | * 13 | ******************************************************************************/ 14 | 15 | #include 16 | #include 17 | 18 | Set_or_Bag_hashval 19 | Set::hash(const String& s) { 20 | return s.hashval(); 21 | } 22 | -------------------------------------------------------------------------------- /libSC/Time/Timelib.h: -------------------------------------------------------------------------------- 1 | /*ident "@(#)Time:Timelib.h 3.1" */ 2 | /****************************************************************************** 3 | * 4 | * C++ Standard Components, Release 3.0. 5 | * 6 | * Copyright (c) 1991, 1992 AT&T and Unix System Laboratories, Inc. 7 | * Copyright (c) 1988, 1989, 1990 AT&T. All Rights Reserved. 8 | * 9 | * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T and Unix System 10 | * Laboratories, Inc. The copyright notice above does not evidence 11 | * any actual or intended publication of such source code. 12 | * 13 | ******************************************************************************/ 14 | 15 | #include "Time.h" 16 | #include "mytime.h" 17 | #include "tm.h" 18 | #include 19 | #include 20 | #ifndef __hpux 21 | #include 22 | #else 23 | #include 24 | #endif 25 | #include 26 | -------------------------------------------------------------------------------- /libSC/Time/Tprint.c: -------------------------------------------------------------------------------- 1 | /*ident "@(#)Time:Tprint.c 3.1" */ 2 | /****************************************************************************** 3 | * 4 | * C++ Standard Components, Release 3.0. 5 | * 6 | * Copyright (c) 1991, 1992 AT&T and Unix System Laboratories, Inc. 7 | * Copyright (c) 1988, 1989, 1990 AT&T. All Rights Reserved. 8 | * 9 | * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T and Unix System 10 | * Laboratories, Inc. The copyright notice above does not evidence 11 | * any actual or intended publication of such source code. 12 | * 13 | ******************************************************************************/ 14 | 15 | #include "Timelib.h" 16 | #include 17 | 18 | ostream& operator<<(ostream& os,const Duration& d){ 19 | String s = d.make_string(); 20 | os << s; 21 | return os; 22 | } 23 | ostream& operator<<(ostream& os,const Place& p){ 24 | String s = p.make_string(); 25 | os << s; 26 | return os; 27 | } 28 | ostream& operator<<(ostream& os,const Time& t){ 29 | String s = t.make_string(); 30 | os << s; 31 | return os; 32 | } 33 | -------------------------------------------------------------------------------- /libSC/Time/demos/1-1.V: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /libSC/Time/demos/1-1.c: -------------------------------------------------------------------------------- 1 | /*ident "@(#)Time:demos/1-1.c 3.1" */ 2 | /****************************************************************************** 3 | * 4 | * C++ Standard Components, Release 3.0. 5 | * 6 | * Copyright (c) 1991, 1992 AT&T and Unix System Laboratories, Inc. 7 | * Copyright (c) 1988, 1989, 1990 AT&T. All Rights Reserved. 8 | * 9 | * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T and Unix System 10 | * Laboratories, Inc. The copyright notice above does not evidence 11 | * any actual or intended publication of such source code. 12 | * 13 | ******************************************************************************/ 14 | 15 | #include 16 | #include 17 | 18 | main(){ 19 | /*Time result =*/ (void)(make_time("now") + Duration::days(30)); 20 | // this line commented out in order to get this demo to 21 | // pass the regression test. put it back in if you like. 22 | //cout << result; 23 | cout << endl; 24 | return 0; 25 | } 26 | -------------------------------------------------------------------------------- /libSC/Time/demos/1-2.V: -------------------------------------------------------------------------------- 1 | 07/03/87 21:00:00 2 | 07/04/87 03:00:00 3 | -0d 06h 00m 00s 4 | -------------------------------------------------------------------------------- /libSC/Time/demos/1-2.c: -------------------------------------------------------------------------------- 1 | /*ident "@(#)Time:demos/1-2.c 3.1" */ 2 | /****************************************************************************** 3 | * 4 | * C++ Standard Components, Release 3.0. 5 | * 6 | * Copyright (c) 1991, 1992 AT&T and Unix System Laboratories, Inc. 7 | * Copyright (c) 1988, 1989, 1990 AT&T. All Rights Reserved. 8 | * 9 | * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T and Unix System 10 | * Laboratories, Inc. The copyright notice above does not evidence 11 | * any actual or intended publication of such source code. 12 | * 13 | ******************************************************************************/ 14 | 15 | #include 16 | #include 17 | 18 | main(){ 19 | Time t1 = Time(1987,Time::july,3) + Duration(0,21); 20 | Time t2 = Time(1987,Time::july,4) + Duration(0,3); 21 | 22 | Duration d=t1-t2; 23 | 24 | cout << t1 << endl; 25 | cout << t2 << endl; 26 | cout << d << endl; 27 | return 0; 28 | } 29 | -------------------------------------------------------------------------------- /libSC/Time/demos/appoint.h: -------------------------------------------------------------------------------- 1 | /*ident "@(#)Time:demos/appoint.h 3.1" */ 2 | /****************************************************************************** 3 | * 4 | * C++ Standard Components, Release 3.0. 5 | * 6 | * Copyright (c) 1991, 1992 AT&T and Unix System Laboratories, Inc. 7 | * Copyright (c) 1988, 1989, 1990 AT&T. All Rights Reserved. 8 | * 9 | * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T and Unix System 10 | * Laboratories, Inc. The copyright notice above does not evidence 11 | * any actual or intended publication of such source code. 12 | * 13 | ******************************************************************************/ 14 | 15 | #include 16 | #include 17 | 18 | // an Appointment consists of a time and a description 19 | struct Appointment { 20 | Time time; 21 | String desc; 22 | }; 23 | 24 | inline int operator<(const Appointment& a, const Appointment& b) { 25 | return a.time < b.time; 26 | } 27 | -------------------------------------------------------------------------------- /libSC/Time/demos/appts: -------------------------------------------------------------------------------- 1 | May 3, 1991 Uncle Fred's birthday 2 | May 30 noon lunch with Andy 3 | May 30 3PM group meeting 4 | 5/6/91 10 AM one-on-one with Wayne 5 | April 28, 1991 5PM call Larry Smith 6 | April 29, 1991 2PM visit Aunt Edna 7 | June 1, 1991 10:45 watch the big parade 8 | 12/25/91 Santa Claus 9 | -------------------------------------------------------------------------------- /libSC/Time/demos/cal.V: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mingodad/cfront-3/93109c04c214cbe5c941cad6c71f335c2cd25e03/libSC/Time/demos/cal.V -------------------------------------------------------------------------------- /libSC/Time/demos/daylight.V: -------------------------------------------------------------------------------- 1 | 06/30/81 00:00:00 2 | -------------------------------------------------------------------------------- /libSC/Time/demos/example-2.c: -------------------------------------------------------------------------------- 1 | /*ident "@(#)Time:demos/example-2.c 3.1" */ 2 | /****************************************************************************** 3 | * 4 | * C++ Standard Components, Release 3.0. 5 | * 6 | * Copyright (c) 1991, 1992 AT&T and Unix System Laboratories, Inc. 7 | * Copyright (c) 1988, 1989, 1990 AT&T. All Rights Reserved. 8 | * 9 | * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T and Unix System 10 | * Laboratories, Inc. The copyright notice above does not evidence 11 | * any actual or intended publication of such source code. 12 | * 13 | ******************************************************************************/ 14 | 15 | #include 16 | #include 17 | 18 | main(){ 19 | Time::environment_objection.ignore(); 20 | Time t(1988,Time::january,1); 21 | cout << t.make_string("%x %X %Z") << endl; 22 | return 0; 23 | } 24 | -------------------------------------------------------------------------------- /libSC/Time/demos/loop.V: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /libSC/Time/demos/loop.c: -------------------------------------------------------------------------------- 1 | /*ident "@(#)Time:demos/loop.c 3.1" */ 2 | /****************************************************************************** 3 | * 4 | * C++ Standard Components, Release 3.0. 5 | * 6 | * Copyright (c) 1991, 1992 AT&T and Unix System Laboratories, Inc. 7 | * Copyright (c) 1988, 1989, 1990 AT&T. All Rights Reserved. 8 | * 9 | * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T and Unix System 10 | * Laboratories, Inc. The copyright notice above does not evidence 11 | * any actual or intended publication of such source code. 12 | * 13 | ******************************************************************************/ 14 | 15 | #include 16 | #include 17 | 18 | main(){ 19 | // loop over all days in 1988 and 1989 20 | // (doesn't raise Time::date_objection) 21 | 22 | for( 23 | int i=1; 24 | i<=days_in_year(1988)+days_in_year(1989); 25 | i++ 26 | ){ 27 | Time t = Time::julian(1988,i); 28 | // ... 29 | } 30 | cout << endl; 31 | return 0; 32 | } 33 | -------------------------------------------------------------------------------- /libSC/Time/demos/makefile: -------------------------------------------------------------------------------- 1 | #ident "@(#)Time:demos/makefile 3.1" 2 | ############################################################################### 3 | # 4 | # C++ Standard Components, Release 3.0. 5 | # 6 | # Copyright (c) 1991, 1992 AT&T and Unix System Laboratories, Inc. 7 | # Copyright (c) 1988, 1989, 1990 AT&T. All Rights Reserved. 8 | # 9 | # THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T and Unix System 10 | # Laboratories, Inc. The copyright notice above does not evidence 11 | # any actual or intended publication of such source code. 12 | # 13 | ############################################################################### 14 | 15 | include $(SLELIB)/demorules 16 | 17 | CCFLAGS=-g 18 | LIBS=-l++ 19 | 20 | .c.r: 21 | $(CC) $(CCFLAGS) $(LDFLAGS) -o $*.E $< $(LIBS) 22 | cd .; TZ=EST5EDT; export TZ; echo "12:42 noon foo" | ./$*.E > $@ 23 | 24 | all: 25 | $(SHELL) $(SLEBIN)/regress 26 | 27 | cal.r: cal.E 28 | cd .; TZ=EST5EDT; export TZ; ./cal.E < appts >cal.r 2>&1 29 | 30 | clean: 31 | rm -rf *.ii *.o *.r *.E core ptrepository .variant 32 | -------------------------------------------------------------------------------- /libSC/Time/demos/paranoid.V: -------------------------------------------------------------------------------- 1 | 12/31/69 19:00:00 2 | 01/14/88 00:00:00 3 | 12/31/69 19:00:00 4 | -------------------------------------------------------------------------------- /libSC/Time/demos/paranoid.c: -------------------------------------------------------------------------------- 1 | /*ident "@(#)Time:demos/paranoid.c 3.1" */ 2 | /****************************************************************************** 3 | * 4 | * C++ Standard Components, Release 3.0. 5 | * 6 | * Copyright (c) 1991, 1992 AT&T and Unix System Laboratories, Inc. 7 | * Copyright (c) 1988, 1989, 1990 AT&T. All Rights Reserved. 8 | * 9 | * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T and Unix System 10 | * Laboratories, Inc. The copyright notice above does not evidence 11 | * any actual or intended publication of such source code. 12 | * 13 | ******************************************************************************/ 14 | 15 | #include 16 | #include 17 | 18 | Time paranoid(unsigned y,Time::Month m,unsigned d){ 19 | Time result; 20 | if(Time::valid_date(y,m,d)){ 21 | result = Time(y,m,d); 22 | } 23 | return result; 24 | } 25 | 26 | main() { 27 | Time t; 28 | cout << t << endl; 29 | cout << paranoid(1988,Time::january,14) << endl; 30 | cout << paranoid(0,Time::january,72) << endl; 31 | return 0; 32 | } 33 | -------------------------------------------------------------------------------- /libSC/Time/tm/mystrdup.c: -------------------------------------------------------------------------------- 1 | /*ident "@(#)Time:tm/mystrdup.c 3.2" */ 2 | /****************************************************************************** 3 | * 4 | * C++ Standard Components, Release 3.0. 5 | * 6 | * Copyright (c) 1991, 1992 AT&T and Unix System Laboratories, Inc. 7 | * Copyright (c) 1988, 1989, 1990 AT&T. All Rights Reserved. 8 | * 9 | * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T and Unix System 10 | * Laboratories, Inc. The copyright notice above does not evidence 11 | * any actual or intended publication of such source code. 12 | * 13 | ******************************************************************************/ 14 | 15 | /* 16 | * return a copy of s using malloc 17 | */ 18 | 19 | #include 20 | #include 21 | #include 22 | 23 | char* mystrdup_Time_ATTLC(const char *s){ 24 | register char* t; 25 | register int n; 26 | 27 | return (char*)((t = new char[n = strlen(s) + 1]) ? memcpy(t, s, n) : 0); 28 | } 29 | -------------------------------------------------------------------------------- /libSC/Time/tm/tmleap.c: -------------------------------------------------------------------------------- 1 | /*ident "@(#)Time:tm/tmleap.c 3.1" */ 2 | /****************************************************************************** 3 | * 4 | * C++ Standard Components, Release 3.0. 5 | * 6 | * Copyright (c) 1991, 1992 AT&T and Unix System Laboratories, Inc. 7 | * Copyright (c) 1988, 1989, 1990 AT&T. All Rights Reserved. 8 | * 9 | * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T and Unix System 10 | * Laboratories, Inc. The copyright notice above does not evidence 11 | * any actual or intended publication of such source code. 12 | * 13 | ******************************************************************************/ 14 | 15 | #include 16 | 17 | /* 18 | * return clock with leap seconds adjusted 19 | * for direct localtime() access 20 | */ 21 | 22 | time_t tmleap_ATTLC(register time_t* clock) { 23 | register struct tl* lp; 24 | time_t now; 25 | 26 | tmset(); 27 | if (clock) now = *clock; 28 | else (void)time(&now); 29 | if (tm_flags_ATTLC & TM_ADJUST) 30 | { 31 | for (lp = &tm_leap_ATTLC[0]; now < (lp->time - lp->total); lp++); 32 | now += lp->total; 33 | } 34 | return(now); 35 | } 36 | -------------------------------------------------------------------------------- /libSC/aoutdem/hpux/makefile: -------------------------------------------------------------------------------- 1 | #ident "@(#)aoutdem:hpux/makefile 3.1" 2 | ############################################################################### 3 | # 4 | # C++ Standard Components, Release 3.0. 5 | # 6 | # Copyright (c) 1991, 1992 AT&T and Unix System Laboratories, Inc. 7 | # Copyright (c) 1988, 1989, 1990 AT&T. All Rights Reserved. 8 | # 9 | # THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T and Unix System 10 | # Laboratories, Inc. The copyright notice above does not evidence 11 | # any actual or intended publication of such source code. 12 | # 13 | ############################################################################### 14 | 15 | CC=CC 16 | LIBS=-l++ 17 | 18 | all: demangle 19 | 20 | demangle:demangle.o 21 | $(CC) $(LDFLAGS) -o demangle demangle.o $(LIBS) 22 | 23 | clean: 24 | rm -f demangle.o demangle 25 | 26 | clobber:clean 27 | 28 | -------------------------------------------------------------------------------- /libSC/aoutdem/mips/makefile: -------------------------------------------------------------------------------- 1 | #ident "@(#)aoutdem:mips/makefile 3.1" 2 | ############################################################################### 3 | # 4 | # C++ Standard Components, Release 3.0. 5 | # 6 | # Copyright (c) 1991, 1992 AT&T and Unix System Laboratories, Inc. 7 | # Copyright (c) 1988, 1989, 1990 AT&T. All Rights Reserved. 8 | # 9 | # THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T and Unix System 10 | # Laboratories, Inc. The copyright notice above does not evidence 11 | # any actual or intended publication of such source code. 12 | # 13 | ############################################################################### 14 | 15 | CC=CC 16 | LIBS=-l++ 17 | 18 | all: demangle 19 | 20 | demangle:demangle.o 21 | $(CC) $(LDFLAGS) -o demangle demangle.o $(LIBS) 22 | 23 | clean: 24 | rm -f demangle.o demangle 25 | 26 | clobber:clean 27 | 28 | -------------------------------------------------------------------------------- /libSC/aoutdem/solaris/Link.c: -------------------------------------------------------------------------------- 1 | #include "Link.h" 2 | 3 | Link::~Link() {} 4 | 5 | void Link::display() { fprintf(dbfile, "Link"); } 6 | 7 | static int indentation = 0; 8 | void 9 | newline() 10 | { 11 | fprintf(dbfile, "\n"); 12 | for ( int i = 0; i < indentation; ++i ) fprintf(dbfile, " "); 13 | } 14 | void 15 | indent( int i ) 16 | { 17 | indentation += i; 18 | } 19 | 20 | void 21 | undent( int i ) 22 | { 23 | indentation -= i; 24 | } 25 | 26 | void 27 | Chain::display() 28 | { 29 | fprintf(dbfile, "Chain[%d] {", len); 30 | ++indentation; 31 | for ( Link* o = h; o; o = o->next ) { 32 | newline(); 33 | o->display(); 34 | } 35 | --indentation; 36 | newline(); 37 | fprintf(dbfile, "}"); 38 | } 39 | -------------------------------------------------------------------------------- /libSC/aoutdem/solaris/incl/sym.h: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include "idebug.h" 7 | #include 8 | #include 9 | #include 10 | 11 | extern void reformat( char* ); 12 | extern String demangleAndSimplify(const String &, int, int); 13 | 14 | // from demangle.c 15 | extern int overwriteAout; 16 | extern int bufsize; 17 | extern char* tsymfilename; 18 | extern char* tstrfilename; 19 | extern void finish(int); 20 | extern void bombout(int); 21 | #ifdef IDEBUG 22 | extern int readOnly; 23 | #endif 24 | -------------------------------------------------------------------------------- /libSC/aoutdem/solaris/incl/util.c: -------------------------------------------------------------------------------- 1 | #include "idebug.h" 2 | #include "util.h" 3 | 4 | template 5 | T* 6 | readsect( Block& b, int i ) 7 | { 8 | size_t nbytes = (size_t)shdr[i].sh_size; 9 | DB(if(idebug>=1){ char* sn = &secstrings[shdr[i].sh_name]; 10 | fprintf(dbfile,"reading %s offset==%ld,size==%ld into block\n",sn,shdr[i].sh_offset,shdr[i].sh_size); 11 | }); 12 | b.reserve(nbytes/sizeof(T)); 13 | if (lseek(elffd, shdr[i].sh_offset, SEEK_SET) == -1) 14 | error("seek error in readsect: offset==%ld\n",shdr[i].sh_offset); 15 | if (read(elffd, (char*)(T*)b, nbytes) != nbytes) 16 | error("can't read section: size==%ld\n",nbytes); 17 | return (T*)b; 18 | } 19 | -------------------------------------------------------------------------------- /libSC/aoutdem/solaris/incl/util.h: -------------------------------------------------------------------------------- 1 | #ifndef UTIL_H 2 | #define UTIL_H 3 | 4 | #include 5 | #include "Block.h" 6 | 7 | // make these extern and in header so instantiation will work 8 | struct ea { 9 | union { 10 | long l; 11 | char* s; 12 | }; 13 | ea(long i) : l(i) {} 14 | ea(const char* p) : s((char*)p) {} 15 | }; 16 | extern ea earg; 17 | extern void error( char*, ea = earg, ea = earg ); 18 | extern int elffd; 19 | extern Elf32_Shdr *shdr; 20 | extern char *secstrings; 21 | template T* readsect( Block&, int ); 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /libSC/aoutdem/solaris/makefile: -------------------------------------------------------------------------------- 1 | CC = CC 2 | CCFLAGS = -Iincl 3 | OFILES = Link.o Memspace.o demangle.o sym.o 4 | LIBS = -l++ 5 | 6 | all: demangle 7 | 8 | demangle: $(OFILES) 9 | $(CC) -o demangle $(CCFLAGS) $(OFILES) ../../demangle/libmangle.a $(LIBS) 10 | 11 | Link.o: incl/Link.h incl/idebug.h 12 | 13 | Memspace.o: incl/Link.h incl/Memspace.h incl/idebug.h 14 | 15 | demangle.o: incl/sym.h incl/idebug.h 16 | 17 | sym.o: incl/Link.h incl/Memspace.h incl/idebug.h incl/util.h 18 | 19 | .SUFFIXES: 20 | .SUFFIXES: .c .o 21 | 22 | .c.o: 23 | $(CC) -c $(CCFLAGS) $< 24 | 25 | clean: 26 | rm -f $(OFILES) 27 | 28 | clobber: clean 29 | rm -f demangle 30 | rm -f *.ii 31 | rm -rf ptrepository 32 | -------------------------------------------------------------------------------- /libSC/aoutdem/system.h: -------------------------------------------------------------------------------- 1 | /*ident "@(#)aoutdem:system.h 3.1" */ 2 | /****************************************************************************** 3 | * 4 | * C++ Standard Components, Release 3.0. 5 | * 6 | * Copyright (c) 1991, 1992 AT&T and Unix System Laboratories, Inc. 7 | * Copyright (c) 1988, 1989, 1990 AT&T. All Rights Reserved. 8 | * 9 | * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T and Unix System 10 | * Laboratories, Inc. The copyright notice above does not evidence 11 | * any actual or intended publication of such source code. 12 | * 13 | ******************************************************************************/ 14 | 15 | /* -*-fundamental-*- */ 16 | int mv(char *, char *); 17 | int cp(char *, char *); 18 | int ap(char *, char *); 19 | int cp_truncate(char *, char *, long); 20 | int copy_access(char *, char *); 21 | int system(char *, char *); 22 | int system(char *, char *, char*); 23 | int system(char *, char *, char*, char *); 24 | 25 | -------------------------------------------------------------------------------- /libSC/aoutdem/under.c: -------------------------------------------------------------------------------- 1 | /*ident "@(#)aoutdem:under.c 3.1" */ 2 | /****************************************************************************** 3 | * 4 | * C++ Standard Components, Release 3.0. 5 | * 6 | * Copyright (c) 1991, 1992 AT&T and Unix System Laboratories, Inc. 7 | * Copyright (c) 1988, 1989, 1990 AT&T. All Rights Reserved. 8 | * 9 | * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T and Unix System 10 | * Laboratories, Inc. The copyright notice above does not evidence 11 | * any actual or intended publication of such source code. 12 | * 13 | ******************************************************************************/ 14 | 15 | #include "aoutdem.h" 16 | 17 | /* This function returns true if this symbol table entry type 18 | * has an extra prepended underscore. 19 | */ 20 | 21 | int hasextra_(int 22 | #ifndef SYSV 23 | entryType 24 | #endif 25 | ) 26 | { 27 | #ifdef SYSV 28 | #if EXTRA__ 29 | return 1; 30 | #else 31 | return 0; 32 | #endif 33 | #else 34 | return ((entryType|N_EXT) == (N_TEXT|N_EXT) || 35 | (entryType|N_EXT) == (N_DATA|N_EXT) || 36 | (entryType|N_EXT) == (N_BSS|N_EXT)); 37 | #endif 38 | } 39 | -------------------------------------------------------------------------------- /libSC/aoutdem/values.h: -------------------------------------------------------------------------------- 1 | /*ident "@(#)aoutdem:values.h 3.1" */ 2 | /****************************************************************************** 3 | * 4 | * C++ Standard Components, Release 3.0. 5 | * 6 | * Copyright (c) 1991, 1992 AT&T and Unix System Laboratories, Inc. 7 | * Copyright (c) 1988, 1989, 1990 AT&T. All Rights Reserved. 8 | * 9 | * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T and Unix System 10 | * Laboratories, Inc. The copyright notice above does not evidence 11 | * any actual or intended publication of such source code. 12 | * 13 | ******************************************************************************/ 14 | 15 | #define BITSPERBYTE 8 16 | #define BITS(type) (BITSPERBYTE * (int)sizeof(type)) 17 | 18 | /* short, regular and long ints with only the high-order bit turned on */ 19 | #define HIBITS ((short)(1 << BITS(short) - 1)) 20 | #define HIBITI (1 << BITS(int) - 1) 21 | #define HIBITL (1L << BITS(long) - 1) 22 | 23 | /* largest short, regular and long int */ 24 | #define MAXSHORT ((short)~HIBITS) 25 | #define MAXINT (~HIBITI) 26 | #define MAXLONG (~HIBITL) 27 | 28 | -------------------------------------------------------------------------------- /libSC/demangle/demMain.c: -------------------------------------------------------------------------------- 1 | /*ident "@(#) demangle: demMain.c 3.0" */ 2 | 3 | /******************************************************************************* 4 | 5 | C++ source for the C++ Standard Component, Release 3.0. This product 6 | is a new release of the original cfront developed in the computer 7 | science research center of AT&T Bell Laboratories. 8 | 9 | Copyright (c) 1991 AT&T and UNIX System Laboratories, Inc. 10 | Copyright (c) 1984, 1989, 1990 AT&T. All Rights Reserved. 11 | 12 | THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE of AT&T and UNIX System 13 | Laboratories, Inc. The copyright notice above does not evidence 14 | any actual or intended publication of such source code. 15 | 16 | *******************************************************************************/ 17 | #include 18 | #include "dem.h" 19 | 20 | /* Demangle a single command line argument */ 21 | main( argc, argv) 22 | int argc; 23 | char** argv; 24 | { 25 | char buf[1024]; 26 | int i; 27 | 28 | for(i=1;i $@ 2>&1 30 | 31 | .c.E: 32 | $(CC) $(CCFLAGS) $(LDFLAGS) -o $*.E $< $(LIBS) 33 | 34 | .c.o: 35 | $(CC) $(CCFLAGS) -c $< 36 | 37 | clean: 38 | rm -rf *.ii *.o *.r *.E core ptrepository .variant 39 | 40 | clobber: clean 41 | -------------------------------------------------------------------------------- /libSC/fs/demos/prog.h: -------------------------------------------------------------------------------- 1 | /*ident "@(#)fs:demos/prog.h 3.1" */ 2 | /****************************************************************************** 3 | * 4 | * C++ Standard Components, Release 3.0. 5 | * 6 | * Copyright (c) 1991, 1992 AT&T and Unix System Laboratories, Inc. 7 | * Copyright (c) 1988, 1989, 1990 AT&T. All Rights Reserved. 8 | * 9 | * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T and Unix System 10 | * Laboratories, Inc. The copyright notice above does not evidence 11 | * any actual or intended publication of such source code. 12 | * 13 | ******************************************************************************/ 14 | 15 | #include 16 | #include 17 | #include 18 | #include 19 | 20 | -------------------------------------------------------------------------------- /libSC/fs/demos/prog1.V: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /libSC/fs/demos/prog2.V: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /libSC/fs/demos/prog3.V: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /libSC/fs/demos/prog4.V: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /libSC/fs/demos/prog4.c: -------------------------------------------------------------------------------- 1 | /*ident "@(#)fs:demos/prog4.c 3.1" */ 2 | /****************************************************************************** 3 | * 4 | * C++ Standard Components, Release 3.0. 5 | * 6 | * Copyright (c) 1991, 1992 AT&T and Unix System Laboratories, Inc. 7 | * Copyright (c) 1988, 1989, 1990 AT&T. All Rights Reserved. 8 | * 9 | * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T and Unix System 10 | * Laboratories, Inc. The copyright notice above does not evidence 11 | * any actual or intended publication of such source code. 12 | * 13 | ******************************************************************************/ 14 | 15 | #include "prog.h" 16 | 17 | class X { 18 | private: 19 | int i; 20 | }; 21 | 22 | X *x; 23 | 24 | void f() { /*...*/ } 25 | void g() { /*...*/ } 26 | void h() { /*...*/ } 27 | void i() { /*...*/ delete x; } 28 | void j() { /*...*/ } 29 | 30 | main() { 31 | x = new X; 32 | f(); 33 | g(); 34 | h(); 35 | i(); 36 | j(); 37 | cout << endl; 38 | return 0; 39 | } 40 | -------------------------------------------------------------------------------- /libSC/fs/demos/prog5.V: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /libSC/fs/demos/prog5.c: -------------------------------------------------------------------------------- 1 | /*ident "@(#)fs:demos/prog5.c 3.1" */ 2 | /****************************************************************************** 3 | * 4 | * C++ Standard Components, Release 3.0. 5 | * 6 | * Copyright (c) 1991, 1992 AT&T and Unix System Laboratories, Inc. 7 | * Copyright (c) 1988, 1989, 1990 AT&T. All Rights Reserved. 8 | * 9 | * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T and Unix System 10 | * Laboratories, Inc. The copyright notice above does not evidence 11 | * any actual or intended publication of such source code. 12 | * 13 | ******************************************************************************/ 14 | 15 | #include "prog.h" 16 | 17 | class X { 18 | private: 19 | int i; 20 | }; 21 | 22 | X *x; 23 | 24 | void f() { /*...*/ } 25 | void g() { /*...*/ } 26 | void h() { /*...*/ } 27 | void i() { /*...*/ x = new X; } 28 | void j() { /*...*/ } 29 | 30 | main() { 31 | f(); 32 | g(); 33 | h(); 34 | i(); 35 | j(); 36 | cout << endl; 37 | return 0; 38 | } 39 | -------------------------------------------------------------------------------- /libSC/fs/fsippsrc/Token.h: -------------------------------------------------------------------------------- 1 | /*ident "@(#)fs:fsippsrc/Token.h 3.1" */ 2 | /****************************************************************************** 3 | * 4 | * C++ Standard Components, Release 3.0. 5 | * 6 | * Copyright (c) 1991, 1992 AT&T and Unix System Laboratories, Inc. 7 | * Copyright (c) 1988, 1989, 1990 AT&T. All Rights Reserved. 8 | * 9 | * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T and Unix System 10 | * Laboratories, Inc. The copyright notice above does not evidence 11 | * any actual or intended publication of such source code. 12 | * 13 | ******************************************************************************/ 14 | 15 | #ifndef _TOKEN_H 16 | #define _TOKEN_H 17 | 18 | #include "TokenType.h" 19 | #include 20 | 21 | class Token 22 | { 23 | public: 24 | String ws; // whitespace preceding lexeme. 25 | int lineno; // line number of first character of lexeme. 26 | String lexeme; 27 | TokenType type; 28 | }; 29 | 30 | ostream &operator<<(ostream &oo, const Token &t); 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /libSC/fs/fsippsrc/TokenType.h: -------------------------------------------------------------------------------- 1 | /*ident "@(#)fs:fsippsrc/TokenType.h 3.1" */ 2 | /****************************************************************************** 3 | * 4 | * C++ Standard Components, Release 3.0. 5 | * 6 | * Copyright (c) 1991, 1992 AT&T and Unix System Laboratories, Inc. 7 | * Copyright (c) 1988, 1989, 1990 AT&T. All Rights Reserved. 8 | * 9 | * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T and Unix System 10 | * Laboratories, Inc. The copyright notice above does not evidence 11 | * any actual or intended publication of such source code. 12 | * 13 | ******************************************************************************/ 14 | 15 | 16 | 17 | enum TokenType { BOF, NEW, DELETE, VOID, ID, LP, RP, LC, RC, STAR, 18 | QUAL, OPERATOR, SEMI, COMMA, POUND, LITINT, LITSTRING, 19 | EOFTOK, OTHERTOK, COLON, PR, VIRTUAL, AGGR, NL, LS, RS, 20 | INLINE, LANGLE, RANGLE }; 21 | 22 | -------------------------------------------------------------------------------- /libSC/fs/fsippsrc/makefile: -------------------------------------------------------------------------------- 1 | #ident "@(#)fs:fsippsrc/makefile 3.1" 2 | ############################################################################### 3 | # 4 | # C++ Standard Components, Release 3.0. 5 | # 6 | # Copyright (c) 1991, 1992 AT&T and Unix System Laboratories, Inc. 7 | # Copyright (c) 1988, 1989, 1990 AT&T. All Rights Reserved. 8 | # 9 | # THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T and Unix System 10 | # Laboratories, Inc. The copyright notice above does not evidence 11 | # any actual or intended publication of such source code. 12 | # 13 | ############################################################################### 14 | 15 | CC=CC 16 | CFLAGS=-g 17 | LDFLAGS=-g 18 | LIBS=-l++ 19 | 20 | OFILES=CXXToken.o Lexer.o CXXLexer.o fsipp.o parse.o scope.o 21 | 22 | all: fsipp 23 | 24 | fsipp: $(OFILES) 25 | $(CC) $(CFLAGS) -o fsipp $(LDFLAGS) $(OFILES) $(LIBS) 26 | 27 | clean: 28 | /bin/rm -f $(OFILES) 29 | /bin/rm -rf ptrepository Templates.DB 30 | 31 | clobber:clean 32 | /bin/rm -f fsipp 33 | -------------------------------------------------------------------------------- /libSC/fs/fsippsrc/scope.h: -------------------------------------------------------------------------------- 1 | /*ident "@(#)fs:fsippsrc/scope.h 3.1" */ 2 | /****************************************************************************** 3 | * 4 | * C++ Standard Components, Release 3.0. 5 | * 6 | * Copyright (c) 1991, 1992 AT&T and Unix System Laboratories, Inc. 7 | * Copyright (c) 1988, 1989, 1990 AT&T. All Rights Reserved. 8 | * 9 | * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T and Unix System 10 | * Laboratories, Inc. The copyright notice above does not evidence 11 | * any actual or intended publication of such source code. 12 | * 13 | ******************************************************************************/ 14 | 15 | #include 16 | 17 | typedef enum { classScope, otherScope } ScopeType; 18 | 19 | class Scope 20 | { 21 | public: 22 | ScopeType type; 23 | String name; // name of class, if this is a class scope. 24 | Scope(ScopeType t): type(t) {} 25 | Scope(ScopeType t, String n): type(t), name(n) {} 26 | ~Scope() {} 27 | }; 28 | #ifdef __GNUG__ 29 | class ostream; 30 | extern ostream& operator<<(ostream &, const Scope &); 31 | #endif 32 | -------------------------------------------------------------------------------- /libSC/fs/libsrc/_delete.c: -------------------------------------------------------------------------------- 1 | /*ident "@(#)fs:libsrc/_delete.c 3.1" */ 2 | /****************************************************************************** 3 | * 4 | * C++ Standard Components, Release 3.0. 5 | * 6 | * Copyright (c) 1991, 1992 AT&T and Unix System Laboratories, Inc. 7 | * Copyright (c) 1988, 1989, 1990 AT&T. All Rights Reserved. 8 | * 9 | * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T and Unix System 10 | * Laboratories, Inc. The copyright notice above does not evidence 11 | * any actual or intended publication of such source code. 12 | * 13 | ******************************************************************************/ 14 | 15 | #include 16 | #include 17 | #include "fslib.h" 18 | 19 | typedef void (*PFVV)(); 20 | extern PFVV _new_handler; 21 | 22 | /* Deregister it, then delete it. 23 | */ 24 | extern void operator delete(void *p) 25 | { 26 | _fs_unregister_ATTLC(0, 0, p); 27 | _delete(p); 28 | } 29 | 30 | /* This is `lib/new/_delete.c`operator delete 31 | */ 32 | extern void _delete(void *p) 33 | { 34 | if (p) free((char*)p); 35 | } 36 | 37 | -------------------------------------------------------------------------------- /libSC/fs/libsrc/placenew.c: -------------------------------------------------------------------------------- 1 | /*ident "@(#)fs:libsrc/placenew.c 3.1" */ 2 | /****************************************************************************** 3 | * 4 | * C++ Standard Components, Release 3.0. 5 | * 6 | * Copyright (c) 1991, 1992 AT&T and Unix System Laboratories, Inc. 7 | * Copyright (c) 1988, 1989, 1990 AT&T. All Rights Reserved. 8 | * 9 | * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T and Unix System 10 | * Laboratories, Inc. The copyright notice above does not evidence 11 | * any actual or intended publication of such source code. 12 | * 13 | ******************************************************************************/ 14 | 15 | #ifndef __GNUG__ 16 | #include 17 | #endif 18 | #include "fslib.h" 19 | 20 | void* operator new (size_t size, void* p) 21 | { 22 | _fs_register_ATTLC(0, "?", -1, "?", size, -2, p); 23 | return p; 24 | } 25 | -------------------------------------------------------------------------------- /libSC/hier/README: -------------------------------------------------------------------------------- 1 | 2 | Hi! 3 | 4 | This is a tool for producing drawings of the class inheritance 5 | hierarchies in C++ programs. I hope you like it. 6 | 7 | You should have gotten a letter explaining how to build this tool. 8 | In case you didn't, just look in the file "Theletter". 9 | 10 | Good luck! 11 | martin carroll 12 | carroll@mozart.att.com 13 | 14 | ------------------------- 15 | 10/3/89 16 | New flags: -m, -c, -s, -u, -t. 17 | Reimplemented using my nifty OO lexer. 18 | Random fixes and improvements. 19 | 20 | 21 | -------------------------------------------------------------------------------- /libSC/hier/Token.c: -------------------------------------------------------------------------------- 1 | /*ident "@(#)hier:Token.c 3.1" */ 2 | /****************************************************************************** 3 | * 4 | * C++ Standard Components, Release 3.0. 5 | * 6 | * Copyright (c) 1991, 1992 AT&T and Unix System Laboratories, Inc. 7 | * Copyright (c) 1988, 1989, 1990 AT&T. All Rights Reserved. 8 | * 9 | * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T and Unix System 10 | * Laboratories, Inc. The copyright notice above does not evidence 11 | * any actual or intended publication of such source code. 12 | * 13 | ******************************************************************************/ 14 | 15 | #include "Token.h" 16 | -------------------------------------------------------------------------------- /libSC/hier/Token.h: -------------------------------------------------------------------------------- 1 | /*ident "@(#)hier:Token.h 3.1" */ 2 | /****************************************************************************** 3 | * 4 | * C++ Standard Components, Release 3.0. 5 | * 6 | * Copyright (c) 1991, 1992 AT&T and Unix System Laboratories, Inc. 7 | * Copyright (c) 1988, 1989, 1990 AT&T. All Rights Reserved. 8 | * 9 | * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T and Unix System 10 | * Laboratories, Inc. The copyright notice above does not evidence 11 | * any actual or intended publication of such source code. 12 | * 13 | ******************************************************************************/ 14 | 15 | #ifndef HIERTOKEN_H 16 | #define HIERTOKEN_H 17 | 18 | #include "TokenType.h" 19 | #include 20 | 21 | class Token 22 | { 23 | public: 24 | // Token(): lexeme(Stringsize(20)), ws(Stringsize(50)) {} 25 | // ~Token() {} 26 | String ws; // whitespace preceding lexeme. 27 | int lineno; // line number of first character of lexeme. 28 | String lexeme; 29 | TokenType type; 30 | }; 31 | 32 | ostream &operator<<(ostream &oo, const Token &t); 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /libSC/ipc/demos/assert.h: -------------------------------------------------------------------------------- 1 | /*ident "@(#)cls4:incl-master/proto-headers/assert.h 1.1" */ 2 | /* This header file intentionally has no wrapper, since the user 3 | * may want to re-include it to turn off/on assertions for only 4 | * a portion of the source file. 5 | */ 6 | 7 | 8 | #ifdef assert 9 | #undef assert 10 | #endif 11 | #ifdef _assert 12 | #undef _assert 13 | #endif 14 | 15 | #ifdef NDEBUG 16 | 17 | #define assert(e) ((void)0) 18 | 19 | #else 20 | 21 | #ifndef __STDIO_H 22 | #include 23 | #endif 24 | 25 | #ifndef __STDLIB_H 26 | #include 27 | #endif 28 | 29 | #if defined(__STDC__) 30 | #define assert(EX) (void)((EX) || (fprintf(stderr,"Assertion failed: " # EX ", file \"%s\", line %d\n", __FILE__, __LINE__), abort(), 0)) 31 | #else 32 | #define assert(EX) (void)((EX) || (fprintf(stderr,"Assertion failed: EX file \"%s\", line %d\n", __FILE__, __LINE__), abort(), 0)) 33 | #endif 34 | #endif 35 | 36 | #define _assert(e) assert(e) 37 | 38 | -------------------------------------------------------------------------------- /libSC/ipc/demos/makefile: -------------------------------------------------------------------------------- 1 | #ident "@(#)ipc:demos/makefile 3.1" 2 | ############################################################################### 3 | # 4 | # C++ Standard Components, Release 3.0. 5 | # 6 | # Copyright (c) 1991, 1992 AT&T and Unix System Laboratories, Inc. 7 | # Copyright (c) 1988, 1989, 1990 AT&T. All Rights Reserved. 8 | # 9 | # THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T and Unix System 10 | # Laboratories, Inc. The copyright notice above does not evidence 11 | # any actual or intended publication of such source code. 12 | # 13 | ############################################################################### 14 | 15 | include $(SLELIB)/demorules 16 | 17 | all: 18 | $(SHELL) $(SLEBIN)/regress 19 | 20 | clean: 21 | rm -rf *.ii *.o *.r *.E core ptrepository .variant 22 | -------------------------------------------------------------------------------- /libSC/ipc/demos/testipc.V: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mingodad/cfront-3/93109c04c214cbe5c941cad6c71f335c2cd25e03/libSC/ipc/demos/testipc.V -------------------------------------------------------------------------------- /libSC/publik/README: -------------------------------------------------------------------------------- 1 | 2 | Hi! 3 | 4 | This is a tool for viewing the public interfaces of class definitions 5 | in C++ source code. I hope you find it comes in handy. 6 | 7 | You should have gotten a letter explaining how to build this tool. 8 | In case you didn't, just look in the file "Theletter". 9 | 10 | Good luck! 11 | martin carroll 12 | carroll@mozart.att.com 13 | -------------------------------------------------------------------------------- /libSC/publik/Token.c: -------------------------------------------------------------------------------- 1 | /*ident "@(#)publik:Token.c 3.1" */ 2 | /****************************************************************************** 3 | * 4 | * C++ Standard Components, Release 3.0. 5 | * 6 | * Copyright (c) 1991, 1992 AT&T and Unix System Laboratories, Inc. 7 | * Copyright (c) 1988, 1989, 1990 AT&T. All Rights Reserved. 8 | * 9 | * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T and Unix System 10 | * Laboratories, Inc. The copyright notice above does not evidence 11 | * any actual or intended publication of such source code. 12 | * 13 | ******************************************************************************/ 14 | 15 | #include "Token.h" 16 | -------------------------------------------------------------------------------- /libSC/publik/Token.h: -------------------------------------------------------------------------------- 1 | /*ident "@(#)publik:Token.h 3.1" */ 2 | /****************************************************************************** 3 | * 4 | * C++ Standard Components, Release 3.0. 5 | * 6 | * Copyright (c) 1991, 1992 AT&T and Unix System Laboratories, Inc. 7 | * Copyright (c) 1988, 1989, 1990 AT&T. All Rights Reserved. 8 | * 9 | * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T and Unix System 10 | * Laboratories, Inc. The copyright notice above does not evidence 11 | * any actual or intended publication of such source code. 12 | * 13 | ******************************************************************************/ 14 | 15 | #ifndef _TOKEN_H 16 | #define _TOKEN_H 17 | 18 | #include "TokenType.h" 19 | #include 20 | 21 | class Token 22 | { 23 | public: 24 | // Token(): lexeme(Stringsize(20)), ws(Stringsize(50)) {} 25 | // ~Token() {} 26 | String ws; // whitespace preceding lexeme. 27 | int lineno; // line number of first character of lexeme. 28 | String lexeme; 29 | TokenType type; 30 | }; 31 | 32 | ostream &operator<<(ostream &oo, const Token &t); 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /libSC/publik/pub-script: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # reads stdin, or list of files and writes to stdout 3 | # the public section of any class declarations found 4 | # Assumes the declarations look like 5 | # 6 | # class name ... { 7 | # ... 8 | # }; 9 | # 10 | awk ' 11 | BEGIN {FS = " "; RS = "\n"; 12 | # if(tb == "")tb = "\t"; # bad tab hack. (e.g. Our project uses tabstop=2) 13 | in_code = 0; # in the header file code flag 14 | in_public = 0; # in the public section flag; 15 | } 16 | 17 | # hack tabs 18 | #/\t/ {gsub(/\t/, tb, $0)} 19 | 20 | # get the class name, assume begins with "class foo {" 21 | /^class.*{/ {print; in_code = 1; in_public = 0; next;} 22 | 23 | # assume class declaration ends in "};" 24 | in_code == 1 && /^};/ {print; in_code = 0;} 25 | 26 | in_code == 1 && /public:/ {in_public = 1;} 27 | in_code == 1 && /protected:/ {in_public = 0;} 28 | in_code == 1 && /private:/ {in_public = 0;} 29 | 30 | 31 | in_public == 1 && in_code == 1 {print;} 32 | 33 | END { 34 | }' $* 35 | 36 | -------------------------------------------------------------------------------- /libSC/special/Block.dummy2: -------------------------------------------------------------------------------- 1 | /*ident "@(#)Block:incl/Block.c 3.1" */ 2 | /****************************************************************************** 3 | * 4 | * C++ Standard Components, Release 3.0. 5 | * 6 | * Copyright (c) 1991, 1992 AT&T and Unix System Laboratories, Inc. 7 | * Copyright (c) 1988, 1989, 1990 AT&T. All Rights Reserved. 8 | * 9 | * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T and Unix System 10 | * Laboratories, Inc. The copyright notice above does not evidence 11 | * any actual or intended publication of such source code. 12 | * 13 | ******************************************************************************/ 14 | 15 | #include 16 | #include 17 | #include 18 | 19 | ostream& operator<<(ostream& os, const Block& b) 20 | { 21 | os << '['; 22 | 23 | if ( b.n > 0 ) 24 | os << b.p[0]; 25 | 26 | #ifdef __GNUG__ 27 | int i; 28 | for ( i=1 ; i 16 | #include 17 | #include 18 | #include 19 | 20 | ostream &operator<<(ostream& os, const Map& m) { 21 | Mapiter mi(m); 22 | os << '{'; 23 | while (++mi) { 24 | os << "[ " << mi.curr()->key << ' ' 25 | << mi.curr()->value << " ]"; 26 | } 27 | os << '}'; 28 | return os; 29 | } 30 | -------------------------------------------------------------------------------- /libSC/special/set.dummy3: -------------------------------------------------------------------------------- 1 | /*ident "@(#)Set:incl/set.c 3.1" */ 2 | /****************************************************************************** 3 | * 4 | * C++ Standard Components, Release 3.0. 5 | * 6 | * Copyright (c) 1991, 1992 AT&T and Unix System Laboratories, Inc. 7 | * Copyright (c) 1988, 1989, 1990 AT&T. All Rights Reserved. 8 | * 9 | * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T and Unix System 10 | * Laboratories, Inc. The copyright notice above does not evidence 11 | * any actual or intended publication of such source code. 12 | * 13 | ******************************************************************************/ 14 | 15 | #include 16 | #include 17 | #include 18 | 19 | #ifndef __GNUG__ 20 | ostream& 21 | Set::print(ostream& os) const 22 | { 23 | os << "{"; 24 | Setiter it(*this); 25 | const TYPE* tp; 26 | int first=1; 27 | 28 | while( tp = it.next() ) { 29 | if ( first ) 30 | first=0; 31 | else 32 | os << ","; 33 | 34 | os << *tp; 35 | } 36 | os << "}"; 37 | return os; 38 | } 39 | #endif 40 | -------------------------------------------------------------------------------- /libSC/special/setofp.dummy2: -------------------------------------------------------------------------------- 1 | /*ident "@(#)Set:incl/set_of_p.c 3.1" */ 2 | /****************************************************************************** 3 | * 4 | * C++ Standard Components, Release 3.0. 5 | * 6 | * Copyright (c) 1991, 1992 AT&T and Unix System Laboratories, Inc. 7 | * Copyright (c) 1988, 1989, 1990 AT&T. All Rights Reserved. 8 | * 9 | * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T and Unix System 10 | * Laboratories, Inc. The copyright notice above does not evidence 11 | * any actual or intended publication of such source code. 12 | * 13 | ******************************************************************************/ 14 | 15 | #include 16 | #include 17 | #include 18 | 19 | #ifndef __GNUG__ 20 | ostream& 21 | Set_of_p::print(ostream& os) const 22 | { 23 | os << "{"; 24 | Set_of_piter it(*this); 25 | TYPE* p; 26 | int first=1; 27 | 28 | while ( p = it.next() ) { 29 | if ( first ) 30 | first=0; 31 | else 32 | os << ","; 33 | 34 | os << *p; 35 | } 36 | os << "}"; 37 | return os; 38 | } 39 | #endif 40 | -------------------------------------------------------------------------------- /man/man3/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mingodad/cfront-3/93109c04c214cbe5c941cad6c71f335c2cd25e03/man/man3/.keep -------------------------------------------------------------------------------- /man/man4/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mingodad/cfront-3/93109c04c214cbe5c941cad6c71f335c2cd25e03/man/man4/.keep -------------------------------------------------------------------------------- /mk-mingw32.sh: -------------------------------------------------------------------------------- 1 | CFRONTC="wine $PWD/cfront.exe" 2 | EXEWRAPPER="wine" 3 | EXEEXT=".exe" 4 | CCOMP="i686-w64-mingw32-gcc -D_MSC_VER=1" 5 | CXX='i686-w64-mingw32-g++ -fno-rtti -fno-exceptions' 6 | CFRONTC="$CFRONTC" \ 7 | EXEWRAPPER="$EXEWRAPPER" \ 8 | EXEEXT="$EXEEXT" \ 9 | CCOMP="$CCOMP" \ 10 | CXX="$CXX" \ 11 | make CCOMP="$CCOMP" CXX="$CXX" $* 12 | 13 | -------------------------------------------------------------------------------- /mk-mingw64.sh: -------------------------------------------------------------------------------- 1 | CFRONTC="wine $PWD/cfront.exe" 2 | EXEWRAPPER="wine" 3 | EXEEXT=".exe" 4 | CCOMP="x86_64-w64-mingw32-gcc -D_MSC_VER=1" 5 | CXX='x86_64-w64-mingw32-g++ -fno-rtti -fno-exceptions' 6 | CFRONTC="$CFRONTC" \ 7 | EXEWRAPPER="$EXEWRAPPER" \ 8 | EXEEXT="$EXEEXT" \ 9 | CCOMP="$CCOMP" \ 10 | CXX="$CXX" \ 11 | make CCOMP="$CCOMP" CXX="$CXX" $* 12 | 13 | -------------------------------------------------------------------------------- /scratch/bsd.sed: -------------------------------------------------------------------------------- 1 | #ident "@(#)cfront:scratch/bsd.sed 1.6" 2 | echo "Fixing _iobuf structures:" 3 | for f in */*..c 4 | do 5 | echo $f 6 | sed -e '/__iobuf__base/s//&; int __iobuf__bufsiz/' \ 7 | -e '/_ctype/s//_ctype_/g' $f > temp$$ 8 | mv temp$$ $f 9 | done 10 | echo "Before running \"make scratch\", you should set the" 11 | echo "CCFLAGS and BSD macros in the makefile. See the README for" 12 | echo "details." 13 | -------------------------------------------------------------------------------- /scratch/lib/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mingodad/cfront-3/93109c04c214cbe5c941cad6c71f335c2cd25e03/scratch/lib/.keep -------------------------------------------------------------------------------- /scratch/mnch/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mingodad/cfront-3/93109c04c214cbe5c941cad6c71f335c2cd25e03/scratch/mnch/.keep -------------------------------------------------------------------------------- /scratch/src/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mingodad/cfront-3/93109c04c214cbe5c941cad6c71f335c2cd25e03/scratch/src/.keep -------------------------------------------------------------------------------- /src/_stdio.c: -------------------------------------------------------------------------------- 1 | /* stdio.c */ 2 | 3 | #include 4 | #include 5 | 6 | FILE* _get_stdin() 7 | { 8 | return stdin; 9 | } 10 | 11 | FILE* _get_stdout() 12 | { 13 | return stdout; 14 | } 15 | 16 | FILE* _get_stderr() 17 | { 18 | return stderr; 19 | } 20 | #if !defined(WIN32) 21 | int* _get_errno() 22 | { 23 | return &errno; 24 | } 25 | #endif 26 | -------------------------------------------------------------------------------- /tmpdir/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mingodad/cfront-3/93109c04c214cbe5c941cad6c71f335c2cd25e03/tmpdir/.keep -------------------------------------------------------------------------------- /tools/tests/README: -------------------------------------------------------------------------------- 1 | This directory is for a template tests extracted from 2 | the tools/pt/testsc. 3 | --------------------------------------------------------------------------------