From 0390c34e88e9512b81ce35a9ba36d137d1c80c44 Mon Sep 17 00:00:00 2001 From: Greg King Date: Mon, 30 Jun 2014 05:10:35 -0400 Subject: [PATCH] Changed multi-line C comments into another style. The left side doesn't look unbalanced. --- include/6502.h | 20 +- include/_6522.h | 8 +- include/_6525.h | 6 +- include/_6526.h | 8 +- include/_heap.h | 24 +- include/_vic2.h | 4 +- include/apple2.h | 54 +- include/apple2enh.h | 8 +- include/c128.h | 12 +- include/cbm.h | 98 ++-- include/cbm610.h | 6 +- include/cbm_filetype.h | 18 +- include/cc65.h | 28 +- include/conio.h | 64 +-- include/ctype.h | 12 +- include/dbg.h | 80 +-- include/dio.h | 8 +- include/em.h | 48 +- include/em/em-kernel.h | 6 +- include/errno.h | 16 +- include/inttypes.h | 6 +- include/joystick.h | 4 +- include/joystick/joy-kernel.h | 7 +- include/modload.h | 44 +- include/mouse.h | 70 +-- include/o65.h | 12 +- include/pen.h | 22 +- include/pet.h | 8 +- include/serial.h | 18 +- include/stdint.h | 4 +- include/stdlib.h | 14 +- include/string.h | 4 +- include/supervision.h | 6 +- include/sys/utsname.h | 50 +- include/tgi.h | 122 ++--- include/tgi/tgi-vectorfont.h | 4 +- include/time.h | 13 +- libsrc/apple2/systime.s | 8 +- libsrc/atari/exetrailer.s | 2 +- libsrc/atari/system_check.s | 2 +- libsrc/atari/systime.s | 8 +- libsrc/atari/targetutil/w2cas.c | 16 +- libsrc/atmos/systime.s | 8 +- libsrc/c128/fast.s | 4 +- libsrc/c128/systime.s | 8 +- libsrc/c16/systime.s | 8 +- libsrc/c64/systime.s | 8 +- libsrc/cbm/cbm_load.c | 21 +- libsrc/cbm/cbm_open.s | 6 +- libsrc/cbm/cbm_read.s | 15 +- libsrc/cbm/cbm_save.c | 16 +- libsrc/cbm/dir.h | 18 +- libsrc/cbm/dir.s | 12 +- libsrc/cbm/opendir.c | 8 +- libsrc/cbm/readdir.c | 10 +- libsrc/cbm/seekdir.c | 4 +- libsrc/cbm510/systime.s | 8 +- libsrc/cbm610/systime.s | 8 +- libsrc/common/_afailed.c | 8 +- libsrc/common/_file.h | 10 +- libsrc/common/_hextab.c | 10 +- libsrc/common/_longminstr.c | 14 +- libsrc/common/_printf.h | 16 +- libsrc/common/_scanf.c | 152 +++--- libsrc/common/_scanf.h | 20 +- libsrc/common/abort.c | 8 +- libsrc/common/bsearch.c | 14 +- libsrc/common/errno.s | 12 +- libsrc/common/errormsg.c | 11 +- libsrc/common/fdopen.c | 8 +- libsrc/common/fgetc.c | 10 +- libsrc/common/fgetpos.c | 8 +- libsrc/common/fgets.c | 8 +- libsrc/common/fputc.c | 8 +- libsrc/common/fputs.c | 8 +- libsrc/common/free.s | 32 +- libsrc/common/freopen.c | 12 +- libsrc/common/fscanf.s | 4 +- libsrc/common/fseek.c | 24 +- libsrc/common/fsetpos.c | 8 +- libsrc/common/ftell.c | 14 +- libsrc/common/getchar.c | 8 +- libsrc/common/getopt.c | 26 +- libsrc/common/gets.c | 8 +- libsrc/common/locale.c | 8 +- libsrc/common/localtime.c | 6 +- libsrc/common/malloc.s | 28 +- libsrc/common/mktime.c | 26 +- libsrc/common/pmemalign.c | 84 ++-- libsrc/common/puts.c | 8 +- libsrc/common/qsort.c | 14 +- libsrc/common/realloc.c | 17 +- libsrc/common/rewind.c | 8 +- libsrc/common/sleep.c | 12 +- libsrc/common/sscanf.s | 4 +- libsrc/common/strqtok.c | 30 +- libsrc/common/strtok.c | 12 +- libsrc/common/strtol.c | 12 +- libsrc/common/strtoul.c | 12 +- libsrc/common/strxfrm.c | 8 +- libsrc/common/system.c | 10 +- libsrc/common/vfscanf.s | 6 +- libsrc/common/vsscanf.s | 8 +- libsrc/dbg/dbg.c | 34 +- libsrc/em/em-kernel.s | 4 +- libsrc/em/em_commit.s | 10 +- libsrc/em/em_map.s | 4 +- libsrc/em/em_use.s | 12 +- libsrc/geos-common/common/_afailed.c | 8 +- libsrc/geos-common/common/_poserror.c | 8 +- libsrc/geos-common/common/abort.c | 8 +- libsrc/geos-common/common/perror.c | 8 +- libsrc/geos-common/common/sleep.c | 10 +- libsrc/geos-common/dlgbox/messagebox.c | 11 +- libsrc/geos-common/system/systime.c | 8 +- libsrc/joystick/joy-kernel.s | 4 +- libsrc/mouse/mouse_buttons.s | 4 +- libsrc/mouse/mouse_hide.s | 6 +- libsrc/mouse/mouse_ioctl.s | 4 +- libsrc/mouse/mouse_move.s | 8 +- libsrc/mouse/mouse_setbox.s | 26 +- libsrc/plus4/systime.s | 8 +- libsrc/serial/ser-kernel.s | 4 +- libsrc/serial/ser_get.s | 4 +- libsrc/serial/ser_put.s | 6 +- libsrc/tgi/tgi-kernel.s | 4 +- libsrc/tgi/tgi_arc.c | 8 +- libsrc/tgi/tgi_ellipse.s | 4 +- libsrc/tgi/tgi_getaspectratio.s | 4 +- libsrc/tgi/tgi_getdefpalette.s | 4 +- libsrc/tgi/tgi_geterror.s | 4 +- libsrc/tgi/tgi_getmaxcolor.s | 4 +- libsrc/tgi/tgi_getmaxx.s | 4 +- libsrc/tgi/tgi_getmaxy.s | 4 +- libsrc/tgi/tgi_getpalette.s | 4 +- libsrc/tgi/tgi_gettextheight.s | 4 +- libsrc/tgi/tgi_gettextwidth.s | 4 +- libsrc/tgi/tgi_install_vectorfont.s | 6 +- libsrc/tgi/tgi_ioctl.s | 6 +- libsrc/tgi/tgi_lineto.s | 4 +- libsrc/tgi/tgi_load_vectorfont.c | 18 +- libsrc/tgi/tgi_pieslice.c | 8 +- libsrc/tgi/tgi_setaspectratio.s | 4 +- libsrc/tgi/tgi_setpalette.s | 4 +- libsrc/tgi/tgi_settextdir.s | 4 +- libsrc/tgi/tgi_settextstyle.s | 12 +- libsrc/tgi/tgi_vectorchar.s | 4 +- libsrc/zlib/uncompress.c | 8 +- samples/enumdevdir.c | 36 +- samples/fire.c | 22 +- samples/geos/bitmap-demo.c | 16 +- samples/geos/dialog.c | 6 +- samples/geos/grphstr.c | 6 +- samples/geos/inittab.c | 6 +- samples/geos/menu.c | 6 +- samples/geos/overlay-demo.c | 46 +- samples/gunzip65.c | 116 ++--- samples/hello.c | 10 +- samples/mandelbrot.c | 10 +- samples/multidemo.c | 52 +- samples/nachtm.c | 56 +-- samples/overlaydemo.c | 50 +- samples/plasma.c | 28 +- samples/sieve.c | 4 +- src/ar65/exports.c | 4 +- src/ar65/exports.h | 4 +- src/ar65/fileio.c | 14 +- src/ar65/library.c | 24 +- src/ar65/library.h | 14 +- src/ar65/objdata.c | 4 +- src/ar65/objdata.h | 4 +- src/ar65/objfile.c | 32 +- src/ar65/objfile.h | 4 +- src/ca65/anonname.c | 6 +- src/ca65/anonname.h | 6 +- src/ca65/condasm.c | 32 +- src/ca65/condasm.h | 10 +- src/ca65/dbginfo.c | 24 +- src/ca65/ea65.c | 12 +- src/ca65/easw16.c | 10 +- src/ca65/error.c | 8 +- src/ca65/expr.c | 144 +++--- src/ca65/expr.h | 42 +- src/ca65/feature.c | 10 +- src/ca65/feature.h | 10 +- src/ca65/filetab.c | 26 +- src/ca65/filetab.h | 8 +- src/ca65/fragment.c | 4 +- src/ca65/fragment.h | 4 +- src/ca65/instr.c | 152 +++--- src/ca65/instr.h | 18 +- src/ca65/istack.c | 14 +- src/ca65/istack.h | 8 +- src/ca65/lineinfo.c | 54 +- src/ca65/lineinfo.h | 20 +- src/ca65/listing.c | 44 +- src/ca65/macro.c | 110 ++--- src/ca65/macro.h | 16 +- src/ca65/main.c | 58 +-- src/ca65/nexttok.c | 120 ++--- src/ca65/nexttok.h | 14 +- src/ca65/objfile.c | 28 +- src/ca65/pseudo.c | 82 +-- src/ca65/repeat.c | 12 +- src/ca65/scanner.c | 114 ++--- src/ca65/scanner.h | 18 +- src/ca65/segment.c | 52 +- src/ca65/segment.h | 14 +- src/ca65/sizeof.c | 26 +- src/ca65/sizeof.h | 22 +- src/ca65/span.c | 54 +- src/ca65/span.h | 12 +- src/ca65/struct.c | 20 +- src/ca65/studyexpr.c | 112 ++--- src/ca65/symbol.c | 52 +- src/ca65/symbol.h | 24 +- src/ca65/symentry.c | 160 +++--- src/ca65/symentry.h | 74 +-- src/ca65/symtab.c | 146 +++--- src/ca65/symtab.h | 26 +- src/ca65/token.c | 4 +- src/ca65/token.h | 4 +- src/ca65/toklist.c | 26 +- src/ca65/toklist.h | 12 +- src/ca65/ulabel.c | 38 +- src/ca65/ulabel.h | 20 +- src/cc65/anonname.c | 4 +- src/cc65/anonname.h | 4 +- src/cc65/asmcode.c | 4 +- src/cc65/asmcode.h | 4 +- src/cc65/asmlabel.c | 6 +- src/cc65/asmlabel.h | 6 +- src/cc65/asmstmt.c | 44 +- src/cc65/asmstmt.h | 6 +- src/cc65/assignment.c | 36 +- src/cc65/casenode.c | 20 +- src/cc65/casenode.h | 12 +- src/cc65/codeent.c | 62 +-- src/cc65/codeent.h | 36 +- src/cc65/codegen.c | 338 ++++++------- src/cc65/codegen.h | 48 +- src/cc65/codeinfo.c | 106 ++-- src/cc65/codeinfo.h | 30 +- src/cc65/codelab.c | 4 +- src/cc65/codelab.h | 4 +- src/cc65/codeopt.c | 132 ++--- src/cc65/codeseg.c | 368 +++++++------- src/cc65/codeseg.h | 118 ++--- src/cc65/compile.c | 44 +- src/cc65/coptadd.c | 170 +++---- src/cc65/coptadd.h | 164 +++--- src/cc65/coptc02.c | 10 +- src/cc65/coptcmp.c | 302 ++++++------ src/cc65/coptcmp.h | 158 +++--- src/cc65/coptind.c | 426 ++++++++-------- src/cc65/coptind.h | 100 ++-- src/cc65/coptneg.c | 154 +++--- src/cc65/coptneg.h | 156 +++--- src/cc65/coptptrload.c | 579 +++++++++++----------- src/cc65/coptptrload.h | 530 ++++++++++---------- src/cc65/coptptrstore.c | 333 +++++++------ src/cc65/coptptrstore.h | 227 +++++---- src/cc65/coptpush.c | 39 +- src/cc65/coptpush.h | 41 +- src/cc65/coptshift.c | 158 +++--- src/cc65/coptshift.h | 98 ++-- src/cc65/coptsize.c | 46 +- src/cc65/coptsize.h | 12 +- src/cc65/coptstop.c | 264 +++++----- src/cc65/coptstore.c | 86 ++-- src/cc65/coptstore.h | 82 +-- src/cc65/coptsub.c | 58 +-- src/cc65/coptsub.h | 52 +- src/cc65/copttest.c | 41 +- src/cc65/copttest.h | 41 +- src/cc65/datatype.c | 60 +-- src/cc65/datatype.h | 52 +- src/cc65/declare.c | 284 +++++------ src/cc65/declare.h | 10 +- src/cc65/declattr.c | 8 +- src/cc65/error.c | 4 +- src/cc65/error.h | 4 +- src/cc65/expr.c | 658 ++++++++++++------------- src/cc65/expr.h | 58 +-- src/cc65/exprdesc.c | 28 +- src/cc65/exprdesc.h | 32 +- src/cc65/function.c | 76 +-- src/cc65/function.h | 18 +- src/cc65/hexval.c | 4 +- src/cc65/hexval.h | 4 +- src/cc65/input.c | 86 ++-- src/cc65/input.h | 14 +- src/cc65/lineinfo.c | 18 +- src/cc65/lineinfo.h | 12 +- src/cc65/litpool.c | 32 +- src/cc65/litpool.h | 12 +- src/cc65/loadexpr.c | 22 +- src/cc65/locals.c | 106 ++-- src/cc65/locals.h | 6 +- src/cc65/macrotab.c | 24 +- src/cc65/macrotab.h | 20 +- src/cc65/main.c | 22 +- src/cc65/opcodes.c | 26 +- src/cc65/opcodes.h | 18 +- src/cc65/output.c | 12 +- src/cc65/output.h | 14 +- src/cc65/pragma.c | 42 +- src/cc65/preproc.c | 140 +++--- src/cc65/reginfo.c | 8 +- src/cc65/reginfo.h | 8 +- src/cc65/scanner.c | 92 ++-- src/cc65/scanner.h | 14 +- src/cc65/scanstrbuf.c | 30 +- src/cc65/scanstrbuf.h | 26 +- src/cc65/segments.c | 8 +- src/cc65/shiftexpr.c | 22 +- src/cc65/standard.c | 6 +- src/cc65/standard.h | 6 +- src/cc65/stdfunc.c | 232 ++++----- src/cc65/stdfunc.h | 6 +- src/cc65/stmt.c | 90 ++-- src/cc65/stmt.h | 14 +- src/cc65/swstmt.c | 44 +- src/cc65/symentry.c | 4 +- src/cc65/symentry.h | 4 +- src/cc65/symtab.c | 42 +- src/cc65/testexpr.c | 14 +- src/cc65/testexpr.h | 16 +- src/cc65/textseg.c | 4 +- src/cc65/textseg.h | 4 +- src/cc65/typecmp.c | 72 +-- src/cc65/typeconv.c | 58 +-- src/cc65/typeconv.h | 6 +- src/cc65/util.c | 6 +- src/cc65/util.h | 6 +- src/chrcvt/main.c | 225 ++++----- src/cl65/main.c | 100 ++-- src/co65/convert.c | 24 +- src/co65/model.c | 6 +- src/co65/model.h | 6 +- src/co65/o65.c | 30 +- src/co65/o65.h | 24 +- src/common/abend.c | 4 +- src/common/abend.h | 4 +- src/common/addrsize.c | 4 +- src/common/addrsize.h | 4 +- src/common/alignment.c | 20 +- src/common/alignment.h | 12 +- src/common/cddefs.h | 10 +- src/common/chartype.c | 16 +- src/common/chartype.h | 16 +- src/common/check.h | 6 +- src/common/cmdline.c | 28 +- src/common/cmdline.h | 10 +- src/common/coll.c | 78 +-- src/common/coll.h | 84 ++-- src/common/cpu.c | 4 +- src/common/cpu.h | 4 +- src/common/fileid.c | 8 +- src/common/fileid.h | 12 +- src/common/filepos.c | 6 +- src/common/filepos.h | 6 +- src/common/filestat.c | 34 +- src/common/filestat.h | 14 +- src/common/filetime.c | 34 +- src/common/filetime.h | 16 +- src/common/filetype.c | 4 +- src/common/filetype.h | 6 +- src/common/fname.c | 14 +- src/common/fname.h | 14 +- src/common/fp.c | 14 +- src/common/fp.h | 19 +- src/common/gentype.c | 20 +- src/common/gentype.h | 46 +- src/common/hashfunc.c | 8 +- src/common/hashtab.c | 32 +- src/common/hashtab.h | 34 +- src/common/hlldbgsym.h | 8 +- src/common/inttypes.h | 14 +- src/common/matchpat.c | 20 +- src/common/matchpat.h | 10 +- src/common/mmodel.c | 6 +- src/common/mmodel.h | 6 +- src/common/searchpath.c | 24 +- src/common/searchpath.h | 24 +- src/common/shift.c | 22 +- src/common/shift.h | 22 +- src/common/strbuf.c | 62 +-- src/common/strbuf.h | 68 +-- src/common/strpool.c | 36 +- src/common/strpool.h | 20 +- src/common/strutil.c | 8 +- src/common/strutil.h | 8 +- src/common/target.c | 8 +- src/common/target.h | 4 +- src/common/tgttrans.c | 12 +- src/common/tgttrans.h | 12 +- src/common/xsprintf.c | 62 +-- src/common/xsprintf.h | 24 +- src/da65/asminc.c | 4 +- src/da65/code.c | 12 +- src/da65/data.c | 20 +- src/da65/handler.c | 24 +- src/da65/labels.c | 54 +- src/da65/labels.h | 28 +- src/da65/main.c | 44 +- src/da65/opc6502x.c | 4 +- src/da65/output.c | 8 +- src/da65/output.h | 4 +- src/da65/segment.c | 4 +- src/dbginfo/dbginfo.c | 586 +++++++++++----------- src/dbginfo/dbginfo.h | 236 ++++----- src/dbginfo/dbgsh.c | 32 +- src/ld65/bin.c | 36 +- src/ld65/cfgexpr.c | 4 +- src/ld65/cfgexpr.h | 4 +- src/ld65/condes.c | 36 +- src/ld65/condes.h | 4 +- src/ld65/config.c | 162 +++--- src/ld65/config.h | 12 +- src/ld65/dbgfile.c | 12 +- src/ld65/dbgsyms.c | 38 +- src/ld65/exports.c | 92 ++-- src/ld65/exports.h | 34 +- src/ld65/expr.c | 58 +-- src/ld65/expr.h | 10 +- src/ld65/extsyms.c | 12 +- src/ld65/extsyms.h | 8 +- src/ld65/fileinfo.c | 24 +- src/ld65/fileio.c | 16 +- src/ld65/fileio.h | 6 +- src/ld65/fragment.c | 4 +- src/ld65/library.c | 72 +-- src/ld65/library.h | 16 +- src/ld65/lineinfo.c | 12 +- src/ld65/lineinfo.h | 14 +- src/ld65/main.c | 30 +- src/ld65/mapfile.c | 8 +- src/ld65/mapfile.h | 6 +- src/ld65/o65.c | 104 ++-- src/ld65/objdata.c | 18 +- src/ld65/objdata.h | 18 +- src/ld65/objfile.c | 14 +- src/ld65/scanner.h | 12 +- src/ld65/segments.c | 32 +- src/ld65/segments.h | 26 +- src/ld65/span.c | 12 +- src/ld65/span.h | 12 +- src/ld65/spool.c | 4 +- src/od65/dump.c | 14 +- src/od65/fileio.c | 4 +- src/sim65/6502.c | 8 +- src/sim65/6502.h | 4 +- src/sim65/memory.c | 6 +- src/sim65/memory.h | 6 +- src/sp65/attr.c | 46 +- src/sp65/attr.h | 42 +- src/sp65/bin.c | 8 +- src/sp65/bitmap.c | 18 +- src/sp65/bitmap.h | 26 +- src/sp65/c.c | 10 +- src/sp65/convert.c | 8 +- src/sp65/convert.h | 8 +- src/sp65/geosbitmap.c | 22 +- src/sp65/geosbitmap.h | 6 +- src/sp65/geosicon.c | 6 +- src/sp65/geosicon.h | 6 +- src/sp65/input.c | 6 +- src/sp65/input.h | 6 +- src/sp65/koala.c | 6 +- src/sp65/koala.h | 6 +- src/sp65/lynxsprite.c | 54 +- src/sp65/lynxsprite.h | 6 +- src/sp65/main.c | 8 +- src/sp65/output.c | 10 +- src/sp65/output.h | 10 +- src/sp65/pcx.c | 12 +- src/sp65/raw.c | 4 +- src/sp65/raw.h | 4 +- src/sp65/vic2sprite.c | 6 +- src/sp65/vic2sprite.h | 6 +- testcode/lib/atari/defdev.c | 8 +- testcode/lib/atari/mem.c | 8 +- testcode/lib/atari/ostype.c | 8 +- testcode/lib/atari/sys.c | 12 +- testcode/lib/clock.c | 8 +- testcode/lib/cprintf.c | 34 +- testcode/lib/cursor.c | 10 +- testcode/lib/deb.c | 10 +- testcode/lib/em-test.c | 4 +- testcode/lib/ft.c | 30 +- testcode/lib/getopt-test.c | 26 +- testcode/lib/heaptest.c | 4 +- testcode/lib/mul-test.c | 4 +- testcode/lib/scanf-test.c | 5 +- testcode/lib/seek.c | 4 +- testcode/lib/sprintf-test.c | 34 +- testcode/lib/strqtok-test.c | 64 +-- testcode/lib/strtol-test.c | 4 +- testcode/lib/strtoul-test.c | 4 +- testcode/lib/tinyshell.c | 6 +- util/zlib/deflater.c | 14 +- 502 files changed, 8869 insertions(+), 8884 deletions(-) diff --git a/include/6502.h b/include/6502.h index 706418516..6c104c83a 100644 --- a/include/6502.h +++ b/include/6502.h @@ -82,21 +82,21 @@ struct regs { #define F6502_C 0x01 /* C flag */ /* Function to call any machine language subroutine. All registers in the - * regs structure are passed into the routine and the results are passed - * out. The B flag is ignored on input. The called routine must end with - * an RTS. - */ +** regs structure are passed into the routine and the results are passed +** out. The B flag is ignored on input. The called routine must end with +** an RTS. +*/ void __fastcall__ _sys (struct regs* r); /* Set and reset the break vector. The given user function is called if - * a break occurs. The values of the registers may be read from the brk_... - * variables. The value in brk_pc will point to the address that contains - * the brk instruction. - * The set_brk function will install an exit handler that will reset the - * vector if the program ends. - */ +** a break occurs. The values of the registers may be read from the brk_... +** variables. The value in brk_pc will point to the address that contains +** the brk instruction. +** The set_brk function will install an exit handler that will reset the +** vector if the program ends. +*/ extern unsigned char brk_a; /* A register value */ extern unsigned char brk_x; /* X register value */ diff --git a/include/_6522.h b/include/_6522.h index 1072e6779..d6eedcf75 100644 --- a/include/_6522.h +++ b/include/_6522.h @@ -36,10 +36,10 @@ /* Define a structure with the 6522 register offsets. - * NOTE: The timer registers are not declared as 16 bit registers, because - * the order in which the two 8 bit halves are written is important, and - * the compiler doesn't guarantee any order when writing 16 bit values. - */ +** NOTE: The timer registers are not declared as 16 bit registers, because +** the order in which the two 8 bit halves are written is important, and +** the compiler doesn't guarantee any order when writing 16 bit values. +*/ struct __6522 { unsigned char prb; /* Port register B */ unsigned char pra; /* Port register A */ diff --git a/include/_6525.h b/include/_6525.h index dee0ba459..128839c83 100644 --- a/include/_6525.h +++ b/include/_6525.h @@ -39,9 +39,9 @@ /* Define a structure with the 6525 register offsets. The shadow registers - * (if port C is unused) are currently not implemented, we would need a - * union to do that, however that would introduce an additional name. - */ +** (if port C is unused) are currently not implemented, we would need a +** union to do that, however that would introduce an additional name. +*/ struct __6525 { unsigned char pra; /* Port register A */ unsigned char prb; /* Port register B */ diff --git a/include/_6526.h b/include/_6526.h index 5f8cb7d10..aa3158dc8 100644 --- a/include/_6526.h +++ b/include/_6526.h @@ -39,10 +39,10 @@ /* Define a structure with the 6526 register offsets. - * NOTE: The timer registers are not declared as 16 bit registers, because - * the order in which the two 8 bit halves are written is important, and - * the compiler doesn't guarantee any order when writing 16 bit values. - */ +** NOTE: The timer registers are not declared as 16 bit registers, because +** the order in which the two 8 bit halves are written is important, and +** the compiler doesn't guarantee any order when writing 16 bit values. +*/ struct __6526 { unsigned char pra; /* Port register A */ unsigned char prb; /* Port register B */ diff --git a/include/_heap.h b/include/_heap.h index 76bad35c3..c054cfa34 100644 --- a/include/_heap.h +++ b/include/_heap.h @@ -1,9 +1,9 @@ /* - * _heap.h - * - * Ullrich von Bassewitz, 1998-06-03, 2004-12-19 - * - */ +** _heap.h +** +** Ullrich von Bassewitz, 1998-06-03, 2004-12-19 +** +*/ @@ -12,11 +12,11 @@ -/* Structure that preceeds a user block in most cases. - * The aligned_malloc function may generate blocks where the start pointer - * and size are splitted to handle a memory hole that is needed for - * alignment. - */ +/* Structure that preceeds a user block in most cases. +** The aligned_malloc function may generate blocks where the start pointer +** and size are splitted to handle a memory hole that is needed for +** alignment. +*/ struct usedblock { unsigned size; struct usedblock* start; @@ -26,8 +26,8 @@ struct usedblock { #define HEAP_ADMIN_SPACE sizeof (struct usedblock) /* The data type used to implement the free list. - * Beware: Field order is significant! - */ +** Beware: Field order is significant! +*/ struct freeblock { unsigned size; struct freeblock* next; diff --git a/include/_vic2.h b/include/_vic2.h index 2031944bb..a28067b24 100644 --- a/include/_vic2.h +++ b/include/_vic2.h @@ -39,8 +39,8 @@ /* Define a structure with the vic register offsets. In cc65 mode, there - * are aliases for the field accessible as arrays. - */ +** are aliases for the field accessible as arrays. +*/ #if __CC65_STD__ == __CC65_STD_CC65__ struct __vic2 { union { diff --git a/include/apple2.h b/include/apple2.h index 310e697b1..a1b094d4d 100644 --- a/include/apple2.h +++ b/include/apple2.h @@ -109,23 +109,23 @@ extern unsigned char _dos_type; /* Valid _dos_type values: - * - * AppleDOS 3.3 - 0x00 - * ProDOS 8 1.0.1 - 0x10 - * ProDOS 8 1.0.2 - 0x10 - * ProDOS 8 1.1.1 - 0x11 - * ProDOS 8 1.2 - 0x12 - * ProDOS 8 1.3 - 0x13 - * ProDOS 8 1.4 - 0x14 - * ProDOS 8 1.5 - 0x15 - * ProDOS 8 1.6 - 0x16 - * ProDOS 8 1.7 - 0x17 - * ProDOS 8 1.8 - 0x18 - * ProDOS 8 1.9 - 0x18 (!) - * ProDOS 8 2.0.1 - 0x21 - * ProDOS 8 2.0.2 - 0x22 - * ProDOS 8 2.0.3 - 0x23 - */ +** +** AppleDOS 3.3 - 0x00 +** ProDOS 8 1.0.1 - 0x10 +** ProDOS 8 1.0.2 - 0x10 +** ProDOS 8 1.1.1 - 0x11 +** ProDOS 8 1.2 - 0x12 +** ProDOS 8 1.3 - 0x13 +** ProDOS 8 1.4 - 0x14 +** ProDOS 8 1.5 - 0x15 +** ProDOS 8 1.6 - 0x16 +** ProDOS 8 1.7 - 0x17 +** ProDOS 8 1.8 - 0x18 +** ProDOS 8 1.9 - 0x18 (!) +** ProDOS 8 2.0.1 - 0x21 +** ProDOS 8 2.0.2 - 0x22 +** ProDOS 8 2.0.3 - 0x23 +*/ @@ -136,9 +136,9 @@ extern unsigned char _dos_type; /* The file stream implementation and the POSIX I/O functions will use the - * following variables to determine the file type, aux type and creation time - * stamp to use. - */ +** following variables to determine the file type, aux type and creation time +** stamp to use. +*/ extern unsigned char _filetype; /* Default: 6 */ extern unsigned int _auxtype; /* Default: 0 */ extern struct { @@ -179,18 +179,18 @@ void rebootafterexit (void); #define ser_apple2_slot(num) ser_ioctl (0, (void*) (num)) /* Select a slot number from 1 to 7 prior to ser_open. - * The default slot number is 2. - */ +** The default slot number is 2. +*/ #define tgi_apple2_mix(onoff) tgi_ioctl (0, (void*) (onoff)) /* If onoff is 1, graphics/text mixed mode is enabled. - * If onoff is 0, graphics/text mixed mode is disabled. - */ +** If onoff is 0, graphics/text mixed mode is disabled. +*/ /* The following #defines will cause the matching functions calls in conio.h - * to be overlaid by macros with the same names, saving the function call - * overhead. - */ +** to be overlaid by macros with the same names, saving the function call +** overhead. +*/ #define _textcolor(color) COLOR_WHITE #define _bgcolor(color) COLOR_BLACK #define _bordercolor(color) COLOR_BLACK diff --git a/include/apple2enh.h b/include/apple2enh.h index 9fb093b45..cc62f70b7 100644 --- a/include/apple2enh.h +++ b/include/apple2enh.h @@ -109,8 +109,8 @@ extern void a2e_lo_tgi[]; void __fastcall__ textframe (unsigned char width, unsigned char height, unsigned char style); /* Output a frame on the text screen with the given width and height - * starting at the current cursor position and using the given style. - */ +** starting at the current cursor position and using the given style. +*/ void __fastcall__ textframexy (unsigned char x, unsigned char y, unsigned char width, unsigned char height, @@ -119,8 +119,8 @@ void __fastcall__ textframexy (unsigned char x, unsigned char y, unsigned __fastcall__ videomode (unsigned mode); /* Set the video mode, return the old mode. Call with one of the VIDEOMODE_xx - * constants. - */ +** constants. +*/ diff --git a/include/c128.h b/include/c128.h index b1ef88fa3..565fbc9ce 100644 --- a/include/c128.h +++ b/include/c128.h @@ -141,21 +141,21 @@ extern void c128_vdc2_tgi[]; unsigned __fastcall__ videomode (unsigned Mode); /* Set the video mode, return the old mode. Call with one of the VIDEOMODE_xx - * constants. - */ +** constants. +*/ void toggle_videomode (void); /* Toggle the video mode between 40 and 80 chars (calls SWAPPER). - * THIS FUNCTION IS DEPRECATED, please use videomode instead! - */ +** THIS FUNCTION IS DEPRECATED, please use videomode instead! +*/ void c64mode (void); /* Switch the C128 into C64 mode. Note: This function will not return! */ void fast (void); /* Switch the CPU into 2MHz mode. Note: This will disable video when in - * 40 column mode. - */ +** 40 column mode. +*/ void slow (void); /* Switch the CPU into 1MHz mode. */ diff --git a/include/cbm.h b/include/cbm.h index ed7397849..730b0b49e 100644 --- a/include/cbm.h +++ b/include/cbm.h @@ -82,8 +82,8 @@ /* The file stream implementation and the POSIX I/O functions will - * use the following variable to determine the file type to use. - */ +** use the following variable to determine the file type to use. +*/ extern char _filetype; /* Defaults to 's' */ @@ -162,10 +162,10 @@ unsigned char get_tv (void); /* Constants to use with cbm_open() for openning a file for reading or - * writing without the need to append ",r" or ",w" to the filename. - * - * e.g., cbm_open(2, 8, CBM_READ, "0:data,s"); - */ +** writing without the need to append ",r" or ",w" to the filename. +** +** e.g., cbm_open(2, 8, CBM_READ, "0:data,s"); +*/ #define CBM_READ 0 /* default is ",p" */ #define CBM_WRITE 1 /* ditto */ #define CBM_SEQ 2 /* default is ",r" -- or ",s" when writing */ @@ -202,79 +202,79 @@ void cbm_k_unlsn (void); /* The cbm_* I/O functions below set _oserror (see errno.h), - * in case of an error. - * - * error-code BASIC error - * ---------- ----------- - * 1 = too many files - * 2 = file open - * 3 = file not open - * 4 = file not found - * 5 = device not present - * 6 = not input-file - * 7 = not output-file - * 8 = missing file-name - * 9 = illegal device-number - * - * 10 = STOP-key pushed - * 11 = general I/O-error - */ +** in case of an error. +** +** error-code BASIC error +** ---------- ----------- +** 1 = too many files +** 2 = file open +** 3 = file not open +** 4 = file not found +** 5 = device not present +** 6 = not input-file +** 7 = not output-file +** 8 = missing file-name +** 9 = illegal device-number +** +** 10 = STOP-key pushed +** 11 = general I/O-error +*/ unsigned int cbm_load (const char* name, unsigned char device, void* data); /* Loads file "name", from given device, to given address -- or, to the load - * address of the file if "data" is the null pointer (like load"name",8,1 - * in BASIC). - * Returns number of bytes that were loaded if loading was successful; - * otherwise 0, "_oserror" contains an error-code, then (see table above). - */ +** address of the file if "data" is the null pointer (like load"name",8,1 +** in BASIC). +** Returns number of bytes that were loaded if loading was successful; +** otherwise 0, "_oserror" contains an error-code, then (see table above). +*/ unsigned char __fastcall__ cbm_save (const char* name, unsigned char device, const void* addr, unsigned int size); /* Saves "size" bytes, starting at "addr", to a file. - * Returns 0 if saving was successful, otherwise an error-code (see table - * above). - */ +** Returns 0 if saving was successful, otherwise an error-code (see table +** above). +*/ unsigned char __fastcall__ cbm_open (unsigned char lfn, unsigned char device, unsigned char sec_addr, const char* name); /* Opens a file. Works just like the BASIC command. - * Returns 0 if openning was successful, otherwise an error-code (see table - * above). - */ +** Returns 0 if openning was successful, otherwise an error-code (see table +** above). +*/ void __fastcall__ cbm_close (unsigned char lfn); /* Closes a file */ int __fastcall__ cbm_read (unsigned char lfn, void* buffer, unsigned int size); /* Reads up to "size" bytes from a file into "buffer". - * Returns the number of actually-read bytes, 0 if there are no bytes left. - * -1 in case of an error; then, _oserror contains an error-code (see table - * above). (Remember: 0 means end-of-file; -1 means error.) - */ +** Returns the number of actually-read bytes, 0 if there are no bytes left. +** -1 in case of an error; then, _oserror contains an error-code (see table +** above). (Remember: 0 means end-of-file; -1 means error.) +*/ int __fastcall__ cbm_write (unsigned char lfn, const void* buffer, unsigned int size); /* Writes up to "size" bytes from "buffer" to a file. - * Returns the number of actually-written bytes, or -1 in case of an error; - * _oserror contains an error-code, then (see above table). - */ +** Returns the number of actually-written bytes, or -1 in case of an error; +** _oserror contains an error-code, then (see above table). +*/ unsigned char cbm_opendir (unsigned char lfn, unsigned char device, ...); /* Opens directory listing. Returns 0 if opening directory was successful; - * otherwise, an error-code corresponding to cbm_open(). As an optional - * argument, the name of the directory may be passed to the function. If - * no explicit name is specified, "$" is used. - */ +** otherwise, an error-code corresponding to cbm_open(). As an optional +** argument, the name of the directory may be passed to the function. If +** no explicit name is specified, "$" is used. +*/ unsigned char __fastcall__ cbm_readdir (unsigned char lfn, struct cbm_dirent* l_dirent); /* Reads one directory line into cbm_dirent structure. - * Returns 0 if reading directory-line was successful. - * Returns non-zero if reading directory failed, or no more file-names to read. - * Returns 2 on last line. Then, l_dirent->size = the number of "blocks free." - */ +** Returns 0 if reading directory-line was successful. +** Returns non-zero if reading directory failed, or no more file-names to read. +** Returns 2 on last line. Then, l_dirent->size = the number of "blocks free." +*/ void __fastcall__ cbm_closedir (unsigned char lfn); /* Closes directory by cbm_close(lfn) */ diff --git a/include/cbm610.h b/include/cbm610.h index 84ea12ece..79d498431 100644 --- a/include/cbm610.h +++ b/include/cbm610.h @@ -138,9 +138,9 @@ void __fastcall__ pokewsys (unsigned addr, unsigned val); /* The following #defines will cause the matching functions calls in conio.h - * to be overlaid by macros with the same names, saving the function call - * overhead. - */ +** to be overlaid by macros with the same names, saving the function call +** overhead. +*/ #define _textcolor(color) COLOR_WHITE #define _bgcolor(color) COLOR_BLACK #define _bordercolor(color) COLOR_BLACK diff --git a/include/cbm_filetype.h b/include/cbm_filetype.h index 0263f33ae..e049eb306 100644 --- a/include/cbm_filetype.h +++ b/include/cbm_filetype.h @@ -52,9 +52,9 @@ /* CBM FILE TYPES. The definitions are used within standard headers, so we - * be careful with identifiers in the user name space. - * "Regular" files have a special bit set so it's easier to pick them out. - */ +** be careful with identifiers in the user name space. +** "Regular" files have a special bit set so it's easier to pick them out. +*/ #define _CBM_T_REG 0x10U /* Bit set for regular files */ #define _CBM_T_SEQ 0x10U #define _CBM_T_PRG 0x11U @@ -93,12 +93,12 @@ unsigned char __fastcall__ _cbm_filetype (unsigned char c); /* Map the start character for a file type to one of the file types above. - * Note: 'd' will always mapped to CBM_T_DEL. The calling function has to - * look at the following character to determine if the file type is actually - * CBM_T_DIR. - * This is a function used by the implementation. There is usually no need - * to call it from user code. - */ +** Note: 'd' will always mapped to CBM_T_DEL. The calling function has to +** look at the following character to determine if the file type is actually +** CBM_T_DIR. +** This is a function used by the implementation. There is usually no need +** to call it from user code. +*/ diff --git a/include/cc65.h b/include/cc65.h index 5607eab7b..4f9f3067f 100644 --- a/include/cc65.h +++ b/include/cc65.h @@ -46,17 +46,17 @@ long __fastcall__ cc65_idiv32by16r16 (long rhs, int lhs); /* Divide a 32 bit signed value by a 16 bit signed value yielding a 16 - * bit result and a 16 bit remainder. The former is returned in the lower 16 - * bit of the result, the latter in the upper. If you don't need the - * remainder, just assign (or cast) to an int. - */ +** bit result and a 16 bit remainder. The former is returned in the lower 16 +** bit of the result, the latter in the upper. If you don't need the +** remainder, just assign (or cast) to an int. +*/ unsigned long __fastcall__ cc65_udiv32by16r16 (unsigned long rhs, unsigned lhs); /* Divide a 32 bit unsigned value by a 16 bit unsigned value yielding a 16 - * bit result and a 16 bit remainder. The former is returned in the lower 16 - * bit of the result, the latter in the upper. If you don't need the - * remainder, just assign (or cast) to an unsigned. - */ +** bit result and a 16 bit remainder. The former is returned in the lower 16 +** bit of the result, the latter in the upper. If you don't need the +** remainder, just assign (or cast) to an unsigned. +*/ int __fastcall__ cc65_imul8x8r16 (signed char lhs, signed char rhs); /* Multiplicate two signed 8 bit to yield an signed 16 bit result */ @@ -69,21 +69,21 @@ unsigned __fastcall__ cc65_umul8x8r16 (unsigned char lhs, unsigned char rhs); unsigned long __fastcall__ cc65_umul16x8r32 (unsigned lhs, unsigned char rhs); /* Multiplicate an unsigned 16 bit by an unsigned 8 bit number yielding a 24 - * bit unsigned result that is extended to 32 bits for easier handling from C. - */ +** bit unsigned result that is extended to 32 bits for easier handling from C. +*/ unsigned long __fastcall__ cc65_umul16x16r32 (unsigned lhs, unsigned rhs); /* Multiplicate two unsigned 16 bit to yield an unsigned 32 bit result */ int __fastcall__ cc65_sin (unsigned x); /* Return the sine of the argument, which must be in range 0..360. The result - * is in 8.8 fixed point format, which means that 1.0 = $100 and -1.0 = $FF00. - */ +** is in 8.8 fixed point format, which means that 1.0 = $100 and -1.0 = $FF00. +*/ int __fastcall__ cc65_cos (unsigned x); /* Return the cosine of the argument, which must be in range 0..360. The result - * is in 8.8 fixed point format, which means that 1.0 = $100 and -1.0 = $FF00. - */ +** is in 8.8 fixed point format, which means that 1.0 = $100 and -1.0 = $FF00. +*/ diff --git a/include/conio.h b/include/conio.h index cd6bf3651..54667a3ca 100644 --- a/include/conio.h +++ b/include/conio.h @@ -34,18 +34,18 @@ /* - * This is the direct console interface for cc65. I do not like the function - * names very much, but the first version started as a rewrite of Borland's - * conio, and, even if the interface has changed, the names did not. - * - * The interface does direct screen I/O, so it is fast enough for most - * programs. I did not implement text windows, since many applications do - * not need them and should not pay for the additional overhead. It should - * be easy to add text windows on a higher level if needed, - * - * Most routines do not check the parameters. This may be unfortunate but is - * also related to speed. The coordinates are always 0/0 based. - */ +** This is the direct console interface for cc65. I do not like the function +** names very much, but the first version started as a rewrite of Borland's +** conio, and, even if the interface has changed, the names did not. +** +** The interface does direct screen I/O, so it is fast enough for most +** programs. I did not implement text windows, since many applications do +** not need them and should not pay for the additional overhead. It should +** be easy to add text windows on a higher level if needed, +** +** Most routines do not check the parameters. This may be unfortunate but is +** also related to speed. The coordinates are always 0/0 based. +*/ @@ -128,9 +128,9 @@ int __fastcall__ vcprintf (const char* format, va_list ap); char cgetc (void); /* Return a character from the keyboard. If there is no character available, - * the function waits until the user does press a key. If cursor is set to - * 1 (see below), a blinking cursor is displayed while waiting. - */ +** the function waits until the user does press a key. If cursor is set to +** 1 (see below), a blinking cursor is displayed while waiting. +*/ int cscanf (const char* format, ...); /* Like scanf(), but uses direct keyboard input */ @@ -140,14 +140,14 @@ int __fastcall__ vcscanf (const char* format, va_list ap); unsigned char __fastcall__ cursor (unsigned char onoff); /* If onoff is 1, a cursor is displayed when waiting for keyboard input. If - * onoff is 0, the cursor is hidden when waiting for keyboard input. The - * function returns the old cursor setting. - */ +** onoff is 0, the cursor is hidden when waiting for keyboard input. The +** function returns the old cursor setting. +*/ unsigned char __fastcall__ revers (unsigned char onoff); /* Enable/disable reverse character display. This may not be supported by - * the output device. Return the old setting. - */ +** the output device. Return the old setting. +*/ unsigned char __fastcall__ textcolor (unsigned char color); /* Set the color for text output. The old color setting is returned. */ @@ -160,16 +160,16 @@ unsigned char __fastcall__ bordercolor (unsigned char color); void __fastcall__ chline (unsigned char length); /* Output a horizontal line with the given length starting at the current - * cursor position. - */ +** cursor position. +*/ void __fastcall__ chlinexy (unsigned char x, unsigned char y, unsigned char length); /* Same as "gotoxy (x, y); chline (length);" */ void __fastcall__ cvline (unsigned char length); /* Output a vertical line with the given length at the current cursor - * position. - */ +** position. +*/ void __fastcall__ cvlinexy (unsigned char x, unsigned char y, unsigned char length); /* Same as "gotoxy (x, y); cvline (length);" */ @@ -196,14 +196,14 @@ void __fastcall__ cputhex16 (unsigned val); /* On some platforms, functions are not available or are dummys. To suppress - * the call to these functions completely, the platform header files may - * define macros for these functions that start with an underline. If such a - * macro exists, a new macro is defined here, that expands to the one with the - * underline. The reason for this two stepped approach is that it is sometimes - * necessary to take the address of the function, which is not possible when - * using a macro. Since the function prototype is still present, #undefining - * the macro will give access to the actual function. - */ +** the call to these functions completely, the platform header files may +** define macros for these functions that start with an underline. If such a +** macro exists, a new macro is defined here, that expands to the one with the +** underline. The reason for this two stepped approach is that it is sometimes +** necessary to take the address of the function, which is not possible when +** using a macro. Since the function prototype is still present, #undefining +** the macro will give access to the actual function. +*/ #if defined(_textcolor) # define textcolor(x) _textcolor(x) diff --git a/include/ctype.h b/include/ctype.h index 4c7f976d2..b440bfb70 100644 --- a/include/ctype.h +++ b/include/ctype.h @@ -85,12 +85,12 @@ unsigned char __fastcall__ toascii (unsigned char c); /* When inlining-of-known-functions is enabled, overload most of the above - * functions by macroes. The function prototypes are available again after - * #undef'ing the macroes. - * Please note that the following macroes do NOT handle EOF correctly, as - * stated in the manual. If you need correct behaviour for EOF, don't - * use -Os, or #undefine the following macroes. - */ +** functions by macroes. The function prototypes are available again after +** #undef'ing the macroes. +** Please note that the following macroes do NOT handle EOF correctly, as +** stated in the manual. If you need correct behaviour for EOF, don't +** use -Os, or #undefine the following macroes. +*/ #ifdef __OPT_s__ #define isalnum(c) (__AX__ = (c), \ diff --git a/include/dbg.h b/include/dbg.h index 5156658f0..734ca06b8 100644 --- a/include/dbg.h +++ b/include/dbg.h @@ -34,24 +34,24 @@ /* - * This is the interface to the cc65 debugger. Since many of the functions - * used for the debugger are quite usable even in another context, they - * are declared here. - * - * To use the debugger, just call DbgInit in your application. Once it has - * been called, the debugger will catch any BRK opcode. Use the BREAK macro - * defined below to insert breakpoints into your code. - * - * There are currently a lot of things that cannot be debugged, graphical - * applications are an example. The debugger does not save your screen - * contents, so even your text screen gets destroyed. However, you can - * debug the C and runtime library, even if the debugger is using this - * stuff itself. - * - * Note: When using the debugger, there are some other identifiers with - * external linkage, that start with Dbg. Avoid those names if you use the - * module. - */ +** This is the interface to the cc65 debugger. Since many of the functions +** used for the debugger are quite usable even in another context, they +** are declared here. +** +** To use the debugger, just call DbgInit in your application. Once it has +** been called, the debugger will catch any BRK opcode. Use the BREAK macro +** defined below to insert breakpoints into your code. +** +** There are currently a lot of things that cannot be debugged, graphical +** applications are an example. The debugger does not save your screen +** contents, so even your text screen gets destroyed. However, you can +** debug the C and runtime library, even if the debugger is using this +** stuff itself. +** +** Note: When using the debugger, there are some other identifiers with +** external linkage, that start with Dbg. Avoid those names if you use the +** module. +*/ @@ -68,35 +68,35 @@ unsigned __fastcall__ DbgDisAsm (unsigned Addr, char* Buf, unsigned char Len); /* Disassemble one instruction at address addr into the given buffer. - * The resulting line has the format, "AAAA__BB_BB_BB___OPC_OPERAND", - * where AAAA is the hexadecimal representation of addr, BB are the - * bytes (in hex) that make the instruction, OPC is the mnemonic, and - * OPERAND is an operand for the instruction. - * The buffer is filled with spaces up to the given length and terminated as - * a usual C string. NOTE: Buf must be able to hold Len+1 characters. - * The function returns the length of the disassembled instruction, so, - * to disassemble the next instruction, add the return value to addr - * and call the function again. - */ +** The resulting line has the format, "AAAA__BB_BB_BB___OPC_OPERAND", +** where AAAA is the hexadecimal representation of addr, BB are the +** bytes (in hex) that make the instruction, OPC is the mnemonic, and +** OPERAND is an operand for the instruction. +** The buffer is filled with spaces up to the given length and terminated as +** a usual C string. NOTE: Buf must be able to hold Len+1 characters. +** The function returns the length of the disassembled instruction, so, +** to disassemble the next instruction, add the return value to addr +** and call the function again. +*/ unsigned __fastcall__ DbgDisAsmLen (unsigned Addr); /* Disassemble one instruction, but do only return the length, do not - * create a visible representation. This function is useful when - * disassembling backwards, it is much faster than DbgDisAsm. - */ +** create a visible representation. This function is useful when +** disassembling backwards, it is much faster than DbgDisAsm. +*/ int __fastcall__ DbgIsRAM (unsigned Addr); /* Return true if we can read and write the given address */ char* DbgMemDump (unsigned Addr, char* Buf, unsigned char Len); /* Create a line of a memory dump in the given buffer. The buffer contains - * the starting address (4 digits hex), then Len bytes in this format: - * "AAAA__XX_YY_ZZ_...". The passed char buffer must hold Len*3+5 bytes - * plus a terminator byte. - * The function does not work correctly if the created string is longer - * than 255 bytes. - * The return value is Buf. - */ +** the starting address (4 digits hex), then Len bytes in this format: +** "AAAA__XX_YY_ZZ_...". The passed char buffer must hold Len*3+5 bytes +** plus a terminator byte. +** The function does not work correctly if the created string is longer +** than 255 bytes. +** The return value is Buf. +*/ @@ -108,8 +108,8 @@ char* DbgMemDump (unsigned Addr, char* Buf, unsigned char Len); void __fastcall__ DbgInit (unsigned unused); /* Initialize the debugger. Use 0 as parameter. The debugger will popup on - * next brk encountered. - */ +** next brk encountered. +*/ #define BREAK() __asm__ ("brk") /* Use this to insert breakpoints into your code */ diff --git a/include/dio.h b/include/dio.h index 1ccc1ab7c..4201728cc 100644 --- a/include/dio.h +++ b/include/dio.h @@ -36,10 +36,10 @@ /* Please note: All functions in this file will set _oserror *and* return its - * value. The only exception is dio_open, which will return NULL, but _oserror - * will be set. All function will also set _oserror in case of successful - * execution, effectively clearing it. - */ +** value. The only exception is dio_open, which will return NULL, but _oserror +** will be set. All function will also set _oserror in case of successful +** execution, effectively clearing it. +*/ diff --git a/include/em.h b/include/em.h index 28836f2b1..b151800ae 100644 --- a/include/em.h +++ b/include/em.h @@ -56,10 +56,10 @@ #define EM_ERR_INSTALLED 5 /* A driver is already installed */ /* Parameters for the em_copy_... functions. NOTE: The first seven bytes - * have the same order and alignment as needed for the Commodore REU, so - * don't change the order without changing the assembler file that defines - * the struct offsets and the code in the REU driver. - */ +** have the same order and alignment as needed for the Commodore REU, so +** don't change the order without changing the assembler file that defines +** the struct offsets and the code in the REU driver. +*/ struct em_copy { void* buf; /* Memory buffer to copy from or to */ unsigned char offs; /* Offset into page */ @@ -87,44 +87,44 @@ unsigned char __fastcall__ em_install (void* driver); unsigned char em_uninstall (void); /* Uninstall the currently loaded driver and return an error code. - * Note: This call does not free allocated memory. - */ +** Note: This call does not free allocated memory. +*/ unsigned em_pagecount (void); /* Return the total number of 256 byte pages available in extended memory. */ void* __fastcall__ em_map (unsigned page); /* Unmap the current page from memory and map a new one. The function returns - * a pointer to the location of the page in memory. Note: Without calling - * em_commit, the old contents of the memory window may be lost! - */ +** a pointer to the location of the page in memory. Note: Without calling +** em_commit, the old contents of the memory window may be lost! +*/ void* __fastcall__ em_use (unsigned page); /* Tell the driver that the memory window is associated with a given page. - * This call is very similar to em_map. The difference is that the driver - * does not necessarily transfer the current contents of the extended - * memory into the returned window. If you're going to just write to the - * window and the current contents of the window are invalid or no longer - * use, this call may perform better than em_map. - */ +** This call is very similar to em_map. The difference is that the driver +** does not necessarily transfer the current contents of the extended +** memory into the returned window. If you're going to just write to the +** window and the current contents of the window are invalid or no longer +** use, this call may perform better than em_map. +*/ void em_commit (void); /* Commit changes in the memory window to extended storage. If the contents - * of the memory window have been changed, these changes may be lost if - * em_map, em_copyfrom or em_copyto are called without calling em_commit - * first. Note: Not calling em_commit does not mean that the changes are - * discarded, it does just mean that some drivers will discard the changes. - */ +** of the memory window have been changed, these changes may be lost if +** em_map, em_copyfrom or em_copyto are called without calling em_commit +** first. Note: Not calling em_commit does not mean that the changes are +** discarded, it does just mean that some drivers will discard the changes. +*/ void __fastcall__ em_copyfrom (const struct em_copy* copy_data); /* Copy from extended into linear memory. Note: This may invalidate the - * currently mapped page. - */ +** currently mapped page. +*/ void __fastcall__ em_copyto (const struct em_copy* copy_data); /* Copy from linear into extended memory. Note: This may invalidate the - * currently mapped page. - */ +** currently mapped page. +*/ diff --git a/include/em/em-kernel.h b/include/em/em-kernel.h index 48cbbe8f7..e5df80321 100644 --- a/include/em/em-kernel.h +++ b/include/em/em-kernel.h @@ -7,7 +7,7 @@ /* */ /* */ /* (C) 2002-2003 Ullrich von Bassewitz */ -/* Römerstrasse 52 */ +/* Roemerstrasse 52 */ /* D-70794 Filderstadt */ /* EMail: uz@cc65.org */ /* */ @@ -45,8 +45,8 @@ /* A structure that describes the header of an extended memory driver loaded - * into memory. - */ +** into memory. +*/ typedef struct { /* Driver header */ diff --git a/include/errno.h b/include/errno.h index 468e7d4ea..0b3d67bc7 100644 --- a/include/errno.h +++ b/include/errno.h @@ -84,23 +84,23 @@ extern int _errno; int __fastcall__ _osmaperrno (unsigned char oserror); /* Map an operating system specific error code (for example from _oserror) - * into one of the E... codes above. It is user callable. - */ +** into one of the E... codes above. It is user callable. +*/ unsigned char __fastcall__ _seterrno (unsigned char code); /* Set errno to a specific error code and return zero. Used by the library */ int __fastcall__ _directerrno (unsigned char code); /* Set errno to a specific error code, clear _oserror and return -1. Used - * by the library. - */ +** by the library. +*/ int __fastcall__ _mappederrno (unsigned char code); /* Set _oserror to the given platform specific error code. If it is a real - * error code (not zero) set errno to the corresponding system error code - * and return -1. Otherwise return zero. - * Used by the library. - */ +** error code (not zero) set errno to the corresponding system error code +** and return -1. Otherwise return zero. +** Used by the library. +*/ diff --git a/include/inttypes.h b/include/inttypes.h index dd1ba822b..65003f887 100644 --- a/include/inttypes.h +++ b/include/inttypes.h @@ -34,9 +34,9 @@ /* Note: This file is not fully ISO 9899-1999 compliant because cc65 lacks - * a 64 bit data types and is not able to return structs > 4 bytes. The - * declarations have been adjusted accordingly or left out. - */ +** a 64 bit data types and is not able to return structs > 4 bytes. The +** declarations have been adjusted accordingly or left out. +*/ diff --git a/include/joystick.h b/include/joystick.h index 18b552f08..710d9b5a6 100644 --- a/include/joystick.h +++ b/include/joystick.h @@ -99,8 +99,8 @@ unsigned char __fastcall__ joy_install (void* driver); unsigned char joy_uninstall (void); /* Uninstall the currently loaded driver and return an error code. - * Note: This call does not free allocated memory. - */ +** Note: This call does not free allocated memory. +*/ unsigned char joy_count (void); /* Return the number of joysticks supported by the driver */ diff --git a/include/joystick/joy-kernel.h b/include/joystick/joy-kernel.h index e617a43c5..bb571de3d 100644 --- a/include/joystick/joy-kernel.h +++ b/include/joystick/joy-kernel.h @@ -7,7 +7,7 @@ /* */ /* */ /* (C) 2002-2006, Ullrich von Bassewitz */ -/* Römerstrasse 52 */ +/* Roemerstrasse 52 */ /* D-70794 Filderstadt */ /* EMail: uz@cc65.org */ /* */ @@ -45,8 +45,8 @@ /* A structure that describes the header of a joystick driver loaded into - * memory. - */ +** memory. +*/ typedef struct { /* Driver header */ @@ -88,4 +88,3 @@ void joy_clear_ptr (void); - diff --git a/include/modload.h b/include/modload.h index 04ad54d79..421641a90 100644 --- a/include/modload.h +++ b/include/modload.h @@ -34,8 +34,8 @@ /* Exports structures and functions to load relocatable o65 modules at - * runtime. - */ +** runtime. +*/ @@ -45,22 +45,22 @@ /* The following struct is passed to the module loader. It contains stuff, - * the loader needs to work, and another area where the loader will place - * informational data if it was successful. You will have to check the return - * code of mod_load before accessing any of these additional struct members. - */ +** the loader needs to work, and another area where the loader will place +** informational data if it was successful. You will have to check the return +** code of mod_load before accessing any of these additional struct members. +*/ struct mod_ctrl { /* Parameters passed into the loader routine. The member callerdata - * is an opaque 16 bit datatype that may be used by the caller to - * pass data through to the read routine. The read routine is used by the - * loader to load any required data. There are several calls where the - * read routine is passed a count of 1, so you may choose to make this - * a special case when implementing read(). The read() should return the - * number of bytes actually read. If the return value differs from the - * passed count, this is considered an error. - * NOTE: read() is designed so that the POSIX read() routine can be used - * for this vector, if you're loading from disk. - */ + ** is an opaque 16 bit datatype that may be used by the caller to + ** pass data through to the read routine. The read routine is used by the + ** loader to load any required data. There are several calls where the + ** read routine is passed a count of 1, so you may choose to make this + ** a special case when implementing read(). The read() should return the + ** number of bytes actually read. If the return value differs from the + ** passed count, this is considered an error. + ** NOTE: read() is designed so that the POSIX read() routine can be used + ** for this vector, if you're loading from disk. + */ int __fastcall__ (*read) (int callerdata, void* buffer, unsigned count); int callerdata; @@ -74,15 +74,15 @@ struct mod_ctrl { unsigned char __fastcall__ mod_load (struct mod_ctrl* ctrl); /* Load a module into memory and relocate it. The function will return an - * error code (see below). If MLOAD_OK is returned, the outgoing fields in - * the passed mod_ctrl struct contain information about the module just - * loaded. - */ +** error code (see below). If MLOAD_OK is returned, the outgoing fields in +** the passed mod_ctrl struct contain information about the module just +** loaded. +*/ void __fastcall__ mod_free (void* module); /* Free a loaded module. Note: The given pointer is the pointer to the - * module memory, not a pointer to a control structure. - */ +** module memory, not a pointer to a control structure. +*/ diff --git a/include/mouse.h b/include/mouse.h index 64581eda7..ac75956c0 100644 --- a/include/mouse.h +++ b/include/mouse.h @@ -79,9 +79,9 @@ struct mouse_box { }; /* Structure containing mouse callback functions. These functions are declared - * in C notation here, but they cannot be C functions (at least not easily), - * since they may be called from within an interrupt. - */ +** in C notation here, but they cannot be C functions (at least not easily), +** since they may be called from within an interrupt. +*/ struct mouse_callbacks { void (*hide) (void); @@ -92,23 +92,23 @@ struct mouse_callbacks { void (*prep) (void); /* Prepare to move the mouse cursor. This function is called, - * even when the cursor is currently invisible. - */ + ** even when the cursor is currently invisible. + */ void (*draw) (void); /* Draw the mouse cursor. This function is called, - * even when the cursor is currently invisible. - */ + ** even when the cursor is currently invisible. + */ void __fastcall__ (*movex) (int x); /* Move the mouse cursor to the new X coordinate. This function is called, - * even when the cursor is currently invisible. - */ + ** even when the cursor is currently invisible. + */ void __fastcall__ (*movey) (int y); /* Move the mouse cursor to the new Y coordinate. This function is called, - * even when the cursor is currently invisible. - */ + ** even when the cursor is currently invisible. + */ }; @@ -155,43 +155,43 @@ const char* __fastcall__ mouse_geterrormsg (unsigned char code); void mouse_hide (void); /* Hide the mouse. The function manages a counter and may be called more than - * once. For each call to mouse_hide there must be a call to mouse_show to make - * the mouse visible again. - */ +** once. For each call to mouse_hide there must be a call to mouse_show to make +** the mouse visible again. +*/ void mouse_show (void); /* Show the mouse. See mouse_hide() for more information. */ void __fastcall__ mouse_setbox (const struct mouse_box* box); /* Set the bounding box for the mouse pointer movement. The mouse X and Y - * coordinates will never go outside the given box. - * NOTE: The function does *not* check if the mouse is currently inside the - * given margins. The proper way to use this function therefore is: - * - * - Hide the mouse - * - Set the bounding box - * - Place the mouse at the desired position - * - Show the mouse again. - * - * NOTE2: When setting the box to something that is larger than the actual - * screen, the positioning of the mouse cursor can fail. If such margins - * are really what you want, you have to use your own cursor routines. - */ +** coordinates will never go outside the given box. +** NOTE: The function does *not* check if the mouse is currently inside the +** given margins. The proper way to use this function therefore is: +** +** - Hide the mouse +** - Set the bounding box +** - Place the mouse at the desired position +** - Show the mouse again. +** +** NOTE2: When setting the box to something that is larger than the actual +** screen, the positioning of the mouse cursor can fail. If such margins +** are really what you want, you have to use your own cursor routines. +*/ void __fastcall__ mouse_getbox (struct mouse_box* box); /* Get the current bounding box for the mouse pointer movement. */ void __fastcall__ mouse_move (int x, int y); /* Set the mouse cursor to the given position. If a mouse cursor is defined - * and currently visible, the mouse cursor is also moved. - * NOTE: This function does not check if the given position is valid and - * inside the bounding box. - */ +** and currently visible, the mouse cursor is also moved. +** NOTE: This function does not check if the given position is valid and +** inside the bounding box. +*/ unsigned char mouse_buttons (void); /* Return a bit mask encoding the states of the mouse buttons. Use the - * MOUSE_BTN_XXX flags to decode a specific button. - */ +** MOUSE_BTN_XXX flags to decode a specific button. +*/ void __fastcall__ mouse_pos (struct mouse_pos* pos); /* Return the current mouse position. */ @@ -201,8 +201,8 @@ void __fastcall__ mouse_info (struct mouse_info* info); unsigned char __fastcall__ mouse_ioctl (unsigned char code, void* data); /* Call the driver-specific ioctl function. Return an error code. - * NON-PORTABLE! - */ +** NON-PORTABLE! +*/ diff --git a/include/o65.h b/include/o65.h index 2321cfe10..a50bf2fdd 100644 --- a/include/o65.h +++ b/include/o65.h @@ -34,12 +34,12 @@ /* This files exports structures and constants to handle the o65 relocatable - * file format as defined by Andre Fachat. See the original document under - * - * http://www.6502.org/users/andre/o65/fileformat.html - * - * for more information. - */ +** file format as defined by Andre Fachat. See the original document under +** +** http://www.6502.org/users/andre/o65/fileformat.html +** +** for more information. +*/ diff --git a/include/pen.h b/include/pen.h index bab6997df..e17f030b5 100644 --- a/include/pen.h +++ b/include/pen.h @@ -54,20 +54,20 @@ extern void __fastcall__ (*pen_adjuster) (unsigned char *pValue); void __fastcall__ pen_calibrate (unsigned char *XOffset); /* Ask the user to help to calibrate a lightpen. Changes the screen! - * A pointer to this function can be put into pen_adjuster. - */ +** A pointer to this function can be put into pen_adjuster. +*/ void __fastcall__ pen_adjust (const char *filename); /* Get a lightpen calibration value from a file if it exists. Otherwise, call - * pen_calibrate() to create a value; then, write it into a file, so that it - * will be available at the next time that the lightpen is used. - * Might change the screen. - * pen_adjust() is optional; if you want to use its feature, - * then it must be called before a driver is installed. - * Note: This function merely saves the file-name pointer, and sets - * the pen_adjuster pointer. The file will be read only when a driver - * is installed, and only if that driver wants to be calibrated. - */ +** pen_calibrate() to create a value; then, write it into a file, so that it +** will be available at the next time that the lightpen is used. +** Might change the screen. +** pen_adjust() is optional; if you want to use its feature, +** then it must be called before a driver is installed. +** Note: This function merely saves the file-name pointer, and sets +** the pen_adjuster pointer. The file will be read only when a driver +** is installed, and only if that driver wants to be calibrated. +*/ diff --git a/include/pet.h b/include/pet.h index 0588ee8bf..720e40a78 100644 --- a/include/pet.h +++ b/include/pet.h @@ -7,7 +7,7 @@ /* */ /* */ /* (C) 1998-2005 Ullrich von Bassewitz */ -/* Römerstraße 52 */ +/* Roemerstrasse 52 */ /* D-70794 Filderstadt */ /* EMail: uz@cc65.org */ /* */ @@ -92,9 +92,9 @@ extern void pet_stdjoy_joy[]; /* Referred to by joy_static_stddrv[] */ /* The following #defines will cause the matching functions calls in conio.h - * to be overlaid by macros with the same names, saving the function call - * overhead. - */ +** to be overlaid by macros with the same names, saving the function call +** overhead. +*/ #define _textcolor(color) COLOR_WHITE #define _bgcolor(color) COLOR_BLACK #define _bordercolor(color) COLOR_BLACK diff --git a/include/serial.h b/include/serial.h index cecba90c5..990f66521 100644 --- a/include/serial.h +++ b/include/serial.h @@ -92,8 +92,8 @@ #define SER_HS_SW 0x02 /* Software handshake */ /* Bit masks to mask out things from the status returned by ser_status. - * These are 6551 specific and must be mapped by drivers for other chips. - */ +** These are 6551 specific and must be mapped by drivers for other chips. +*/ #define SER_STATUS_PE 0x01 /* Parity error */ #define SER_STATUS_FE 0x02 /* Framing error */ #define SER_STATUS_OE 0x04 /* Overrun error */ @@ -141,8 +141,8 @@ unsigned char __fastcall__ ser_install (void* driver); unsigned char ser_uninstall (void); /* Uninstall the currently loaded driver and return an error code. - * Note: This call does not free allocated memory. - */ +** Note: This call does not free allocated memory. +*/ unsigned char __fastcall__ ser_open (const struct ser_params* params); /* "Open" the port by setting the port parameters and enable interrupts. */ @@ -152,14 +152,14 @@ unsigned char ser_close (void); unsigned char __fastcall__ ser_get (char* b); /* Get a character from the serial port. If no characters are available, the - * function will return SER_ERR_NO_DATA, so this is not a fatal error. - */ +** function will return SER_ERR_NO_DATA, so this is not a fatal error. +*/ unsigned char __fastcall__ ser_put (char b); /* Send a character via the serial port. There is a transmit buffer, but - * transmitting is not done via interrupt. The function returns - * SER_ERR_OVERFLOW if there is no space left in the transmit buffer. - */ +** transmitting is not done via interrupt. The function returns +** SER_ERR_OVERFLOW if there is no space left in the transmit buffer. +*/ unsigned char __fastcall__ ser_status (unsigned char* status); /* Return the serial port status. */ diff --git a/include/stdint.h b/include/stdint.h index 0053a9bba..5d6f04769 100644 --- a/include/stdint.h +++ b/include/stdint.h @@ -34,8 +34,8 @@ /* Note: This file is not fully ISO 9899-1999 compliant because cc65 lacks - * a 64 bit data types. The declarations have been adjusted accordingly. - */ +** a 64 bit data types. The declarations have been adjusted accordingly. +*/ diff --git a/include/stdlib.h b/include/stdlib.h index 026e19198..eac5629a8 100644 --- a/include/stdlib.h +++ b/include/stdlib.h @@ -71,13 +71,13 @@ void __fastcall__ free (void* block); #if __CC65_STD__ == __CC65_STD_CC65__ int __fastcall__ posix_memalign (void** memptr, size_t alignment, size_t size); /* Allocate a block of memory with the given "size", which is aligned to a - * memory address that is a multiple of "alignment". "alignment" MUST NOT be - * zero, and MUST be a power of two; otherwise, this function will return - * EINVAL. The function returns ENOMEM if not enough memory is available - * to satisfy the request. "memptr" must point to a variable; that variable - * will return the address of the allocated memory. Use free() to release that - * allocated block. - */ +** memory address that is a multiple of "alignment". "alignment" MUST NOT be +** zero, and MUST be a power of two; otherwise, this function will return +** EINVAL. The function returns ENOMEM if not enough memory is available +** to satisfy the request. "memptr" must point to a variable; that variable +** will return the address of the allocated memory. Use free() to release that +** allocated block. +*/ #endif void __fastcall__ _heapadd (void* mem, size_t size); diff --git a/include/string.h b/include/string.h index be492667e..46095a525 100644 --- a/include/string.h +++ b/include/string.h @@ -65,8 +65,8 @@ void* __fastcall__ memmove (void* dest, const void* src, size_t count); void* __fastcall__ memset (void* s, int c, size_t count); /* The following is an internal function, the compiler will replace memset - * with it if the fill value is zero. Never use this one directly! - */ +** with it if the fill value is zero. Never use this one directly! +*/ void* __fastcall__ _bzero (void* ptr, size_t n); /* Non standard: */ diff --git a/include/supervision.h b/include/supervision.h index 332fe973b..ffece4ecb 100644 --- a/include/supervision.h +++ b/include/supervision.h @@ -98,9 +98,9 @@ struct __sv_dma { /* Counters incremented asynchronously! - * If you want more complex, copy the crt0.s file from the libsrc/supervision - * directory and code them yourself (in assembler) - */ +** If you want more complex, copy the crt0.s file from the libsrc/supervision +** directory and code them yourself (in assembler) +*/ extern unsigned char sv_nmi_counter; extern unsigned char sv_timer_irq_counter; extern unsigned char sv_timer_dma_counter; diff --git a/include/sys/utsname.h b/include/sys/utsname.h index 28feecc46..a601d9eed 100644 --- a/include/sys/utsname.h +++ b/include/sys/utsname.h @@ -7,7 +7,7 @@ /* */ /* */ /* (C) 2003 Ullrich von Bassewitz */ -/* Römerstrasse 52 */ +/* Roemerstrasse 52 */ /* D-70794 Filderstadt */ /* EMail: uz@cc65.org */ /* */ @@ -45,30 +45,30 @@ /* - * Suggested field contents: - * - * sysname - * Should contain the name of the underlying operating system, or "cc65" - * if the program runs on the bare machine. - * - * nodename - * Is empty or may be defined by the implementor. - * - * release - * Contains the operating system release or the major/minor cc65 version - * if sysname contains "cc65". - * - * version - * Contains the operating system version or the cc65 patch version if - * sysname contains "cc65". - * - * machine - * Contains the complete name of the machine, like "Commodore 64", - * "Oric Atmos" or similar. - * - * Beware: The library sources written in assembler have knowledge about this - * struct! - */ +** Suggested field contents: +** +** sysname +** Should contain the name of the underlying operating system, or "cc65" +** if the program runs on the bare machine. +** +** nodename +** Is empty or may be defined by the implementor. +** +** release +** Contains the operating system release or the major/minor cc65 version +** if sysname contains "cc65". +** +** version +** Contains the operating system version or the cc65 patch version if +** sysname contains "cc65". +** +** machine +** Contains the complete name of the machine, like "Commodore 64", +** "Oric Atmos" or similar. +** +** Beware: The library sources written in assembler have knowledge about this +** struct! +*/ struct utsname { char sysname[17]; char nodename[9]; diff --git a/include/tgi.h b/include/tgi.h index 51d0eaebc..02dff8868 100644 --- a/include/tgi.h +++ b/include/tgi.h @@ -80,44 +80,44 @@ void __fastcall__ tgi_load_driver (const char* name); void tgi_unload (void); /* Uninstall, then unload the currently loaded driver. Will call tgi_done if - * necessary. - */ +** necessary. +*/ void __fastcall__ tgi_install (void* driver); /* Install an already loaded driver. */ void tgi_uninstall (void); /* Uninstall the currently loaded driver but do not unload it. Will call - * tgi_done if necessary. - */ +** tgi_done if necessary. +*/ void tgi_init (void); /* Initialize the already loaded graphics driver. */ void tgi_done (void); /* End graphics mode, switch back to text mode. Will NOT uninstall or unload - * the driver! - */ +** the driver! +*/ const tgi_vectorfont* __fastcall__ tgi_load_vectorfont (const char* name); /* Load a vector font into memory and return it. In case of errors, NULL is - * returned and an error is set, which can be retrieved using tgi_geterror. - * To use the font, it has to be installed using tgi_install_vectorfont. - */ +** returned and an error is set, which can be retrieved using tgi_geterror. +** To use the font, it has to be installed using tgi_install_vectorfont. +*/ void __fastcall__ tgi_install_vectorfont (const tgi_vectorfont* font); /* Install a vector font for use. More than one vector font can be loaded, - * but only one can be active. This function is used to tell which one. Call - * with a NULL pointer to uninstall the currently installed font. - */ +** but only one can be active. This function is used to tell which one. Call +** with a NULL pointer to uninstall the currently installed font. +*/ void __fastcall__ tgi_free_vectorfont (const tgi_vectorfont* font); /* Free a vector font that was previously loaded into memory. */ unsigned char tgi_geterror (void); /* Return the error code for the last operation. This will also clear the - * error. - */ +** error. +*/ const char* __fastcall__ tgi_geterrormsg (unsigned char code); /* Get an error message describing the error in code. */ @@ -139,8 +139,8 @@ unsigned char tgi_getcolorcount (void); unsigned char tgi_getmaxcolor (void); /* Return the maximum supported color number (the number of colors would - * then be getmaxcolor()+1). - */ +** then be getmaxcolor()+1). +*/ void __fastcall__ tgi_setcolor (unsigned char color); /* Set the current drawing color. */ @@ -150,8 +150,8 @@ unsigned char tgi_getcolor (void); void __fastcall__ tgi_setpalette (const unsigned char* palette); /* Set the palette (not available with all drivers/hardware). palette is - * a pointer to as many entries as there are colors. - */ +** a pointer to as many entries as there are colors. +*/ const unsigned char* tgi_getpalette (void); /* Return the current palette. */ @@ -164,26 +164,26 @@ unsigned tgi_getxres (void); unsigned tgi_getmaxx (void); /* Return the maximum x coordinate. The resolution in x direction is - * getmaxx() + 1 - */ +** getmaxx() + 1 +*/ unsigned tgi_getyres (void); /* Return the resolution in Y direction. */ unsigned tgi_getmaxy (void); /* Return the maximum y coordinate. The resolution in y direction is - * getmaxy() + 1 - */ +** getmaxy() + 1 +*/ unsigned tgi_getaspectratio (void); /* Returns the aspect ratio for the loaded driver. The aspect ratio is an - * 8.8 fixed point value. - */ +** 8.8 fixed point value. +*/ void __fastcall__ tgi_setaspectratio (unsigned aspectratio); /* Set a new aspect ratio for the loaded driver. The aspect ratio is an - * 8.8 fixed point value. - */ +** 8.8 fixed point value. +*/ unsigned char __fastcall__ tgi_getpixel (int x, int y); /* Get the color value of a pixel. */ @@ -196,89 +196,89 @@ void __fastcall__ tgi_gotoxy (int x, int y); void __fastcall__ tgi_line (int x1, int y1, int x2, int y2); /* Draw a line in the current drawing color. The graphics cursor will - * be set to x2/y2 by this call. - */ +** be set to x2/y2 by this call. +*/ void __fastcall__ tgi_lineto (int x2, int y2); /* Draw a line in the current drawing color from the graphics cursor to the - * new end point. The graphics cursor will be updated to x2/y2. - */ +** new end point. The graphics cursor will be updated to x2/y2. +*/ void __fastcall__ tgi_circle (int x, int y, unsigned char radius); /* Draw a circle in the current drawing color. */ void __fastcall__ tgi_ellipse (int x, int y, unsigned char rx, unsigned char ry); /* Draw a full ellipse with center at x/y and radii rx/ry using the current - * drawing color. - */ +** drawing color. +*/ void __fastcall__ tgi_arc (int x, int y, unsigned char rx, unsigned char ry, unsigned sa, unsigned ea); /* Draw an ellipse arc with center at x/y and radii rx/ry using the current - * drawing color. The arc covers the angle between sa and ea (startangle and - * endangle), which must be in the range 0..360 (otherwise the function may - * bevave unextectedly). - */ +** drawing color. The arc covers the angle between sa and ea (startangle and +** endangle), which must be in the range 0..360 (otherwise the function may +** bevave unextectedly). +*/ void __fastcall__ tgi_pieslice (int x, int y, unsigned char rx, unsigned char ry, unsigned sa, unsigned ea); /* Draw an ellipse pie slice with center at x/y and radii rx/ry using the - * current drawing color. The pie slice covers the angle between sa and ea - * (startangle and endangle), which must be in the range 0..360 (otherwise the - * function may behave unextectedly). - */ +** current drawing color. The pie slice covers the angle between sa and ea +** (startangle and endangle), which must be in the range 0..360 (otherwise the +** function may behave unextectedly). +*/ void __fastcall__ tgi_bar (int x1, int y1, int x2, int y2); /* Draw a bar (a filled rectangle) using the current color. */ void __fastcall__ tgi_settextdir (unsigned char dir); /* Set the direction for text output. dir is one of the TGI_TEXT_XXX - * constants. - */ +** constants. +*/ void __fastcall__ tgi_settextscale (unsigned width, unsigned height); /* Set the scaling for text output. The scaling factors for width and height - * are 8.8 fixed point values. This means that $100 = 1 $200 = 2 etc. - */ +** are 8.8 fixed point values. This means that $100 = 1 $200 = 2 etc. +*/ void __fastcall__ tgi_settextstyle (unsigned width, unsigned height, unsigned char dir, unsigned char font); /* Set the style for text output. The scaling factors for width and height - * are 8.8 fixed point values. This means that $100 = 1 $200 = 2 etc. - * dir is one of the TGI_TEXT_XXX constants. font is one of the TGI_FONT_XXX - * constants. - */ +** are 8.8 fixed point values. This means that $100 = 1 $200 = 2 etc. +** dir is one of the TGI_TEXT_XXX constants. font is one of the TGI_FONT_XXX +** constants. +*/ unsigned __fastcall__ tgi_gettextwidth (const char* s); /* Calculate the width of the text in pixels according to the current text - * style. - */ +** style. +*/ unsigned __fastcall__ tgi_gettextheight (const char* s); /* Calculate the height of the text in pixels according to the current text - * style. - */ +** style. +*/ void __fastcall__ tgi_outtext (const char* s); /* Output text at the current graphics cursor position. The graphics cursor - * is moved to the end of the text. - */ +** is moved to the end of the text. +*/ void __fastcall__ tgi_outtextxy (int x, int y, const char* s); /* Output text at the given cursor position. The graphics cursor is moved to - * the end of the text. - */ +** the end of the text. +*/ unsigned __fastcall__ tgi_ioctl (unsigned char code, void* data); /* Call the driver specific control function. What this function does for - * a specific code depends on the driver. The driver will set an error - * for unknown codes or values. - */ +** a specific code depends on the driver. The driver will set an error +** for unknown codes or values. +*/ int __fastcall__ tgi_imulround (int rhs, int lhs); /* Helper function for functions using sine/cosine: Multiply two values, one - * being an 8.8 fixed point one, and return the rounded and scaled result. - */ +** being an 8.8 fixed point one, and return the rounded and scaled result. +*/ diff --git a/include/tgi/tgi-vectorfont.h b/include/tgi/tgi-vectorfont.h index 82513b271..9cbfc30fc 100644 --- a/include/tgi/tgi-vectorfont.h +++ b/include/tgi/tgi-vectorfont.h @@ -78,8 +78,8 @@ struct tgi_vectorfont { void __fastcall__ tgi_vectorchar (char C); /* Draw one character of the vector font at the current graphics cursor - * position using the current font magnification. - */ +** position using the current font magnification. +*/ diff --git a/include/time.h b/include/time.h index 3566cb7b5..c70ffa718 100644 --- a/include/time.h +++ b/include/time.h @@ -7,7 +7,7 @@ /* */ /* */ /* (C) 1998-2012 Ullrich von Bassewitz */ -/* Römerstrasse 52 */ +/* Roemerstrasse 52 */ /* D-70794 Filderstadt */ /* EMail: uz@cc65.org */ /* */ @@ -104,7 +104,8 @@ unsigned _clocks_per_sec (void); # define CLOCKS_PER_SEC 1 /* ANSI */ #elif defined(__LYNX__) /* The clock-rate depends on the video scan-rate; -** so, read it at run-time. */ +** so, read it at run-time. +*/ extern clock_t _clk_tck (void); # define CLK_TCK _clk_tck() # define CLOCKS_PER_SEC _clk_tck() @@ -114,10 +115,10 @@ extern clock_t _clk_tck (void); time_t _systime (void); /* Similar to time(), but: - * - Is not ISO C - * - Does not take the additional pointer - * - Does not set errno when returning -1 - */ +** - Is not ISO C +** - Does not take the additional pointer +** - Does not set errno when returning -1 +*/ /* ISO C function prototypes */ char* __fastcall__ asctime (const struct tm* timep); diff --git a/libsrc/apple2/systime.s b/libsrc/apple2/systime.s index 98d39a278..9bf4fe904 100644 --- a/libsrc/apple2/systime.s +++ b/libsrc/apple2/systime.s @@ -3,10 +3,10 @@ ; ; time_t _systime (void); ; /* Similar to time(), but: -; * - Is not ISO C -; * - Does not take the additional pointer -; * - Does not set errno when returning -1 -; */ +; ** - Is not ISO C +; ** - Does not take the additional pointer +; ** - Does not set errno when returning -1 +; */ ; .include "time.inc" diff --git a/libsrc/atari/exetrailer.s b/libsrc/atari/exetrailer.s index 8cae0bdf0..bac9356f5 100644 --- a/libsrc/atari/exetrailer.s +++ b/libsrc/atari/exetrailer.s @@ -1,7 +1,7 @@ ; This file defines the EXE file "trailer" which sets the entry point .export __AUTOSTART__: absolute = 1 - .import start + .import start .include "atari.inc" diff --git a/libsrc/atari/system_check.s b/libsrc/atari/system_check.s index dbc0b5dfb..2f1feefc4 100644 --- a/libsrc/atari/system_check.s +++ b/libsrc/atari/system_check.s @@ -194,7 +194,7 @@ delay1: ldx #0 end: .ifndef __ATARIXL__ -tmp: ; outside of the load chunk, some kind of poor man's .bss +tmp: ; outside of the load chunk, some kind of poor man's .bss .endif ; ------------------------------------------------------------------------ diff --git a/libsrc/atari/systime.s b/libsrc/atari/systime.s index d22b8c596..273e394a4 100644 --- a/libsrc/atari/systime.s +++ b/libsrc/atari/systime.s @@ -3,10 +3,10 @@ ; ; time_t _systime (void); ; /* Similar to time(), but: -; * - Is not ISO C -; * - Does not take the additional pointer -; * - Does not set errno when returning -1 -; */ +; ** - Is not ISO C +; ** - Does not take the additional pointer +; ** - Does not set errno when returning -1 +; */ ; .export __systime diff --git a/libsrc/atari/targetutil/w2cas.c b/libsrc/atari/targetutil/w2cas.c index 050218cfe..4d574da07 100644 --- a/libsrc/atari/targetutil/w2cas.c +++ b/libsrc/atari/targetutil/w2cas.c @@ -1,12 +1,12 @@ /* w2cas.c -- write file to cassette - * - * This program writes a boot file (typically linked with - * 'atari-cassette.cfg') to the cassette. - * Only files < 32K are supported, since the loading of - * larger files requires a special loader inside the program. - * - * Christian Groessler, chris@groessler.org, 2014 - */ +** +** This program writes a boot file (typically linked with +** 'atari-cassette.cfg') to the cassette. +** Only files < 32K are supported, since the loading of +** larger files requires a special loader inside the program. +** +** Christian Groessler, chris@groessler.org, 2014 +*/ #include #include diff --git a/libsrc/atmos/systime.s b/libsrc/atmos/systime.s index d22b8c596..273e394a4 100644 --- a/libsrc/atmos/systime.s +++ b/libsrc/atmos/systime.s @@ -3,10 +3,10 @@ ; ; time_t _systime (void); ; /* Similar to time(), but: -; * - Is not ISO C -; * - Does not take the additional pointer -; * - Does not set errno when returning -1 -; */ +; ** - Is not ISO C +; ** - Does not take the additional pointer +; ** - Does not set errno when returning -1 +; */ ; .export __systime diff --git a/libsrc/c128/fast.s b/libsrc/c128/fast.s index 9e032f915..6c4c8c21e 100644 --- a/libsrc/c128/fast.s +++ b/libsrc/c128/fast.s @@ -3,8 +3,8 @@ ; ; void fast (void); ; /* Switch the CPU into 2MHz mode. Note: This will disable video when in -; * 40 column mode. -; */ +; ** 40 column mode. +; */ ; .export _fast diff --git a/libsrc/c128/systime.s b/libsrc/c128/systime.s index bea2164f5..0a7f8f367 100644 --- a/libsrc/c128/systime.s +++ b/libsrc/c128/systime.s @@ -3,10 +3,10 @@ ; ; time_t _systime (void); ; /* Similar to time(), but: -; * - Is not ISO C -; * - Does not take the additional pointer -; * - Does not set errno when returning -1 -; */ +; ** - Is not ISO C +; ** - Does not take the additional pointer +; ** - Does not set errno when returning -1 +; */ ; .include "time.inc" diff --git a/libsrc/c16/systime.s b/libsrc/c16/systime.s index d22b8c596..273e394a4 100644 --- a/libsrc/c16/systime.s +++ b/libsrc/c16/systime.s @@ -3,10 +3,10 @@ ; ; time_t _systime (void); ; /* Similar to time(), but: -; * - Is not ISO C -; * - Does not take the additional pointer -; * - Does not set errno when returning -1 -; */ +; ** - Is not ISO C +; ** - Does not take the additional pointer +; ** - Does not set errno when returning -1 +; */ ; .export __systime diff --git a/libsrc/c64/systime.s b/libsrc/c64/systime.s index eb5f999f6..a00df1397 100644 --- a/libsrc/c64/systime.s +++ b/libsrc/c64/systime.s @@ -3,10 +3,10 @@ ; ; time_t _systime (void); ; /* Similar to time(), but: -; * - Is not ISO C -; * - Does not take the additional pointer -; * - Does not set errno when returning -1 -; */ +; ** - Is not ISO C +; ** - Does not take the additional pointer +; ** - Does not set errno when returning -1 +; */ ; .include "time.inc" diff --git a/libsrc/cbm/cbm_load.c b/libsrc/cbm/cbm_load.c index 297910615..695af504b 100644 --- a/libsrc/cbm/cbm_load.c +++ b/libsrc/cbm/cbm_load.c @@ -1,20 +1,21 @@ /* - * Marc 'BlackJack' Rintsch, 06.03.2001 - * - * unsigned int cbm_load(const char* name, - * unsigned char device, - * const unsigned char* data); - */ +** Marc 'BlackJack' Rintsch, 06.03.2001 +** +** unsigned int cbm_load(const char* name, +** unsigned char device, +** const unsigned char* data); +*/ #include /* loads file "name" from given device to given address or to the load address - * of the file if "data" is 0 - */ +** of the file if "data" is 0 +*/ unsigned int cbm_load(const char* name, unsigned char device, void* data) { - /* LFN is set to 0 but it's not needed for loading. - * (BASIC V2 sets it to the value of the SA for LOAD) */ + /* LFN is set to 0; but, it's not needed for loading + ** (BASIC V2 sets it to the value of the SA for LOAD). + */ cbm_k_setlfs(0, device, data == 0); cbm_k_setnam(name); return (cbm_k_load(0, (unsigned int)data) - (unsigned int)data); diff --git a/libsrc/cbm/cbm_open.s b/libsrc/cbm/cbm_open.s index 4d1cec040..1842fc149 100644 --- a/libsrc/cbm/cbm_open.s +++ b/libsrc/cbm/cbm_open.s @@ -8,9 +8,9 @@ ; unsigned char sec_addr, ; const char* name); ; /* Opens a file. Works just like the BASIC command. -; * Returns 0 if opening was successful, otherwise an errorcode (see table -; * below). -; */ +; ** Returns 0 if opening was successful, otherwise an errorcode (see table +; ** below). +; */ ; { ; cbm_k_setlfs(lfn, device, sec_addr); ; cbm_k_setnam(name); diff --git a/libsrc/cbm/cbm_read.s b/libsrc/cbm/cbm_read.s index d97ccbd8b..c84ff65aa 100644 --- a/libsrc/cbm/cbm_read.s +++ b/libsrc/cbm/cbm_read.s @@ -5,10 +5,10 @@ ; ; int __fastcall__ cbm_read (unsigned char lfn, void* buffer, unsigned int size) ; /* Reads up to "size" bytes from a file to "buffer". -; * Returns the number of actually read bytes, 0 if there are no bytes left -; * (EOF) or -1 in case of an error. _oserror contains an errorcode then (see -; * table below). -; */ +; ** Returns the number of actually read bytes, 0 if there are no bytes left +; ** (EOF) or -1 in case of an error. _oserror contains an errorcode then (see +; ** table below). +; */ ; { ; static unsigned int bytesread; ; static unsigned char tmp; @@ -22,9 +22,10 @@ ; tmp = cbm_k_basin(); ; ; /* the kernal routine BASIN sets ST to EOF if the end of file -; * is reached the first time, then we have store tmp. -; * every subsequent call returns EOF and READ ERROR in ST, then -; * we have to exit the loop here immidiatly. */ +; ** is reached the first time, then we have store tmp. +; ** every subsequent call returns EOF and READ ERROR in ST, then +; ** we have to exit the loop here immediatly. +; */ ; if (cbm_k_readst() & 0xBF) break; ; ; ((unsigned char*)buffer)[bytesread++] = tmp; diff --git a/libsrc/cbm/cbm_save.c b/libsrc/cbm/cbm_save.c index b88eed4ee..7f774b1b6 100644 --- a/libsrc/cbm/cbm_save.c +++ b/libsrc/cbm/cbm_save.c @@ -1,17 +1,17 @@ /* - * Marc 'BlackJack' Rintsch, 11.03.2001 - * - * unsigned char cbm_save(const char* name, - * char device, - * unsigned char* data, - * unsigned int size); - */ +** Marc 'BlackJack' Rintsch, 11.03.2001 +** +** unsigned char cbm_save(const char* name, +** char device, +** unsigned char* data, +** unsigned int size); +*/ #include #include /* saves a memory area from start to end-1 to a file. - */ +*/ unsigned char __fastcall__ cbm_save (const char* name, unsigned char device, const void* data, diff --git a/libsrc/cbm/dir.h b/libsrc/cbm/dir.h index c206e6ed9..08cb022a0 100644 --- a/libsrc/cbm/dir.h +++ b/libsrc/cbm/dir.h @@ -1,7 +1,7 @@ /* - * Internal include file, do not use directly. - * Written by Ullrich von Bassewitz. Based on code by Groepaz. - */ +** Internal include file, do not use directly. +** Written by Ullrich von Bassewitz. Based on code by Groepaz. +*/ @@ -36,15 +36,15 @@ struct DIR { unsigned char __fastcall__ _dirread (DIR* dir, void* buf, unsigned char count); /* Read characters from the directory into the supplied buffer. Makes sure, - * errno is set in case of a short read. Return true if the read was - * successful and false otherwise. - */ +** errno is set in case of a short read. Return true if the read was +** successful and false otherwise. +*/ unsigned char __fastcall__ _dirread1 (DIR* dir, void* buf); /* Read one byte from the directory into the supplied buffer. Makes sure, - * errno is set in case of a short read. Return true if the read was - * successful and false otherwise. - */ +** errno is set in case of a short read. Return true if the read was +** successful and false otherwise. +*/ diff --git a/libsrc/cbm/dir.s b/libsrc/cbm/dir.s index 1916a4104..fddd71d7c 100644 --- a/libsrc/cbm/dir.s +++ b/libsrc/cbm/dir.s @@ -16,9 +16,9 @@ ; ; unsigned char __fastcall__ _dirread1 (DIR* dir, void* buf); ; /* Read one byte from the directory into the supplied buffer. Makes sure, -; * errno is set in case of a short read. Return true if the read was -; * successful and false otherwise. -; */ +; ** errno is set in case of a short read. Return true if the read was +; ** successful and false otherwise. +; */ __dirread1: @@ -31,9 +31,9 @@ __dirread1: ; ; unsigned char __fastcall__ _dirread (DIR* dir, void* buf, unsigned char count); ; /* Read characters from the directory into the supplied buffer. Makes sure, -; * errno is set in case of a short read. Return true if the read was -; * successful and false otherwise. -; */ +; ** errno is set in case of a short read. Return true if the read was +; ** successful and false otherwise. +; */ __dirread: diff --git a/libsrc/cbm/opendir.c b/libsrc/cbm/opendir.c index fe7fecb20..b39e6b77e 100644 --- a/libsrc/cbm/opendir.c +++ b/libsrc/cbm/opendir.c @@ -1,6 +1,6 @@ /* - * Ullrich von Bassewitz, 2012-05-30. Based on code by Groepaz. - */ +** Ullrich von Bassewitz, 2012-05-30. Based on code by Groepaz. +*/ #include #include @@ -18,8 +18,8 @@ DIR* __fastcall__ opendir (register const char* name) DIR d; /* Setup the actual file name that is sent to the disk. We accept "0:", - * "1:" and "." as directory names. - */ + ** "1:" and "." as directory names. + */ d.name[0] = '$'; if (name == 0 || name[0] == '\0' || (name[0] == '.' && name[1] == '\0')) { d.name[1] = '\0'; diff --git a/libsrc/cbm/readdir.c b/libsrc/cbm/readdir.c index d6947316b..8d6968977 100644 --- a/libsrc/cbm/readdir.c +++ b/libsrc/cbm/readdir.c @@ -1,6 +1,6 @@ /* - * Ullrich von Bassewitz, 2012-05-30. Based on code by Groepaz. - */ +** Ullrich von Bassewitz, 2012-05-30. Based on code by Groepaz. +*/ @@ -53,9 +53,9 @@ struct dirent* __fastcall__ readdir (register DIR* dir) dir->off += count + 4; /* End of directory is reached if the buffer contains "blocks free". It is - * sufficient here to check for the leading 'b'. buffer will contain at - * least one byte if we come here. - */ + ** sufficient here to check for the leading 'b'. buffer will contain at + ** least one byte if we come here. + */ if (buffer[0] == 'b') { goto exitpoint; } diff --git a/libsrc/cbm/seekdir.c b/libsrc/cbm/seekdir.c index 0a4fe0781..3ae206b4e 100644 --- a/libsrc/cbm/seekdir.c +++ b/libsrc/cbm/seekdir.c @@ -1,6 +1,6 @@ /* - * Ullrich von Bassewitz, 2012-06-03. Based on code by Groepaz. - */ +** Ullrich von Bassewitz, 2012-06-03. Based on code by Groepaz. +*/ #include #include diff --git a/libsrc/cbm510/systime.s b/libsrc/cbm510/systime.s index 8a3858cef..daac36d8d 100644 --- a/libsrc/cbm510/systime.s +++ b/libsrc/cbm510/systime.s @@ -4,10 +4,10 @@ ; ; time_t _systime (void); ; /* Similar to time(), but: -; * - Is not ISO C -; * - Does not take the additional pointer -; * - Does not set errno when returning -1 -; */ +; ** - Is not ISO C +; ** - Does not take the additional pointer +; ** - Does not set errno when returning -1 +; */ ; .include "time.inc" diff --git a/libsrc/cbm610/systime.s b/libsrc/cbm610/systime.s index a6e72e8a5..be2bedf6f 100644 --- a/libsrc/cbm610/systime.s +++ b/libsrc/cbm610/systime.s @@ -4,10 +4,10 @@ ; ; time_t _systime (void); ; /* Similar to time(), but: -; * - Is not ISO C -; * - Does not take the additional pointer -; * - Does not set errno when returning -1 -; */ +; ** - Is not ISO C +; ** - Does not take the additional pointer +; ** - Does not set errno when returning -1 +; */ ; .include "time.inc" diff --git a/libsrc/common/_afailed.c b/libsrc/common/_afailed.c index 6600bf860..4e56b93f2 100644 --- a/libsrc/common/_afailed.c +++ b/libsrc/common/_afailed.c @@ -1,8 +1,8 @@ /* - * _afailed.c - * - * Ullrich von Bassewitz, 06.06.1998 - */ +** _afailed.c +** +** Ullrich von Bassewitz, 06.06.1998 +*/ diff --git a/libsrc/common/_file.h b/libsrc/common/_file.h index 66c8af828..8cd12c15e 100644 --- a/libsrc/common/_file.h +++ b/libsrc/common/_file.h @@ -1,9 +1,9 @@ /* - * _file.h - * - * (C) Copyright 1998, 2002 Ullrich von Bassewitz (uz@cc65.org) - * - */ +** _file.h +** +** (C) Copyright 1998, 2002 Ullrich von Bassewitz (uz@cc65.org) +** +*/ diff --git a/libsrc/common/_hextab.c b/libsrc/common/_hextab.c index d4f24b2ea..4c172abb5 100644 --- a/libsrc/common/_hextab.c +++ b/libsrc/common/_hextab.c @@ -1,9 +1,9 @@ /* - * Ullrich von Bassewitz, 11.08.1998 - * - * Hex conversion table. Must be in C since the compiler will convert - * to the correct character set for the target platform. - */ +** Ullrich von Bassewitz, 11.08.1998 +** +** Hex conversion table. Must be in C since the compiler will convert +** to the correct character set for the target platform. +*/ diff --git a/libsrc/common/_longminstr.c b/libsrc/common/_longminstr.c index 290c7f155..ffc35aa77 100644 --- a/libsrc/common/_longminstr.c +++ b/libsrc/common/_longminstr.c @@ -1,11 +1,11 @@ /* - * Ullrich von Bassewitz, 2012-11-26 - * - * Minimum value of a long. Is used in ascii conversions, since this value - * has no positive counterpart than can be represented in 32 bits. In C, - * since the compiler will convert to the correct character set for the - * target platform. - */ +** Ullrich von Bassewitz, 2012-11-26 +** +** Minimum value of a long. Is used in ascii conversions, since this value +** has no positive counterpart than can be represented in 32 bits. In C, +** since the compiler will convert to the correct character set for the +** target platform. +*/ diff --git a/libsrc/common/_printf.h b/libsrc/common/_printf.h index e965b0d85..ffb2443bd 100644 --- a/libsrc/common/_printf.h +++ b/libsrc/common/_printf.h @@ -1,9 +1,9 @@ /* - * _printf.h - * - * (C) Copyright 1998 Ullrich von Bassewitz (uz@cc65.org) - * - */ +** _printf.h +** +** (C) Copyright 1998 Ullrich von Bassewitz (uz@cc65.org) +** +*/ @@ -21,9 +21,9 @@ typedef void (*outfunc) (struct outdesc* desc, const char* buf, unsigned count); /* Control structure passed to the low level worker function. - * Beware: This function will access the structure on the assembly level, - * so check this when altering the structure. - */ +** Beware: This function will access the structure on the assembly level, +** so check this when altering the structure. +*/ struct outdesc { int ccount; /* Character counter */ outfunc fout; /* Routine used to output data */ diff --git a/libsrc/common/_scanf.c b/libsrc/common/_scanf.c index 108fc6095..9a3bf280c 100644 --- a/libsrc/common/_scanf.c +++ b/libsrc/common/_scanf.c @@ -1,13 +1,13 @@ /* - * _scanf.c - * - * (c) Copyright 2001-2005, Ullrich von Bassewitz - * 2005-01-24, Greg King - * - * This is the basic layer for all scanf-type functions. It should be - * rewritten in assembly, at some time in the future. So, some of the code - * is not as elegant as it could be. - */ +** _scanf.c +** +** (c) Copyright 2001-2005, Ullrich von Bassewitz +** 2005-01-24, Greg King +** +** This is the basic layer for all scanf-type functions. It should be +** rewritten in assembly, at some time in the future. So, some of the code +** is not as elegant as it could be. +*/ @@ -76,12 +76,12 @@ static const unsigned char Bits[CHAR_BIT] = { }; /* We need C to be 16 bits since we cannot check for EOF otherwise. - * Unfortunately, this causes the code to be quite larger, even if for most - * purposes, checking the low byte would be enough, since if C is EOF, the - * low byte will not match any useful character anyway (at least for the - * supported platforms - I know that this is not portable). So the following - * macro is used to access just the low byte of C. - */ +** Unfortunately, this causes the code to be quite larger, even if for most +** purposes, checking the low byte would be enough, since if C is EOF, the +** low byte will not match any useful character anyway (at least for the +** supported platforms - I know that this is not portable). So the following +** macro is used to access just the low byte of C. +*/ #define CHAR(c) (*((unsigned char*)&(c))) @@ -93,16 +93,16 @@ static const unsigned char Bits[CHAR_BIT] = { /* We don't want the optimizer to ruin our "perfect" ;-) - * assembly code! - */ +** assembly code! +*/ #pragma optimize (push, off) static unsigned FindBit (void) /* Locate the character's bit in the charset array. - * < .A - Argument character - * > .X - Offset of the byte in the character-set mask - * > .A - Bit-mask - */ +** < .A - Argument character +** > .X - Offset of the byte in the character-set mask +** > .A - Bit-mask +*/ { asm ("pha"); asm ("lsr a"); /* Divide by CHAR_BIT */ @@ -250,8 +250,8 @@ static void ReadChar (void) asm ("stx %v+1", C); /* If C is EOF, don't bump the character counter. - * Only the high-byte needs to be checked. - */ + ** Only the high-byte needs to be checked. + */ asm ("inx"); asm ("beq %g", Done); @@ -311,12 +311,12 @@ static void SkipWhite (void) static void ReadSign (void) /* Read an optional sign and skip it. Store 1 in Positive if the value is - * positive, store 0 otherwise. - */ +** positive, store 0 otherwise. +*/ { /* We can ignore the high byte of C here, since if it is EOF, the lower - * byte won't match anyway. - */ + ** byte won't match anyway. + */ asm ("lda %v", C); asm ("cmp #'-'"); asm ("bne %g", NotNeg); @@ -380,11 +380,11 @@ static void __fastcall__ ReadInt (unsigned char Base) static void AssignInt (void) /* Assign the integer value in Val to the next argument. The function makes - * several non-portable assumptions, to reduce code size: - * - signed and unsigned types have the same representation. - * - short and int have the same representation. - * - all pointer types have the same representation. - */ +** several non-portable assumptions, to reduce code size: +** - signed and unsigned types have the same representation. +** - short and int have the same representation. +** - all pointer types have the same representation. +*/ { if (NoAssign == false) { @@ -416,8 +416,8 @@ Done: ; static void __fastcall__ ScanInt (unsigned char Base) /* Scan an integer including white space, sign and optional base spec, - * and store it into IntVal. - */ +** and store it into IntVal. +*/ { /* Skip whitespace */ SkipWhite (); @@ -440,8 +440,8 @@ static void __fastcall__ ScanInt (unsigned char Base) Base = 8; /* Restart at the beginning of the number because it might - * be only a single zero digit (which already was read). - */ + ** be only a single zero digit (which already was read). + */ PushBack (); C = '0'; } @@ -483,8 +483,8 @@ static char GetFormat (void) int __fastcall__ _scanf (const struct scanfdata* D, const char* format_, va_list ap_) /* This is the routine used to do the actual work. It is called from several - * types of wrappers to implement the actual ISO xxscanf functions. - */ +** types of wrappers to implement the actual ISO xxscanf functions. +*/ { register char* S; bool HaveWidth; /* True if a width was given */ @@ -492,9 +492,9 @@ int __fastcall__ _scanf (const struct scanfdata* D, char Start; /* Walks over a range */ /* Place copies of the arguments into global variables. This is not very - * nice, but on a 6502 platform it gives better code, since the values - * do not have to be passed as parameters. - */ + ** nice, but on a 6502 platform it gives better code, since the values + ** do not have to be passed as parameters. + */ D_ = D; format = format_; ap = ap_; @@ -505,8 +505,8 @@ int __fastcall__ _scanf (const struct scanfdata* D, CharCount = 0; /* Set up the jump "label". CheckEnd() will use that label when EOF - * is reached. ReadInt() will use it when number-conversion fails. - */ + ** is reached. ReadInt() will use it when number-conversion fails. + */ if ((unsigned char) setjmp (JumpBuf) == RC_OK) { Again: @@ -523,9 +523,9 @@ Again: if ((bool) isspace ((int) F)) { /* Special white space handling: Any whitespace in the - * format string matches any amount of whitespace including - * none(!). So this match will never fail. - */ + ** format string matches any amount of whitespace including + ** none(!). So this match will never fail. + */ SkipWhite (); continue; } @@ -537,8 +537,8 @@ Percent: if (C != (int) F) { /* A mismatch -- we will stop scanning the input, - * and return the number of assigned conversions. - */ + ** and return the number of assigned conversions. + */ goto NoConv; } @@ -572,18 +572,18 @@ Percent: if (Width == 0) { /* Invalid specification */ /* Note: This method of leaving the function might seem - * to be crude, but it optimizes very well because - * the four exits can share this code. - */ + ** to be crude, but it optimizes very well because + ** the four exits can share this code. + */ _seterrno (EINVAL); Assignments = EOF; PushBack (); return Assignments; } /* Increment-and-test makes better code than test-and-decrement - * does. So, change the width into a form that can be used in - * that way. - */ + ** does. So, change the width into a form that can be used in + ** that way. + */ Width = ~Width; /* 3. Length modifier */ @@ -618,9 +618,9 @@ Percent: /* 4. Conversion specifier */ switch (F) { /* 'd' and 'u' conversions are actually the same, since the - * standard says that even the 'u' modifier allows an - * optionally signed integer. - */ + ** standard says that even the 'u' modifier allows an + ** optionally signed integer. + */ case 'd': /* Optionally signed decimal integer */ case 'u': ScanInt (10); @@ -676,9 +676,9 @@ Percent: if (NoAssign == false) { S = va_arg (ap, char*); /* ## This loop is convenient for us, but it isn't - * standard C. The standard implies that a failure - * shouldn't put anything into the array argument. - */ + ** standard C. The standard implies that a failure + ** shouldn't put anything into the array argument. + */ while (++Width) { CheckEnd (); /* Is it a matching failure? */ *S++ = C; @@ -705,8 +705,8 @@ Percent: } if (F == ']') { /* Empty sets aren't allowed; so, a right-bracket - * at the beginning must be a member of the set. - */ + ** at the beginning must be a member of the set. + */ AddCharToSet (F); GetFormat (); } @@ -725,8 +725,8 @@ Percent: break; default: /* Include all characters - * that are in the range. - */ + ** that are in the range. + */ while (1) { AddCharToSet (Start); if (Start == F) { @@ -756,9 +756,9 @@ Percent: } /* We have the set in CharSet. Read characters and - * store them into a string while they are part of - * the set. - */ + ** store them into a string while they are part of + ** the set. + */ Match = false; if (NoAssign == false) { S = va_arg (ap, char*); @@ -782,10 +782,10 @@ Percent: case 'p': /* Pointer, general format is 0xABCD. - * %hhp --> zero-page pointer - * %hp --> near pointer - * %lp --> far pointer - */ + ** %hhp --> zero-page pointer + ** %hp --> near pointer + ** %lp --> far pointer + */ SkipWhite (); if (CHAR (C) != '0') { goto NoConv; @@ -806,8 +806,8 @@ Percent: case 'n': /* Store the number of characters consumed so far - * (the read-ahead character hasn't been consumed). - */ + ** (the read-ahead character hasn't been consumed). + */ IntVal = (long) (CharCount - (C == EOF ? 0u : 1u)); AssignInt (); /* Don't count it. */ @@ -849,9 +849,9 @@ Percent: NoConv: /* Coming here means a failure. If that happens at EOF, with no - * conversion attempts, then it is considered an error; otherwise, - * the number of assignments is returned (the default behaviour). - */ + ** conversion attempts, then it is considered an error; otherwise, + ** the number of assignments is returned (the default behaviour). + */ if (C == EOF && Converted == false) { Assignments = EOF; /* Special case: error */ } diff --git a/libsrc/common/_scanf.h b/libsrc/common/_scanf.h index 0a8b09b7d..179be5de7 100644 --- a/libsrc/common/_scanf.h +++ b/libsrc/common/_scanf.h @@ -1,9 +1,9 @@ /* - * _scanf.h - * - * (c) Copyright 2004, Ullrich von Bassewitz - * - */ +** _scanf.h +** +** (c) Copyright 2004, Ullrich von Bassewitz +** +*/ @@ -13,8 +13,8 @@ /* Type of the function that is called to input data. The function will - * return EOF if no more data is available. - */ +** return EOF if no more data is available. +*/ typedef int __fastcall__ (*getfunc) (void* data); /* Type of the function that is called to put back unused data */ @@ -23,9 +23,9 @@ typedef int __fastcall__ (*ungetfunc) (int c, void* data); /* Control structure passed to the low level worker function. - * Beware: This structure is mirrored in the _scanf.inc assembler include - * file, so check this when altering the structure. - */ +** Beware: This structure is mirrored in the _scanf.inc assembler include +** file, so check this when altering the structure. +*/ struct scanfdata { getfunc get; /* Pointer to input routine */ ungetfunc unget; /* Pointer to pushback routine */ diff --git a/libsrc/common/abort.c b/libsrc/common/abort.c index 298ff0adb..43ad676a7 100644 --- a/libsrc/common/abort.c +++ b/libsrc/common/abort.c @@ -1,8 +1,8 @@ /* - * abort.c - * - * Ullrich von Bassewitz, 02.06.1998 - */ +** abort.c +** +** Ullrich von Bassewitz, 02.06.1998 +*/ diff --git a/libsrc/common/bsearch.c b/libsrc/common/bsearch.c index 7d64dbbe9..f6d32a5b5 100644 --- a/libsrc/common/bsearch.c +++ b/libsrc/common/bsearch.c @@ -1,8 +1,8 @@ /* - * bsearch.c - * - * Ullrich von Bassewitz, 17.06.1998 - */ +** bsearch.c +** +** Ullrich von Bassewitz, 17.06.1998 +*/ @@ -33,9 +33,9 @@ void* __fastcall__ bsearch (const void* key, const void* base, size_t n, last = current - 1; if (result == 0) { /* Found one entry that matches the search key. However there may be - * more than one entry with the same key value and ANSI guarantees - * that we return the first of a row of items with the same key. - */ + ** more than one entry with the same key value and ANSI guarantees + ** that we return the first of a row of items with the same key. + */ found = 1; } } diff --git a/libsrc/common/errno.s b/libsrc/common/errno.s index 5c2bf288e..3a1f1b6c8 100644 --- a/libsrc/common/errno.s +++ b/libsrc/common/errno.s @@ -12,8 +12,8 @@ ; ---------------------------------------------------------------------------- ; int __fastcall__ _directerrno (unsigned char code); ; /* Set errno to a specific error code, clear _oserror and return -1. Used -; * by the library. -; */ +; ** by the library. +; */ __directerrno: jsr __seterrno ; Set errno, returns with A = 0 @@ -23,10 +23,10 @@ __directerrno: ; ---------------------------------------------------------------------------- ; int __fastcall__ _mappederrno (unsigned char code); ; /* Set _oserror to the given platform specific error code. If it is a real -; * error code (not zero) set errno to the corresponding system error code -; * and return -1. Otherwise return zero. -; * Used by the library. -; */ +; ** error code (not zero) set errno to the corresponding system error code +; ** and return -1. Otherwise return zero. +; ** Used by the library. +; */ __mappederrno: sta __oserror ; Store the error code diff --git a/libsrc/common/errormsg.c b/libsrc/common/errormsg.c index d73ca652c..162dad085 100644 --- a/libsrc/common/errormsg.c +++ b/libsrc/common/errormsg.c @@ -1,11 +1,8 @@ /* - * errormsg.c - * - * Ullrich von Bassewitz, 17.05.2000 - * - * Must be a C function, since we have otherwise problems with the different - * character sets. - */ +** errormsg.c +** +** Ullrich von Bassewitz, 17.05.2000 +*/ diff --git a/libsrc/common/fdopen.c b/libsrc/common/fdopen.c index 43559ce8b..a3e482ffe 100644 --- a/libsrc/common/fdopen.c +++ b/libsrc/common/fdopen.c @@ -1,8 +1,8 @@ /* - * fdopen.c - * - * Ullrich von Bassewitz, 17.06.1998 - */ +** fdopen.c +** +** Ullrich von Bassewitz, 17.06.1998 +*/ diff --git a/libsrc/common/fgetc.c b/libsrc/common/fgetc.c index c873cd1d0..b4ba18d73 100644 --- a/libsrc/common/fgetc.c +++ b/libsrc/common/fgetc.c @@ -1,9 +1,9 @@ /* - * fgetc.c - * - * (C) Copyright 1998, 2002 Ullrich von Bassewitz (uz@cc65.org) - * - */ +** fgetc.c +** +** (C) Copyright 1998, 2002 Ullrich von Bassewitz (uz@cc65.org) +** +*/ diff --git a/libsrc/common/fgetpos.c b/libsrc/common/fgetpos.c index 796792afa..67fee5907 100644 --- a/libsrc/common/fgetpos.c +++ b/libsrc/common/fgetpos.c @@ -1,8 +1,8 @@ /* - * fgetpos.c - * - * Christian Groessler, 07-Aug-2000 - */ +** fgetpos.c +** +** Christian Groessler, 07-Aug-2000 +*/ diff --git a/libsrc/common/fgets.c b/libsrc/common/fgets.c index 259f3904e..21a991fd6 100644 --- a/libsrc/common/fgets.c +++ b/libsrc/common/fgets.c @@ -1,8 +1,8 @@ /* - * Ullrich von Bassewitz, 11.08.1998 - * - * char* fgets (char* s, int size, FILE* f); - */ +** Ullrich von Bassewitz, 11.08.1998 +** +** char* fgets (char* s, int size, FILE* f); +*/ diff --git a/libsrc/common/fputc.c b/libsrc/common/fputc.c index 73d4860a7..b623949d3 100644 --- a/libsrc/common/fputc.c +++ b/libsrc/common/fputc.c @@ -1,8 +1,8 @@ /* - * fputc.c - * - * Ullrich von Bassewitz, 02.06.1998 - */ +** fputc.c +** +** Ullrich von Bassewitz, 02.06.1998 +*/ diff --git a/libsrc/common/fputs.c b/libsrc/common/fputs.c index 26c20cbe2..be476a3f0 100644 --- a/libsrc/common/fputs.c +++ b/libsrc/common/fputs.c @@ -1,8 +1,8 @@ /* - * int fputs (const char* s, FILE* f); - * - * Ullrich von Bassewitz, 11.08.1998 - */ +** int fputs (const char* s, FILE* f); +** +** Ullrich von Bassewitz, 11.08.1998 +*/ diff --git a/libsrc/common/free.s b/libsrc/common/free.s index b6b77aae8..00b5e63f8 100644 --- a/libsrc/common/free.s +++ b/libsrc/common/free.s @@ -10,8 +10,8 @@ ; ; void free (void* block) ; /* Release an allocated memory block. The function will accept NULL pointers -; * (and do nothing in this case). -; */ +; ** (and do nothing in this case). +; */ ; { ; unsigned* b; ; unsigned size; @@ -34,8 +34,8 @@ ; _hptr = (unsigned*) (((int) _hptr) - size); ; ; /* Check if the last block in the freelist is now at heap top. If so, -; * remove this block from the freelist. -; */ +; ** remove this block from the freelist. +; */ ; if (f = _hlast) { ; if (((int) f) + f->size == (int) _hptr) { ; /* Remove the last block */ @@ -185,10 +185,10 @@ _free: sta ptr2 ; ; void _hadd (void* mem, size_t size) ; /* Add an arbitrary memory block to the heap. This function is used by -; * free(), but it does also allow usage of otherwise unused memory -; * blocks as heap space. The given block is entered in the free list -; * without any checks, so beware! -; */ +; ** free(), but it does also allow usage of otherwise unused memory +; ** blocks as heap space. The given block is entered in the free list +; ** without any checks, so beware! +; */ ; { ; struct freeblock* f; ; struct freeblock* left; @@ -212,10 +212,10 @@ _free: sta ptr2 ; } else { ; ; /* We have to search the free list. As we are doing so, we check -; * if it is possible to combine this block with another already -; * existing block. Beware: The block may be the "missing link" -; * between *two* other blocks. -; */ +; ** if it is possible to combine this block with another already +; ** existing block. Beware: The block may be the "missing link" +; ** between *two* other blocks. +; */ ; left = 0; ; right = _hfirst; ; while (right && f > right) { @@ -224,10 +224,10 @@ _free: sta ptr2 ; } ; ; -; /* Ok, the current block must be inserted between left and right (but -; * beware: one of the two may be zero!). Also check for the condition -; * that we have to merge two or three blocks. -; */ +; /* OK, the current block must be inserted between left and right (but +; ** beware: one of the two may be zero!). Also check for the condition +; ** that we have to merge two or three blocks. +; */ ; if (right) { ; /* Check if we must merge the block with the right one */ ; if (((unsigned) f) + size == (unsigned) right) { diff --git a/libsrc/common/freopen.c b/libsrc/common/freopen.c index 3c4d92ee0..d79d3cf15 100644 --- a/libsrc/common/freopen.c +++ b/libsrc/common/freopen.c @@ -1,8 +1,8 @@ /* - * freopen.c - * - * Ullrich von Bassewitz, 17.06.1998 - */ +** freopen.c +** +** Ullrich von Bassewitz, 17.06.1998 +*/ @@ -28,8 +28,8 @@ FILE* __fastcall__ freopen (const char* name, const char* mode, FILE* f) } /* Close the file. Don't bother setting the flag, it will get - * overwritten by _fopen. - */ + ** overwritten by _fopen. + */ if (close (f->f_fd) < 0) { /* An error occured, errno is already set */ return 0; diff --git a/libsrc/common/fscanf.s b/libsrc/common/fscanf.s index e519fbdd8..a3d1ec0a1 100644 --- a/libsrc/common/fscanf.s +++ b/libsrc/common/fscanf.s @@ -27,8 +27,8 @@ ParamSize: .res 1 ; Number of parameter bytes ; va_start (ap, format); ; ; /* Call vfscanf(). Since we know that va_end won't do anything, we will -; * save the call and return the value directly. -; */ +; ** save the call and return the value directly. +; */ ; return vfscanf (f, format, ap); ; } ; diff --git a/libsrc/common/fseek.c b/libsrc/common/fseek.c index bd47383fd..5ad511ecd 100644 --- a/libsrc/common/fseek.c +++ b/libsrc/common/fseek.c @@ -1,9 +1,9 @@ /* - * fseek.c - * - * Christian Groessler, 2000-08-07 - * Ullrich von Bassewitz, 2004-05-12 - */ +** fseek.c +** +** Christian Groessler, 2000-08-07 +** Ullrich von Bassewitz, 2004-05-12 +*/ @@ -31,8 +31,8 @@ int __fastcall__ fseek (register FILE* f, long offset, int whence) } /* If we have a pushed back character, and whence is relative to the - * current position, correct the offset. - */ + ** current position, correct the offset. + */ if ((f->f_flags & _FPUSHBACK) && whence == SEEK_CUR) { --offset; } @@ -41,11 +41,11 @@ int __fastcall__ fseek (register FILE* f, long offset, int whence) res = lseek(f->f_fd, offset, whence); /* If the seek was successful. Discard any effects of the ungetc function, - * and clear the end-of-file indicator. Otherwise set the error indicator - * on the stream, and return -1. We will check for >= 0 here, because that - * saves some code, and we don't have files with 2 gigabytes in size - * anyway:-) - */ + ** and clear the end-of-file indicator. Otherwise set the error indicator + ** on the stream, and return -1. We will check for >= 0 here, because that + ** saves some code, and we don't have files with 2 gigabytes in size + ** anyway:-) + */ if (res >= 0) { f->f_flags &= ~(_FEOF | _FPUSHBACK); return 0; diff --git a/libsrc/common/fsetpos.c b/libsrc/common/fsetpos.c index 9f57ca415..14690f520 100644 --- a/libsrc/common/fsetpos.c +++ b/libsrc/common/fsetpos.c @@ -1,8 +1,8 @@ /* - * fsetpos.c - * - * Christian Groessler, 07-Aug-2000 - */ +** fsetpos.c +** +** Christian Groessler, 07-Aug-2000 +*/ diff --git a/libsrc/common/ftell.c b/libsrc/common/ftell.c index efc2e7ce0..3a4134c72 100644 --- a/libsrc/common/ftell.c +++ b/libsrc/common/ftell.c @@ -1,9 +1,9 @@ /* - * ftell.c - * - * Christian Groessler, 2000-08-07 - * Ullrich von Bassewitz, 2004-05-13 - */ +** ftell.c +** +** Christian Groessler, 2000-08-07 +** Ullrich von Bassewitz, 2004-05-13 +*/ @@ -34,8 +34,8 @@ long __fastcall__ ftell (register FILE* f) pos = lseek (f->f_fd, 0L, SEEK_CUR); /* If we didn't have an error, correct the return value in case we have - * a pushed back character. - */ + ** a pushed back character. + */ if (pos > 0 && (f->f_flags & _FPUSHBACK)) { --pos; } diff --git a/libsrc/common/getchar.c b/libsrc/common/getchar.c index 363be0200..913a4f5d6 100644 --- a/libsrc/common/getchar.c +++ b/libsrc/common/getchar.c @@ -1,8 +1,8 @@ /* - * getchar.c - * - * Ullrich von Bassewitz, 11.12.1998 - */ +** getchar.c +** +** Ullrich von Bassewitz, 11.12.1998 +*/ diff --git a/libsrc/common/getopt.c b/libsrc/common/getopt.c index 9faca33a2..34b13b1e6 100644 --- a/libsrc/common/getopt.c +++ b/libsrc/common/getopt.c @@ -1,17 +1,17 @@ /* - * This is part of a changed public domain getopt implementation that - * had the following text on top: - * - * I got this off net.sources from Henry Spencer. - * It is a public domain getopt(3) like in System V. - * I have made the following modifications: - * - * A test main program was added, ifdeffed by GETOPT. - * This main program is a public domain implementation - * of the getopt(1) program like in System V. The getopt - * program can be used to standardize shell option handling. - * e.g. cc -DGETOPT getopt.c -o getopt - */ +** This is part of a changed public domain getopt implementation that +** had the following text on top: +** +** I got this off net.sources from Henry Spencer. +** It is a public domain getopt(3) like in System V. +** I have made the following modifications: +** +** A test main program was added, ifdeffed by GETOPT. +** This main program is a public domain implementation +** of the getopt(1) program like in System V. The getopt +** program can be used to standardize shell option handling. +** e.g. cc -DGETOPT getopt.c -o getopt +*/ #include #include diff --git a/libsrc/common/gets.c b/libsrc/common/gets.c index 4da352430..2936c70de 100644 --- a/libsrc/common/gets.c +++ b/libsrc/common/gets.c @@ -1,8 +1,8 @@ /* - * gets.c - * - * Ullrich von Bassewitz, 11.08.1998 - */ +** gets.c +** +** Ullrich von Bassewitz, 11.08.1998 +*/ diff --git a/libsrc/common/locale.c b/libsrc/common/locale.c index 3b9c7506a..078d54119 100644 --- a/libsrc/common/locale.c +++ b/libsrc/common/locale.c @@ -1,8 +1,8 @@ /* - * locale.c - * - * Ullrich von Bassewitz, 11.12.1998 - */ +** locale.c +** +** Ullrich von Bassewitz, 11.12.1998 +*/ diff --git a/libsrc/common/localtime.c b/libsrc/common/localtime.c index db2528444..cc6298f8c 100644 --- a/libsrc/common/localtime.c +++ b/libsrc/common/localtime.c @@ -55,9 +55,9 @@ struct tm* __fastcall__ localtime (const time_t* timep) } /* Since our ints are just 16 bits, split the given time into seconds, - * hours and days. Each of the values will fit in a 16 bit variable. - * The mktime routine will then do the rest. - */ + ** hours and days. Each of the values will fit in a 16 bit variable. + ** The mktime routine will then do the rest. + */ timebuf.tm_sec = t % 3600; timebuf.tm_min = 0; timebuf.tm_hour = (t / 3600) % 24; diff --git a/libsrc/common/malloc.s b/libsrc/common/malloc.s index 19add25a7..3118e2e56 100644 --- a/libsrc/common/malloc.s +++ b/libsrc/common/malloc.s @@ -10,17 +10,17 @@ ; ; void* malloc (size_t size) ; /* Allocate memory from the given heap. The function returns a pointer to the -; * allocated memory block or a NULL pointer if not enough memory is available. -; * Allocating a zero size block is not allowed. -; */ +; ** allocated memory block or a NULL pointer if not enough memory is available. +; ** Allocating a zero size block is not allowed. +; */ ; { ; struct freeblock* f; ; unsigned* p; ; ; ; /* Check for a size of zero, then add the administration space and round -; * up the size if needed. -; */ +; ** up the size if needed. +; */ ; if (size == 0) { ; return 0; ; } @@ -39,10 +39,10 @@ ; if (f) { ; ; /* We found a block big enough. If the block can hold just the -; * requested size, use the block in full. Beware: When slicing blocks, -; * there must be space enough to create a new one! If this is not the -; * case, then use the complete block. -; */ +; ** requested size, use the block in full. Beware: When slicing blocks, +; ** there must be space enough to create a new one! If this is not the +; ** case, then use the complete block. +; */ ; if (f->size - size < sizeof (struct freeblock)) { ; ; /* Use the actual size */ @@ -66,9 +66,9 @@ ; ; } else { ; -; /* We must slice the block found. Cut off space from the upper -; * end, so we can leave the actual free block chain intact. -; */ +; /* We must slice the block found. Cut off space from the upper +; ** end, so we can leave the actual free block chain intact. +; */ ; ; /* Decrement the size of the block */ ; f->size -= size; @@ -84,8 +84,8 @@ ; } else { ; ; /* We did not find a block big enough. Try to use new space from the -; * heap top. -; */ +; ** heap top. +; */ ; if (((unsigned) _hend) - ((unsigned) _hptr) < size) { ; /* Out of heap space */ ; return 0; diff --git a/libsrc/common/mktime.c b/libsrc/common/mktime.c index 691e61f6d..423727751 100644 --- a/libsrc/common/mktime.c +++ b/libsrc/common/mktime.c @@ -77,9 +77,9 @@ static unsigned char __fastcall__ IsLeapYear (unsigned Year) time_t __fastcall__ mktime (register struct tm* TM) /* Make a time in seconds since 1/1/1970 from the broken down time in TM. - * A call to mktime does also correct the time in TM to contain correct - * values. - */ +** A call to mktime does also correct the time in TM to contain correct +** values. +*/ { register div_t D; int Max; @@ -118,8 +118,8 @@ time_t __fastcall__ mktime (register struct tm* TM) TM->tm_mday += D.quot; /* Adjust month and year. This is an iterative process, since changing - * the month will change the allowed days for this month. - */ + ** the month will change the allowed days for this month. + */ while (1) { /* Make sure, month is in the range 0..11 */ @@ -131,8 +131,8 @@ time_t __fastcall__ mktime (register struct tm* TM) TM->tm_year += D.quot; /* Now check if mday is in the correct range, if not, correct month - * and eventually year and repeat the process. - */ + ** and eventually year and repeat the process. + */ if (TM->tm_mon == FEBRUARY && IsLeapYear (TM->tm_year + 1900)) { Max = 29; } else { @@ -154,18 +154,18 @@ time_t __fastcall__ mktime (register struct tm* TM) } /* Ok, all time/date fields are now correct. Calculate the days in this - * year. - */ + ** year. + */ TM->tm_yday = MonthDays[TM->tm_mon] + TM->tm_mday - 1; if (TM->tm_mon > FEBRUARY && IsLeapYear (TM->tm_year + 1900)) { ++TM->tm_yday; } /* Calculate days since 1/1/1970. In the complete epoch (1/1/1970 to - * somewhere in 2038) all years dividable by 4 are leap years, so - * dividing by 4 gives the days that must be added cause of leap years. - * (and the last leap year before 1970 was 1968) - */ + ** somewhere in 2038) all years dividable by 4 are leap years, so + ** dividing by 4 gives the days that must be added cause of leap years. + ** (and the last leap year before 1970 was 1968) + */ DayCount = ((unsigned) (TM->tm_year-70)) * 365U + (((unsigned) (TM->tm_year-(68+1))) / 4) + TM->tm_yday; diff --git a/libsrc/common/pmemalign.c b/libsrc/common/pmemalign.c index e1dc497a2..8f055a3fc 100644 --- a/libsrc/common/pmemalign.c +++ b/libsrc/common/pmemalign.c @@ -7,7 +7,7 @@ /* */ /* */ /* (C) 2004-2005 Ullrich von Bassewitz */ -/* Römerstrasse 52 */ +/* Roemerstrasse 52 */ /* D-70794 Filderstadt */ /* EMail: uz@cc65.org */ /* */ @@ -43,23 +43,23 @@ /* This is a very simple version of an aligned memory allocator. We will - * allocate a greater block, so that we can place the aligned block (that is - * returned) within it. We use our knowledge about the internal heap - * structures to free the unused parts of the bigger block (the two chunks - * below and above the aligned block). - */ +** allocate a greater block, so that we can place the aligned block (that is +** returned) within it. We use our knowledge about the internal heap +** structures to free the unused parts of the bigger block (the two chunks +** below and above the aligned block). +*/ int __fastcall__ posix_memalign (void** memptr, size_t alignment, size_t size) /* Allocate a block of memory with the given "size", which is aligned to a - * memory address that is a multiple of "alignment". "alignment" MUST NOT be - * zero, and MUST be a power of two; otherwise, this function will return - * EINVAL. The function returns ENOMEM if not enough memory is available - * to satisfy the request. "memptr" must point to a variable; that variable - * will return the address of the allocated memory. Use free() to release that - * allocated block. - */ +** memory address that is a multiple of "alignment". "alignment" MUST NOT be +** zero, and MUST be a power of two; otherwise, this function will return +** EINVAL. The function returns ENOMEM if not enough memory is available +** to satisfy the request. "memptr" must point to a variable; that variable +** will return the address of the allocated memory. Use free() to release that +** allocated block. +*/ { size_t rawsize; size_t uppersize; @@ -81,11 +81,11 @@ int __fastcall__ posix_memalign (void** memptr, size_t alignment, size_t size) } /* Augment the block size up to the alignment, and allocate memory. - * We don't need to account for the additional admin. data that's needed to - * manage the used block, because the block returned by malloc() has that - * overhead added one time; and, the worst thing that might happen is that - * we cannot free the upper and lower blocks. - */ + ** We don't need to account for the additional admin. data that's needed to + ** manage the used block, because the block returned by malloc() has that + ** overhead added one time; and, the worst thing that might happen is that + ** we cannot free the upper and lower blocks. + */ b = malloc (size + alignment); /* Handle out-of-memory */ @@ -95,26 +95,26 @@ int __fastcall__ posix_memalign (void** memptr, size_t alignment, size_t size) } /* Create (and return) a new pointer that points to the user-visible - * aligned block. - */ + ** aligned block. + */ u = *memptr = (struct usedblock*) (((unsigned)b + alignment) & ~alignment); /* Get a pointer to the (raw) upper block */ p = (struct usedblock*) ((char*)u + size); /* Get the raw-block pointer, which is located just below the visible - * unaligned block. The first word of this raw block is the total size - * of the block, including the admin. space. - */ + ** unaligned block. The first word of this raw block is the total size + ** of the block, including the admin. space. + */ b = (b-1)->start; rawsize = b->size; /* Check if we can free the space above the user block. That is the case - * if the size of the block is at least sizeof (struct freeblock) bytes, - * and the size of the remaining block is at least that size, too. - * If the upper block is smaller, then we just will pass it to the caller, - * together with the requested aligned block. - */ + ** if the size of the block is at least sizeof (struct freeblock) bytes, + ** and the size of the remaining block is at least that size, too. + ** If the upper block is smaller, then we just will pass it to the caller, + ** together with the requested aligned block. + */ uppersize = rawsize - (lowersize = (char*)p - (char*)b); if (uppersize >= sizeof (struct freeblock) && lowersize >= sizeof (struct freeblock)) { @@ -131,20 +131,20 @@ int __fastcall__ posix_memalign (void** memptr, size_t alignment, size_t size) } /* Check if we can free the space below the user block. That is the case - * if the size of the block is at least sizeof (struct freeblock) bytes, - * and the size of the remaining block is at least that size, too. If the - * lower block is smaller, we just will pass it to the caller, together - * with the requested aligned block. - * Beware: We need an additional struct usedblock, in the lower block, - * which is part of the block that is passed back to the caller. - */ + ** if the size of the block is at least sizeof (struct freeblock) bytes, + ** and the size of the remaining block is at least that size, too. If the + ** lower block is smaller, we just will pass it to the caller, together + ** with the requested aligned block. + ** Beware: We need an additional struct usedblock, in the lower block, + ** which is part of the block that is passed back to the caller. + */ lowersize = ((char*)u - (char*)b) - sizeof (struct usedblock); if ( lowersize >= sizeof (struct freeblock) && (rawsize - lowersize) >= sizeof (struct freeblock)) { /* b already points to the raw lower-block. - * Set up the usedblock structure. - */ + ** Set up the usedblock structure. + */ b->size = lowersize; b->start = b; @@ -159,11 +159,11 @@ int __fastcall__ posix_memalign (void** memptr, size_t alignment, size_t size) } /* u points to the user-visible block, while b points to the raw block, - * and rawsize contains the length of the raw block. Set up the usedblock - * structure, but beware: If we didn't free the lower block, then it is - * split; which means that we must use b to write the size, - * and u to write the start field. - */ + ** and rawsize contains the length of the raw block. Set up the usedblock + ** structure, but beware: If we didn't free the lower block, then it is + ** split; which means that we must use b to write the size, + ** and u to write the start field. + */ b->size = rawsize; (u-1)->start = b; diff --git a/libsrc/common/puts.c b/libsrc/common/puts.c index b0ad5180f..dbca603f2 100644 --- a/libsrc/common/puts.c +++ b/libsrc/common/puts.c @@ -1,8 +1,8 @@ /* - * puts.c - * - * Ullrich von Bassewitz, 11.08.1998 - */ +** puts.c +** +** Ullrich von Bassewitz, 11.08.1998 +*/ diff --git a/libsrc/common/qsort.c b/libsrc/common/qsort.c index 383962934..df02095ed 100644 --- a/libsrc/common/qsort.c +++ b/libsrc/common/qsort.c @@ -1,8 +1,8 @@ /* - * qsort.c - * - * Ullrich von Bassewitz, 09.12.1998 - */ +** qsort.c +** +** Ullrich von Bassewitz, 09.12.1998 +*/ @@ -14,8 +14,8 @@ static void QuickSort (register unsigned char* Base, int Lo, int Hi, register size_t Size, int (*Compare)(const void*, const void*)) /* Internal recursive function. Works with ints, but this shouldn't be - * a problem. - */ +** a problem. +*/ { int I, J; @@ -62,5 +62,3 @@ void __fastcall__ qsort (void* base, size_t nmemb, size_t size, - - diff --git a/libsrc/common/realloc.c b/libsrc/common/realloc.c index d9850b591..c47dbbb98 100644 --- a/libsrc/common/realloc.c +++ b/libsrc/common/realloc.c @@ -66,10 +66,10 @@ void* __fastcall__ realloc (void* block, register size_t size) } /* The word below the user block contains a pointer to the start of the - * raw memory block. The first word of this raw memory block is the full - * size of the block. Get a pointer to the real block, get the old block - * size. - */ + ** raw memory block. The first word of this raw memory block is the full + ** size of the block. Get a pointer to the real block, get the old block + ** size. + */ b = (((struct usedblock*) block) - 1)->start; oldsize = b->size; @@ -87,16 +87,16 @@ void* __fastcall__ realloc (void* block, register size_t size) } /* The given block was not located on top of the heap, or there's no - * room left. Try to allocate a new block and copy the data. - */ + ** room left. Try to allocate a new block and copy the data. + */ if (newblock = malloc (size)) { /* Adjust the old size to the user visible portion */ oldsize -= HEAP_ADMIN_SPACE; /* If the new block is larger than the old one, copy the old - * data only - */ + ** data only + */ if (size > oldsize) { size = oldsize; } @@ -110,4 +110,3 @@ void* __fastcall__ realloc (void* block, register size_t size) - diff --git a/libsrc/common/rewind.c b/libsrc/common/rewind.c index 583b779f9..a4cdfa97c 100644 --- a/libsrc/common/rewind.c +++ b/libsrc/common/rewind.c @@ -1,8 +1,8 @@ /* - * rewind.c - * - * Christian Groessler, 07-Aug-2000 - */ +** rewind.c +** +** Christian Groessler, 07-Aug-2000 +*/ diff --git a/libsrc/common/sleep.c b/libsrc/common/sleep.c index 3a8e8e2e0..b31174746 100644 --- a/libsrc/common/sleep.c +++ b/libsrc/common/sleep.c @@ -1,10 +1,10 @@ /* - * sleep.c - * - * Stefan Haubenthal, 2003-06-11 - * Ullrich von Bassewitz, 2003-06-12 - * - */ +** sleep.c +** +** Stefan Haubenthal, 2003-06-11 +** Ullrich von Bassewitz, 2003-06-12 +** +*/ diff --git a/libsrc/common/sscanf.s b/libsrc/common/sscanf.s index 5e580e91f..941f54e92 100644 --- a/libsrc/common/sscanf.s +++ b/libsrc/common/sscanf.s @@ -28,8 +28,8 @@ ParamSize: .res 1 ; Number of parameter bytes ; va_start (ap, format); ; ; /* Call vsscanf(). Since we know that va_end won't do anything, we will -; * save the call and return the value directly. -; */ +; ** save the call and return the value directly. +; */ ; return vsscanf (str, format, ap); ; } ; diff --git a/libsrc/common/strqtok.c b/libsrc/common/strqtok.c index 6e791f898..1eb4fa80a 100644 --- a/libsrc/common/strqtok.c +++ b/libsrc/common/strqtok.c @@ -1,15 +1,15 @@ /* - * strqtok() is like strtok(): It finds pieces of text, in a string, that are - * surrounded by given delimiter characters. It returns each piece, in turn, - * as a string, until every piece has been found. Then, it returns NULL. But, - * strqtok() recognizes quotation marks. A mark makes delimiters look ordinary - * until another quotation mark is seen. That allows us to include delimiters - * in tokens. (This version doesn't allow escaped quotation marks.) - * - * 2014-04-19, Daniel Serpell - * 2014-04-21, Paul Foerster - * 2014-04-25, Greg King - */ +** strqtok() is like strtok(): It finds pieces of text, in a string, that are +** surrounded by given delimiter characters. It returns each piece, in turn, +** as a string, until every piece has been found. Then, it returns NULL. But, +** strqtok() recognizes quotation marks. A mark makes delimiters look ordinary +** until another quotation mark is seen. That allows us to include delimiters +** in tokens. (This version doesn't allow escaped quotation marks.) +** +** 2014-04-19, Daniel Serpell +** 2014-04-21, Paul Foerster +** 2014-04-25, Greg King +*/ #include @@ -49,8 +49,8 @@ char* __fastcall__ strqtok (register char* s1, const char* s2) } if (c == '\0') { /* The end of the last token is the end of the token list; - * don't go beyond it. - */ + ** don't go beyond it. + */ goto found; } @@ -70,8 +70,8 @@ char* __fastcall__ strqtok (register char* s1, const char* s2) /* Search for the end of a quoted token. */ if ((s1 = strchr (s1, '\"')) == NULL) { /* The quoted token ended with '\0'; therefore, point to a '\0', - * so that the next call will return NULL. - */ + ** so that the next call will return NULL. + */ next = ""; return start; } diff --git a/libsrc/common/strtok.c b/libsrc/common/strtok.c index 30e3e81e4..47a2829ed 100644 --- a/libsrc/common/strtok.c +++ b/libsrc/common/strtok.c @@ -1,8 +1,8 @@ /* - * strtok.c - * - * Ullrich von Bassewitz, 11.12.1998 - */ +** strtok.c +** +** Ullrich von Bassewitz, 11.12.1998 +*/ @@ -43,8 +43,8 @@ char* __fastcall__ strtok (register char* s1, const char* s2) } /* Search the address of the first element in s1 that equals none - * of the characters in s2. - */ + ** of the characters in s2. + */ while ((c = *s1) && strchr (s2, c) != 0) { ++s1; } diff --git a/libsrc/common/strtol.c b/libsrc/common/strtol.c index f3ce08a35..bf328edfd 100644 --- a/libsrc/common/strtol.c +++ b/libsrc/common/strtol.c @@ -33,8 +33,8 @@ long __fastcall__ strtol (const char* nptr, char** endptr, int base) } /* If base is zero, we may have a 0 or 0x prefix. If base is 16, we may - * have a 0x prefix. - */ + ** have a 0x prefix. + */ if (base == 0) { if (*S == '0') { ++S; @@ -52,8 +52,8 @@ long __fastcall__ strtol (const char* nptr, char** endptr, int base) } /* Determine the maximum valid number and (if the number is equal to this - * value) the maximum valid digit. - */ + ** value) the maximum valid digit. + */ if (Minus) { MaxVal = LONG_MIN; } else { @@ -98,8 +98,8 @@ long __fastcall__ strtol (const char* nptr, char** endptr, int base) } /* Store the end pointer. If no conversion was performed, the value of - * nptr is returned in endptr. - */ + ** nptr is returned in endptr. + */ if (endptr) { if (CvtCount > 0) { *endptr = (char*) S; diff --git a/libsrc/common/strtoul.c b/libsrc/common/strtoul.c index 54466db36..a186fc681 100644 --- a/libsrc/common/strtoul.c +++ b/libsrc/common/strtoul.c @@ -33,8 +33,8 @@ unsigned long __fastcall__ strtoul (const char* nptr, char** endptr, int base) } /* If base is zero, we may have a 0 or 0x prefix. If base is 16, we may - * have a 0x prefix. - */ + ** have a 0x prefix. + */ if (base == 0) { if (*S == '0') { ++S; @@ -52,8 +52,8 @@ unsigned long __fastcall__ strtoul (const char* nptr, char** endptr, int base) } /* Determine the maximum valid number and (if the number is equal to this - * value) the maximum valid digit. - */ + ** value) the maximum valid digit. + */ MaxDigit = ULONG_MAX % base; MaxVal = ULONG_MAX / base; @@ -93,8 +93,8 @@ unsigned long __fastcall__ strtoul (const char* nptr, char** endptr, int base) } /* Store the end pointer. If no conversion was performed, the value of - * nptr is returned in endptr. - */ + ** nptr is returned in endptr. + */ if (endptr) { if (CvtCount > 0) { *endptr = (char*) S; diff --git a/libsrc/common/strxfrm.c b/libsrc/common/strxfrm.c index 8bf9795b9..fb0891919 100644 --- a/libsrc/common/strxfrm.c +++ b/libsrc/common/strxfrm.c @@ -1,8 +1,8 @@ /* - * strxfrm.c - * - * Ullrich von Bassewitz, 11.12.1998 - */ +** strxfrm.c +** +** Ullrich von Bassewitz, 11.12.1998 +*/ diff --git a/libsrc/common/system.c b/libsrc/common/system.c index 6626ace87..01dec1ad8 100644 --- a/libsrc/common/system.c +++ b/libsrc/common/system.c @@ -1,9 +1,9 @@ /* - * system.c - * - * Stefan Haubenthal, 2003-05-26 - * Ullrich von Bassewitz, 2003-05-27 - */ +** system.c +** +** Stefan Haubenthal, 2003-05-26 +** Ullrich von Bassewitz, 2003-05-27 +*/ #include #include diff --git a/libsrc/common/vfscanf.s b/libsrc/common/vfscanf.s index 2123085c8..c7d6e5564 100644 --- a/libsrc/common/vfscanf.s +++ b/libsrc/common/vfscanf.s @@ -31,9 +31,9 @@ d: .addr _fgetc ; GET ; /* Standard C function */ ; { ; /* Initialize the data struct. We do only need the given file as user data, -; * because the (getfunc) and (ungetfunc) functions are crafted so that they -; * match the standard-I/O fgetc() and ungetc(). -; */ +; ** because the (getfunc) and (ungetfunc) functions are crafted so that they +; ** match the standard-I/O fgetc() and ungetc(). +; */ ; static struct scanfdata d = { ; ( getfunc) fgetc, ; (ungetfunc) ungetc diff --git a/libsrc/common/vsscanf.s b/libsrc/common/vsscanf.s index a04404a0a..2bd967fa0 100644 --- a/libsrc/common/vsscanf.s +++ b/libsrc/common/vsscanf.s @@ -94,8 +94,8 @@ L1: tax ; Save return value ; /* Push back a character onto the input stream */ ; { ; /* We do assume here that the _scanf routine will not push back anything -; * not read, so we can ignore c safely and won't check the index. -; */ +; ** not read, so we can ignore c safely and won't check the index. +; */ ; --d->index; ; return c; ; } @@ -129,8 +129,8 @@ L1: tax ; Save return value ; /* Standard C function */ ; { ; /* Initialize the data structs. The sscanfdata struct will be passed back -; * to the get and unget functions by _scanf(). -; */ +; ** to the get and unget functions by _scanf(). +; */ ; static struct sscanfdata sd; ; static const struct scanfdata d = { ; ( getfunc) get, diff --git a/libsrc/dbg/dbg.c b/libsrc/dbg/dbg.c index 00ff28722..8b09484f6 100644 --- a/libsrc/dbg/dbg.c +++ b/libsrc/dbg/dbg.c @@ -1,9 +1,9 @@ /* - * dbg.c - * - * Ullrich von Bassewitz, 08.08.1998 - * - */ +** dbg.c +** +** Ullrich von Bassewitz, 08.08.1998 +** +*/ @@ -335,8 +335,8 @@ BreakPoint* DbgGetBreakSlot (void); BreakPoint* DbgIsBreak (unsigned Addr); /* Check if there is a user breakpoint at the given address, if so, return - * a pointer to the slot, else return 0. - */ +** a pointer to the slot, else return 0. +*/ @@ -729,8 +729,8 @@ static void DbgResetTmpBreaks (void) static unsigned char DbgTmpBreaksOk (void) /* Check if the temporary breakpoints can be set, if so, return 1, if not, - * reset them all and return 0. - */ +** reset them all and return 0. +*/ { unsigned char i; BreakPoint* B = DbgBreaks; @@ -755,8 +755,8 @@ static unsigned char DbgTmpBreaksOk (void) static unsigned AsmBack (unsigned mem, unsigned char lines) /* Go back in the assembler window the given number of lines (calculate - * new start address). - */ +** new start address). +*/ { unsigned cur; unsigned adr [32]; @@ -776,8 +776,8 @@ static unsigned AsmBack (unsigned mem, unsigned char lines) return adr [(in - lines - 1) & 0x1F]; } else { /* The requested address is inside an instruction, go back - * one more byte and try again. - */ + ** one more byte and try again. + */ ++offs; break; } @@ -1347,8 +1347,8 @@ static void SingleStep (char StepInto) case OPC_BNE: case OPC_BEQ: /* Be sure not to set the breakpoint twice if this is a jump to - * the following instruction. - */ + ** the following instruction. + */ Offs = ((signed char*)brk_pc)[1]; if (Offs) { DbgSetTmpBreak (brk_pc + Offs + 2); @@ -1491,8 +1491,8 @@ void DbgEntry (void) } /* Only initialize variables here, don't do a display update. The actual - * display update will be done while waiting for user input. - */ + ** display update will be done while waiting for user input. + */ AsmHome (); UpdateReg (); /* Must update this (static later) */ StackHome (); diff --git a/libsrc/em/em-kernel.s b/libsrc/em/em-kernel.s index 21203d250..c982dac88 100644 --- a/libsrc/em/em-kernel.s +++ b/libsrc/em/em-kernel.s @@ -94,8 +94,8 @@ copy: lda (ptr1),y ;---------------------------------------------------------------------------- ; unsigned char em_uninstall (void); ; /* Uninstall the currently loaded driver and return an error code. -; * Note: This call does not free allocated memory. -; */ +; ** Note: This call does not free allocated memory. +; */ _em_uninstall: jsr emd_uninstall ; Call driver routine diff --git a/libsrc/em/em_commit.s b/libsrc/em/em_commit.s index 66af02df9..8be970b39 100644 --- a/libsrc/em/em_commit.s +++ b/libsrc/em/em_commit.s @@ -3,11 +3,11 @@ ; ; void em_commit (void); ; /* Commit changes in the memory window to extended storage. If the contents -; * of the memory window have been changed, these changes may be lost if -; * em_map, em_copyfrom or em_copyto are called without calling em_commit -; * first. Note: Not calling em_commit does not mean that the changes are -; * discarded, it does just mean that some drivers will discard the changes. -; */ +; ** of the memory window have been changed, these changes may be lost if +; ** em_map, em_copyfrom or em_copyto are called without calling em_commit +; ** first. Note: Not calling em_commit does not mean that the changes are +; ** discarded, it does just mean that some drivers will discard the changes. +; */ .include "em-kernel.inc" diff --git a/libsrc/em/em_map.s b/libsrc/em/em_map.s index 9897243a3..825d68efc 100644 --- a/libsrc/em/em_map.s +++ b/libsrc/em/em_map.s @@ -3,8 +3,8 @@ ; ; void* __fastcall__ em_map (unsigned page); ; /* Unmap the current page from memory and map a new one. The function returns -; * a pointer to the location of the page in memory. -; */ +; ** a pointer to the location of the page in memory. +; */ .include "em-kernel.inc" diff --git a/libsrc/em/em_use.s b/libsrc/em/em_use.s index 8e4d57df0..e4fb7722e 100644 --- a/libsrc/em/em_use.s +++ b/libsrc/em/em_use.s @@ -3,12 +3,12 @@ ; ; void* __fastcall__ em_use (unsigned page); ; /* Tell the driver that the memory window is associated with a given page. -; * This call is very similar to em_map. The difference is that the driver -; * does not necessarily transfer the current contents of the extended -; * memory into the returned window. If you're going to just write to the -; * window and the current contents of the window are invalid or no longer -; * use, this call may perform better than em_map. -; */ +; ** This call is very similar to em_map. The difference is that the driver +; ** does not necessarily transfer the current contents of the extended +; ** memory into the returned window. If you're going to just write to the +; ** window and the current contents of the window are invalid or no longer +; ** use, this call may perform better than em_map. +; */ .include "em-kernel.inc" diff --git a/libsrc/geos-common/common/_afailed.c b/libsrc/geos-common/common/_afailed.c index e446cf565..2448534c0 100644 --- a/libsrc/geos-common/common/_afailed.c +++ b/libsrc/geos-common/common/_afailed.c @@ -1,8 +1,8 @@ /* - * _afailed.c - * - * Maciej 'YTM/Elysium' Witkowiak 28.10.2001 - */ +** _afailed.c +** +** Maciej 'YTM/Elysium' Witkowiak 28.10.2001 +*/ #include #include diff --git a/libsrc/geos-common/common/_poserror.c b/libsrc/geos-common/common/_poserror.c index e0a7723a1..eeb3f368e 100644 --- a/libsrc/geos-common/common/_poserror.c +++ b/libsrc/geos-common/common/_poserror.c @@ -1,8 +1,8 @@ /* - * _poserror.c - * - * Maciej 'YTM/Elysium' Witkowiak, 25.04.2003 - */ +** _poserror.c +** +** Maciej 'YTM/Elysium' Witkowiak, 25.04.2003 +*/ #include #include diff --git a/libsrc/geos-common/common/abort.c b/libsrc/geos-common/common/abort.c index 9bc839c7a..b7cb35eb9 100644 --- a/libsrc/geos-common/common/abort.c +++ b/libsrc/geos-common/common/abort.c @@ -1,8 +1,8 @@ /* - * abort.c - * - * Maciej 'YTM/Elysium' Witkowiak 15.7.2001 - */ +** abort.c +** +** Maciej 'YTM/Elysium' Witkowiak 15.7.2001 +*/ #include #include diff --git a/libsrc/geos-common/common/perror.c b/libsrc/geos-common/common/perror.c index 022968bf2..5c6ec2117 100644 --- a/libsrc/geos-common/common/perror.c +++ b/libsrc/geos-common/common/perror.c @@ -1,8 +1,8 @@ /* - * perror.c - * - * Maciej 'YTM/Elysium' Witkowiak, 15.07.2001 - */ +** perror.c +** +** Maciej 'YTM/Elysium' Witkowiak, 15.07.2001 +*/ #include #include diff --git a/libsrc/geos-common/common/sleep.c b/libsrc/geos-common/common/sleep.c index 94bd9fe79..ea18f8ead 100644 --- a/libsrc/geos-common/common/sleep.c +++ b/libsrc/geos-common/common/sleep.c @@ -1,9 +1,9 @@ /* - * sleep.c - * - * Maciej 'YTM/Elysium' Witkowiak, 16.08.2003 - * - */ +** sleep.c +** +** Maciej 'YTM/Elysium' Witkowiak, 16.08.2003 +** +*/ #include diff --git a/libsrc/geos-common/dlgbox/messagebox.c b/libsrc/geos-common/dlgbox/messagebox.c index a8774c3c0..533267be1 100644 --- a/libsrc/geos-common/dlgbox/messagebox.c +++ b/libsrc/geos-common/dlgbox/messagebox.c @@ -1,10 +1,9 @@ - /* - * char MessageBox (char mode, const char *format, ...) - * - * Maciej 'YTM/Elysium' Witkowiak, 17.08.2003 - * - */ +** char MessageBox (char mode, const char *format, ...) +** +** Maciej 'YTM/Elysium' Witkowiak, 17.08.2003 +** +*/ #include #include diff --git a/libsrc/geos-common/system/systime.c b/libsrc/geos-common/system/systime.c index 75b0fabb7..5eb87fef8 100644 --- a/libsrc/geos-common/system/systime.c +++ b/libsrc/geos-common/system/systime.c @@ -1,8 +1,8 @@ /* - * systime.c - * - * Maciej 'YTM/Elysium' Witkowiak, 22.11.2002 - */ +** systime.c +** +** Maciej 'YTM/Elysium' Witkowiak, 22.11.2002 +*/ #include #include diff --git a/libsrc/joystick/joy-kernel.s b/libsrc/joystick/joy-kernel.s index d21727089..1ba3056d8 100644 --- a/libsrc/joystick/joy-kernel.s +++ b/libsrc/joystick/joy-kernel.s @@ -116,8 +116,8 @@ set: sta joy_vectors,x ;---------------------------------------------------------------------------- ; unsigned char joy_uninstall (void); ; /* Uninstall the currently loaded driver. Note: This call does not free -; * allocated memory. -; */ +; ** allocated memory. +; */ _joy_uninstall: lda #$60 ; RTS opcode diff --git a/libsrc/mouse/mouse_buttons.s b/libsrc/mouse/mouse_buttons.s index 459c0a8e6..afca40c37 100644 --- a/libsrc/mouse/mouse_buttons.s +++ b/libsrc/mouse/mouse_buttons.s @@ -3,8 +3,8 @@ ; ; unsigned char mouse_buttons (void); ; /* Return a bit mask encoding the states of the mouse buttons. Use the -; * MOUSE_BTN_XXX flags to decode a specific button. -; */ +; ** MOUSE_BTN_XXX flags to decode a specific button. +; */ ; .include "mouse-kernel.inc" diff --git a/libsrc/mouse/mouse_hide.s b/libsrc/mouse/mouse_hide.s index 81b3573b7..1f565867f 100644 --- a/libsrc/mouse/mouse_hide.s +++ b/libsrc/mouse/mouse_hide.s @@ -3,9 +3,9 @@ ; ; void mouse_hide (void); ; /* Hide the mouse. The function manages a counter and may be called more than -; * once. For each call to mouse_hide there must be a call to mouse_show to make -; * the mouse visible again. -; */ +; ** once. For each call to mouse_hide there must be a call to mouse_show to make +; ** the mouse visible again. +; */ ; .include "mouse-kernel.inc" diff --git a/libsrc/mouse/mouse_ioctl.s b/libsrc/mouse/mouse_ioctl.s index 31a8ba791..52d201c48 100644 --- a/libsrc/mouse/mouse_ioctl.s +++ b/libsrc/mouse/mouse_ioctl.s @@ -3,8 +3,8 @@ ; ; unsigned char __fastcall__ mouse_ioctl (unsigned char code, void* data); ; /* Call the driver specific ioctl function. NON PORTABLE! Returns an error -; * code. -; */ +; ** code. +; */ ; .import popa diff --git a/libsrc/mouse/mouse_move.s b/libsrc/mouse/mouse_move.s index 2245221f6..b25716b37 100644 --- a/libsrc/mouse/mouse_move.s +++ b/libsrc/mouse/mouse_move.s @@ -3,10 +3,10 @@ ; ; void __fastcall__ mouse_move (int x, int y); ; /* Set the mouse cursor to the given position. If a mouse cursor is defined -; * and currently visible, the mouse cursor is also moved. -; * NOTE: This function does not check if the given position is valid and -; * inside the bounding box. -; */ +; ** and currently visible, the mouse cursor is also moved. +; ** NOTE: This function does not check if the given position is valid and +; ** inside the bounding box. +; */ ; .import incsp2 diff --git a/libsrc/mouse/mouse_setbox.s b/libsrc/mouse/mouse_setbox.s index d211289b5..6dafc8365 100644 --- a/libsrc/mouse/mouse_setbox.s +++ b/libsrc/mouse/mouse_setbox.s @@ -3,19 +3,19 @@ ; ; void __fastcall__ mouse_setbox (const struct mouse_box* box); ; /* Set the bounding box for the mouse pointer movement. The mouse X and Y -; * coordinates will never go outside the given box. -; * NOTE: The function does *not* check if the mouse is currently inside the -; * given margins. The proper way to use this function therefore is: -; * -; * - Hide the mouse -; * - Set the bounding box -; * - Place the mouse at the desired position -; * - Show the mouse again. -; * -; * NOTE2: When setting the box to something that is larger than the actual -; * screen, the positioning of the mouse cursor can fail. If such margins -; * are really what you want, you have to use your own cursor routines. -; */ +; ** coordinates will never go outside the given box. +; ** NOTE: The function does *not* check if the mouse is currently inside the +; ** given margins. The proper way to use this function therefore is: +; ** +; ** - Hide the mouse +; ** - Set the bounding box +; ** - Place the mouse at the desired position +; ** - Show the mouse again. +; ** +; ** NOTE2: When setting the box to something that is larger than the actual +; ** screen, the positioning of the mouse cursor can fail. If such margins +; ** are really what you want, you have to use your own cursor routines. +; */ ; ; diff --git a/libsrc/plus4/systime.s b/libsrc/plus4/systime.s index d22b8c596..273e394a4 100644 --- a/libsrc/plus4/systime.s +++ b/libsrc/plus4/systime.s @@ -3,10 +3,10 @@ ; ; time_t _systime (void); ; /* Similar to time(), but: -; * - Is not ISO C -; * - Does not take the additional pointer -; * - Does not set errno when returning -1 -; */ +; ** - Is not ISO C +; ** - Does not take the additional pointer +; ** - Does not set errno when returning -1 +; */ ; .export __systime diff --git a/libsrc/serial/ser-kernel.s b/libsrc/serial/ser-kernel.s index 438189edb..4c5b455b6 100644 --- a/libsrc/serial/ser-kernel.s +++ b/libsrc/serial/ser-kernel.s @@ -103,8 +103,8 @@ copy: lda (ptr1),y ;---------------------------------------------------------------------------- ; unsigned char ser_uninstall (void); ; /* Uninstall the currently loaded driver and return an error code. -; * Note: This call does not free allocated memory. -; */ +; ** Note: This call does not free allocated memory. +; */ _ser_uninstall: jsr ser_uninstall ; Call driver routine diff --git a/libsrc/serial/ser_get.s b/libsrc/serial/ser_get.s index dccd92000..74a079eaa 100644 --- a/libsrc/serial/ser_get.s +++ b/libsrc/serial/ser_get.s @@ -3,8 +3,8 @@ ; ; unsigned char __fastcall__ ser_get (char* b); ; /* Get a character from the serial port. If no characters are available, the -; * function will return SER_ERR_NO_DATA, so this is not a fatal error. -; */ +; ** function will return SER_ERR_NO_DATA, so this is not a fatal error. +; */ .importzp ptr1 diff --git a/libsrc/serial/ser_put.s b/libsrc/serial/ser_put.s index 7bbdbdeb4..bab6062eb 100644 --- a/libsrc/serial/ser_put.s +++ b/libsrc/serial/ser_put.s @@ -3,9 +3,9 @@ ; ; unsigned char __fastcall__ ser_put (char b); ; /* Send a character via the serial port. There is a transmit buffer, but -; * transmitting is not done via interrupt. The function returns -; * SER_ERR_OVERFLOW if there is no space left in the transmit buffer. -; */ +; ** transmitting is not done via interrupt. The function returns +; ** SER_ERR_OVERFLOW if there is no space left in the transmit buffer. +; */ .include "ser-kernel.inc" diff --git a/libsrc/tgi/tgi-kernel.s b/libsrc/tgi/tgi-kernel.s index 3781795f6..ed65760af 100644 --- a/libsrc/tgi/tgi-kernel.s +++ b/libsrc/tgi/tgi-kernel.s @@ -198,8 +198,8 @@ tgi_set_ptr: ;---------------------------------------------------------------------------- ; void tgi_uninstall (void); ; /* Uninstall the currently loaded driver but do not unload it. Will call -; * tgi_done if necessary. -; */ +; ** tgi_done if necessary. +; */ _tgi_uninstall: jsr _tgi_done ; Switch off graphics diff --git a/libsrc/tgi/tgi_arc.c b/libsrc/tgi/tgi_arc.c index d4bb84f2b..e505b7b69 100644 --- a/libsrc/tgi/tgi_arc.c +++ b/libsrc/tgi/tgi_arc.c @@ -48,10 +48,10 @@ void __fastcall__ tgi_arc (int x, int y, unsigned char rx, unsigned char ry, unsigned sa, unsigned ea) /* Draw an ellipse arc with center at x/y and radii rx/ry using the current - * drawing color. The arc covers the angle between sa and ea (startangle and - * endangle), which must be in the range 0..360 (otherwise the function may - * bevave unextectedly). - */ +** drawing color. The arc covers the angle between sa and ea (startangle and +** endangle), which must be in the range 0..360 (otherwise the function may +** bevave unextectedly). +*/ { int x1, y1, x2, y2; unsigned char inc; diff --git a/libsrc/tgi/tgi_ellipse.s b/libsrc/tgi/tgi_ellipse.s index 1471f9156..dc6160aef 100644 --- a/libsrc/tgi/tgi_ellipse.s +++ b/libsrc/tgi/tgi_ellipse.s @@ -3,8 +3,8 @@ ; ; void __fastcall__ tgi_ellipse (int x, int y, unsigned char rx, unsigned char ry); ; /* Draw a full ellipse with center at x/y and radii rx/ry using the current -; * drawing color. -; */ +; ** drawing color. +; */ ; diff --git a/libsrc/tgi/tgi_getaspectratio.s b/libsrc/tgi/tgi_getaspectratio.s index f6081b1ee..f4ac4814f 100644 --- a/libsrc/tgi/tgi_getaspectratio.s +++ b/libsrc/tgi/tgi_getaspectratio.s @@ -3,8 +3,8 @@ ; ; unsigned tgi_getaspectratio (void); ; /* Returns the aspect ratio for the loaded driver. The aspect ratio is an -; * 8.8 fixed point value. -; */ +; ** 8.8 fixed point value. +; */ ; .include "tgi-kernel.inc" diff --git a/libsrc/tgi/tgi_getdefpalette.s b/libsrc/tgi/tgi_getdefpalette.s index a95301389..4df4f4b26 100644 --- a/libsrc/tgi/tgi_getdefpalette.s +++ b/libsrc/tgi/tgi_getdefpalette.s @@ -3,8 +3,8 @@ ; ; const unsigned char* tgi_getdefpalette (void); ; /* Return the default palette. Will return NULL for drivers that do not -; * support palettes. -; */ +; ** support palettes. +; */ ; .include "tgi-kernel.inc" diff --git a/libsrc/tgi/tgi_geterror.s b/libsrc/tgi/tgi_geterror.s index c34b08ba9..8d0e4db12 100644 --- a/libsrc/tgi/tgi_geterror.s +++ b/libsrc/tgi/tgi_geterror.s @@ -3,8 +3,8 @@ ; ; unsigned char tgi_geterror (void); ; /* Return the error code for the last operation. This will also clear the -; * error. -; */ +; ** error. +; */ .include "tgi-kernel.inc" diff --git a/libsrc/tgi/tgi_getmaxcolor.s b/libsrc/tgi/tgi_getmaxcolor.s index d10ac0e3f..4db8078d2 100644 --- a/libsrc/tgi/tgi_getmaxcolor.s +++ b/libsrc/tgi/tgi_getmaxcolor.s @@ -3,8 +3,8 @@ ; ; unsigned char tgi_getmaxcolor (void); ; /* Return the maximum supported color number (the number of colors would -; * then be getmaxcolor()+1). -; */ +; ** then be getmaxcolor()+1). +; */ ; .include "tgi-kernel.inc" diff --git a/libsrc/tgi/tgi_getmaxx.s b/libsrc/tgi/tgi_getmaxx.s index ccf0eb8d5..1a706956f 100644 --- a/libsrc/tgi/tgi_getmaxx.s +++ b/libsrc/tgi/tgi_getmaxx.s @@ -3,8 +3,8 @@ ; ; unsigned tgi_getmaxx (void); ; /* Return the maximum x coordinate. The resolution in x direction is -; * getmaxx() + 1 -; */ +; ** getmaxx() + 1 +; */ .include "tgi-kernel.inc" diff --git a/libsrc/tgi/tgi_getmaxy.s b/libsrc/tgi/tgi_getmaxy.s index 3fc7bdb86..6f28fc176 100644 --- a/libsrc/tgi/tgi_getmaxy.s +++ b/libsrc/tgi/tgi_getmaxy.s @@ -3,8 +3,8 @@ ; ; unsigned tgi_getmaxy (void); ; /* Return the maximum y coordinate. The resolution in y direction is -; * getmaxy() + 1 -; */ +; ** getmaxy() + 1 +; */ .include "tgi-kernel.inc" diff --git a/libsrc/tgi/tgi_getpalette.s b/libsrc/tgi/tgi_getpalette.s index a91aefb71..f28710ce3 100644 --- a/libsrc/tgi/tgi_getpalette.s +++ b/libsrc/tgi/tgi_getpalette.s @@ -3,8 +3,8 @@ ; ; const unsigned char* tgi_getpalette (void); ; /* Return the current palette. Will return NULL for drivers that do not -; * support palettes. -; */ +; ** support palettes. +; */ ; .include "tgi-kernel.inc" diff --git a/libsrc/tgi/tgi_gettextheight.s b/libsrc/tgi/tgi_gettextheight.s index 8daad941b..38df6a69a 100644 --- a/libsrc/tgi/tgi_gettextheight.s +++ b/libsrc/tgi/tgi_gettextheight.s @@ -11,8 +11,8 @@ ;----------------------------------------------------------------------------- ; unsigned __fastcall__ tgi_gettextheight (const char* s); ; /* Calculate the height of the text in pixels according to the current text -; * style. -; */ +; ** style. +; */ ; .proc _tgi_gettextheight diff --git a/libsrc/tgi/tgi_gettextwidth.s b/libsrc/tgi/tgi_gettextwidth.s index c7bbcffd1..9a935b6b7 100644 --- a/libsrc/tgi/tgi_gettextwidth.s +++ b/libsrc/tgi/tgi_gettextwidth.s @@ -22,8 +22,8 @@ Text := ptr3 ;----------------------------------------------------------------------------- ; unsigned __fastcall__ tgi_gettextwidth (const char* s); ; /* Calculate the width of the text in pixels according to the current text -; * style. -; */ +; ** style. +; */ ; ; Result is strlen (s) * tgi_textmagw * tgi_fontsizex ; diff --git a/libsrc/tgi/tgi_install_vectorfont.s b/libsrc/tgi/tgi_install_vectorfont.s index ff174896e..91df3059a 100644 --- a/libsrc/tgi/tgi_install_vectorfont.s +++ b/libsrc/tgi/tgi_install_vectorfont.s @@ -8,9 +8,9 @@ ;----------------------------------------------------------------------------- ; void __fastcall__ tgi_install_vectorfont (const tgi_vectorfont* font); ; /* Install a vector font for use. More than one vector font can be loaded, -; * but only one can be active. This function is used to tell which one. Call -; * with a NULL pointer to uninstall the currently installed font. -; */ +; ** but only one can be active. This function is used to tell which one. Call +; ** with a NULL pointer to uninstall the currently installed font. +; */ ; .code diff --git a/libsrc/tgi/tgi_ioctl.s b/libsrc/tgi/tgi_ioctl.s index fd4db7dcd..434c33757 100644 --- a/libsrc/tgi/tgi_ioctl.s +++ b/libsrc/tgi/tgi_ioctl.s @@ -3,9 +3,9 @@ ; ; unsigned __fastcall__ tgi_ioctl (unsigned char code, void* data); ; /* Call the driver specific control function. What this function does for -; * a specific code depends on the driver. The driver will set an error -; * for unknown codes or values. -; */ +; ** a specific code depends on the driver. The driver will set an error +; ** for unknown codes or values. +; */ ; .include "tgi-kernel.inc" diff --git a/libsrc/tgi/tgi_lineto.s b/libsrc/tgi/tgi_lineto.s index 868f4cf42..abe4b3f96 100644 --- a/libsrc/tgi/tgi_lineto.s +++ b/libsrc/tgi/tgi_lineto.s @@ -3,8 +3,8 @@ ; ; void __fastcall__ tgi_lineto (int x2, int y2); ; /* Draw a line in the current drawing color from the graphics cursor to the -; * new end point. -; */ +; ** new end point. +; */ .include "tgi-kernel.inc" diff --git a/libsrc/tgi/tgi_load_vectorfont.c b/libsrc/tgi/tgi_load_vectorfont.c index 0d5af23c9..55e1bf7b6 100644 --- a/libsrc/tgi/tgi_load_vectorfont.c +++ b/libsrc/tgi/tgi_load_vectorfont.c @@ -52,9 +52,9 @@ const tgi_vectorfont* __fastcall__ tgi_load_vectorfont (const char* name) /* Load a vector font into memory and return it. In case of errors, NULL is - * returned and an error is set, which can be retrieved using tgi_geterror. - * To use the font, it has to be installed using tgi_install_vectorfont. - */ +** returned and an error is set, which can be retrieved using tgi_geterror. +** To use the font, it has to be installed using tgi_install_vectorfont. +*/ { static const char Magic[4] = { 0x54, 0x43, 0x48, TGI_VF_VERSION @@ -108,10 +108,10 @@ const tgi_vectorfont* __fastcall__ tgi_load_vectorfont (const char* name) close (F); /* Fix the offset pointers. When loaded, they contain numeric offsets - * into the VectorOps, with the start of the VectorOps at offset zero. - * We will add a pointer to the VectorOps to make them actual pointers - * that may be used independently from anything else. - */ + ** into the VectorOps, with the start of the VectorOps at offset zero. + ** We will add a pointer to the VectorOps to make them actual pointers + ** that may be used independently from anything else. + */ V = (unsigned) &Font->vec_ops; for (I = 0; I < TGI_VF_CCOUNT; ++I) { Font->chars[I] += V; @@ -125,8 +125,8 @@ const tgi_vectorfont* __fastcall__ tgi_load_vectorfont (const char* name) LoadError: /* Some sort of load problem. If the file is still open, be sure to - * close it - */ + ** close it + */ if (F >= 0) { close (F); } diff --git a/libsrc/tgi/tgi_pieslice.c b/libsrc/tgi/tgi_pieslice.c index f78d7a672..60d2f1d13 100644 --- a/libsrc/tgi/tgi_pieslice.c +++ b/libsrc/tgi/tgi_pieslice.c @@ -48,10 +48,10 @@ void __fastcall__ tgi_pieslice (int x, int y, unsigned char rx, unsigned char ry, unsigned sa, unsigned ea) /* Draw an ellipse pie slice with center at x/y and radii rx/ry using the - * current drawing color. The pie slice covers the angle between sa and ea - * (startangle and endangle), which must be in the range 0..360 (otherwise the - * function may behave unextectedly). - */ +** current drawing color. The pie slice covers the angle between sa and ea +** (startangle and endangle), which must be in the range 0..360 (otherwise the +** function may behave unexpectedly). +*/ { /* Draw an arc ... */ tgi_arc (x, y, rx, ry, sa, ea); diff --git a/libsrc/tgi/tgi_setaspectratio.s b/libsrc/tgi/tgi_setaspectratio.s index c46d6dede..bb511af0c 100644 --- a/libsrc/tgi/tgi_setaspectratio.s +++ b/libsrc/tgi/tgi_setaspectratio.s @@ -3,8 +3,8 @@ ; ; void __fastcall__ tgi_setaspectratio (unsigned aspectratio); ; /* Set a new aspect ratio for the loaded driver. The aspect ratio is an -; * 8.8 fixed point value. -; */ +; ** 8.8 fixed point value. +; */ ; .include "tgi-kernel.inc" diff --git a/libsrc/tgi/tgi_setpalette.s b/libsrc/tgi/tgi_setpalette.s index b8f269b9e..86411a52a 100644 --- a/libsrc/tgi/tgi_setpalette.s +++ b/libsrc/tgi/tgi_setpalette.s @@ -3,8 +3,8 @@ ; ; void __fastcall__ tgi_setpalette (const unsigned char* palette); ; /* Set the palette (not available with all drivers/hardware). palette is -; * a pointer to as many entries as there are colors. -; */ +; ** a pointer to as many entries as there are colors. +; */ ; .include "tgi-kernel.inc" diff --git a/libsrc/tgi/tgi_settextdir.s b/libsrc/tgi/tgi_settextdir.s index d6c6dc838..897e74e30 100644 --- a/libsrc/tgi/tgi_settextdir.s +++ b/libsrc/tgi/tgi_settextdir.s @@ -8,8 +8,8 @@ ;----------------------------------------------------------------------------- ; void __fastcall__ tgi_settextdir (unsigned char dir); ; /* Set the direction for text output. dir is one of the TGI_TEXT_XXX -; * constants. -; */ +; ** constants. +; */ ; .proc _tgi_settextdir diff --git a/libsrc/tgi/tgi_settextstyle.s b/libsrc/tgi/tgi_settextstyle.s index ba3cb188b..b62d6904c 100644 --- a/libsrc/tgi/tgi_settextstyle.s +++ b/libsrc/tgi/tgi_settextstyle.s @@ -15,10 +15,10 @@ ; void __fastcall__ tgi_settextstyle (unsigned width, unsigned height, ; unsigned char dir, unsigned char font); ; /* Set the style for text output. The scaling factors for width and height -; * are 8.8 fixed point values. This means that $100 = 1 $200 = 2 etc. -; * dir is one of the TGI_TEXT_XXX constants. font is one of the TGI_FONT_XXX -; * constants. -; */ +; ** are 8.8 fixed point values. This means that $100 = 1 $200 = 2 etc. +; ** dir is one of the TGI_TEXT_XXX constants. font is one of the TGI_FONT_XXX +; ** constants. +; */ ; .proc _tgi_settextstyle @@ -36,8 +36,8 @@ ;----------------------------------------------------------------------------- ; void __fastcall__ tgi_settextscale (unsigned width, unsigned height); ; /* Set the scaling for text output. The scaling factors for width and height -; * are 8.8 fixed point values. This means that $100 = 1 $200 = 2 etc. -; */ +; ** are 8.8 fixed point values. This means that $100 = 1 $200 = 2 etc. +; */ .proc _tgi_settextscale diff --git a/libsrc/tgi/tgi_vectorchar.s b/libsrc/tgi/tgi_vectorchar.s index 76f585dcd..bd4cc84c4 100644 --- a/libsrc/tgi/tgi_vectorchar.s +++ b/libsrc/tgi/tgi_vectorchar.s @@ -3,8 +3,8 @@ ; ; void __fastcall__ tgi_vectorchar (const unsigned char* Ops); ; /* Draw one character of the vector font at the current graphics cursor -; * position using the current font magnification. -; */ +; ** position using the current font magnification. +; */ ; .import imul16x16r32, umul16x16r32, negax, negeax diff --git a/libsrc/zlib/uncompress.c b/libsrc/zlib/uncompress.c index 3cff19ad3..7810eb4f8 100644 --- a/libsrc/zlib/uncompress.c +++ b/libsrc/zlib/uncompress.c @@ -1,8 +1,8 @@ /* - * uncompress.c - * - * Piotr Fusik, 18.11.2001 - */ +** uncompress.c +** +** Piotr Fusik, 18.11.2001 +*/ #include diff --git a/samples/enumdevdir.c b/samples/enumdevdir.c index 5969c2339..f270b43af 100644 --- a/samples/enumdevdir.c +++ b/samples/enumdevdir.c @@ -1,9 +1,9 @@ /* - * Enumerate devices, directories and files. - * - * 2012-10-15, Oliver Schmidt (ol.sc@web.de) - * - */ +** Enumerate devices, directories and files. +** +** 2012-10-15, Oliver Schmidt (ol.sc@web.de) +** +*/ @@ -30,21 +30,21 @@ void printdir (char *newdir) if (chdir (newdir)) { /* If chdir() fails we just print the - * directory name - as done for files. - */ + ** directory name - as done for files. + */ printf (" Dir %s\n", newdir); return; } /* We call getcwd() in order to print the - * absolute pathname for a subdirectory. - */ + ** absolute pathname for a subdirectory. + */ getcwd (curdir, sizeof (curdir)); printf (" Dir %s:\n", curdir); /* Calling opendir() always with "." avoids - * fiddling around with pathname separators. - */ + ** fiddling around with pathname separators. + */ dir = opendir ("."); while (ent = readdir (dir)) { @@ -54,9 +54,9 @@ void printdir (char *newdir) } /* We defer handling of subdirectories until we're done with the - * current one as several targets don't support other disk i/o - * while reading a directory (see cc65 readdir() doc for more). - */ + ** current one as several targets don't support other disk i/o + ** while reading a directory (see cc65 readdir() doc for more). + */ if (_DE_ISDIR (ent->d_type)) { subdirs = realloc (subdirs, FILENAME_MAX * (dirnum + 1)); strcpy (subdirs + FILENAME_MAX * dirnum++, ent->d_name); @@ -79,15 +79,15 @@ void main (void) char devicedir[FILENAME_MAX]; /* Calling getfirstdevice()/getnextdevice() does _not_ turn on the motor - * of a drive-type device and does _not_ check for a disk in the drive. - */ + ** of a drive-type device and does _not_ check for a disk in the drive. + */ device = getfirstdevice (); while (device != INVALID_DEVICE) { printf ("Device %d:\n", device); /* Calling getdevicedir() _does_ check for a (formatted) disk in a - * floppy-disk-type device and returns NULL if that check fails. - */ + ** floppy-disk-type device and returns NULL if that check fails. + */ if (getdevicedir (device, devicedir, sizeof (devicedir))) { printdir (devicedir); } else { diff --git a/samples/fire.c b/samples/fire.c index cae922509..44eb07c88 100644 --- a/samples/fire.c +++ b/samples/fire.c @@ -1,12 +1,12 @@ -/***************************************************************************** - * fire test program for cc65. * - * * - * (w)2002 by groepaz/hitmen * - * * - * Cleanup and porting by Ullrich von Bassewitz. * - * 2004-06-08, Greg King * - * * - *****************************************************************************/ +/*****************************************************************************\ +** fire test program for cc65. ** +** ** +** (w)2002 by groepaz/hitmen ** +** ** +** Cleanup and porting by Ullrich von Bassewitz. ** +** 2004-06-08, Greg King ** +** ** +\*****************************************************************************/ @@ -187,8 +187,8 @@ int main (void) #endif #if defined(__C128__) /* Save and change some flags, so that kernal/basic interrupt handler will - * not interfere with our routine. - */ + ** not interfere with our routine. + */ initflag = *(unsigned char*) 0xA04; *(unsigned char*) 0xA04 &= 0xFE; graphflag = *(unsigned char*) 0xD8; diff --git a/samples/geos/bitmap-demo.c b/samples/geos/bitmap-demo.c index 0e7d0d2aa..48daede9d 100644 --- a/samples/geos/bitmap-demo.c +++ b/samples/geos/bitmap-demo.c @@ -1,12 +1,12 @@ /* - * Minimalistic GEOSLib bitmap demo program - * - * 2012-06-10, Oliver Schmidt (ol.sc@web.de) - * - * To create bitmap.c use the sp65 sprite and bitmap utility: - * sp65 -r logo.pcx -c geos-bitmap -w bitmap.c,ident=bitmap - * - */ +** Minimalistic GEOSLib bitmap demo program +** +** 2012-06-10, Oliver Schmidt (ol.sc@web.de) +** +** To create bitmap.c use the sp65 sprite and bitmap utility: +** sp65 -r logo.pcx -c geos-bitmap -w bitmap.c,ident=bitmap +** +*/ #include diff --git a/samples/geos/dialog.c b/samples/geos/dialog.c index 55f98bf01..27199a493 100644 --- a/samples/geos/dialog.c +++ b/samples/geos/dialog.c @@ -1,7 +1,7 @@ /* Note: - * This is just a sample piece of code that shows how to use some structs - - * it may not even run. - */ +** This is just a sample piece of code that shows how to use some structs - +** it may not even run. +*/ #include diff --git a/samples/geos/grphstr.c b/samples/geos/grphstr.c index 928e7a06c..0e36ec021 100644 --- a/samples/geos/grphstr.c +++ b/samples/geos/grphstr.c @@ -1,7 +1,7 @@ /* Note: - * This is just a sample piece of code that shows how to use some structs - - * it may not even run. - */ +** This is just a sample piece of code that shows how to use some structs - +** it may not even run. +*/ #include diff --git a/samples/geos/inittab.c b/samples/geos/inittab.c index 843275e69..c0d75c2ec 100644 --- a/samples/geos/inittab.c +++ b/samples/geos/inittab.c @@ -1,7 +1,7 @@ /* Note: - * This is just a sample piece of code that shows how to use some structs - - * it may not even run. - */ +** This is just a sample piece of code that shows how to use some structs - +** it may not even run. +*/ #include diff --git a/samples/geos/menu.c b/samples/geos/menu.c index 3b5f9da82..54f72c4ab 100644 --- a/samples/geos/menu.c +++ b/samples/geos/menu.c @@ -1,7 +1,7 @@ /* Note: - * This is just a sample piece of code that shows how to use some structs - - * it may not even run. - */ +** This is just a sample piece of code that shows how to use some structs - +** it may not even run. +*/ #include diff --git a/samples/geos/overlay-demo.c b/samples/geos/overlay-demo.c index 1f0bbf6f7..a37f6bdcb 100644 --- a/samples/geos/overlay-demo.c +++ b/samples/geos/overlay-demo.c @@ -1,9 +1,9 @@ /* - * Minimalistic GEOSLib overlay demo program - * - * 2012-01-01, Oliver Schmidt (ol.sc@web.de) - * - */ +** Minimalistic GEOSLib overlay demo program +** +** 2012-01-01, Oliver Schmidt (ol.sc@web.de) +** +*/ #include @@ -12,9 +12,9 @@ /* Functions resident in an overlay can call back functions resident in the - * main program at any time without any precautions. The function show() is - * an example for such a function resident in the main program. - */ +** main program at any time without any precautions. The function show() is +** an example for such a function resident in the main program. +*/ void show(char *name) { char line1[40]; @@ -24,18 +24,18 @@ void show(char *name) } /* In a real-world overlay program one would probably not use a #pragma but - * rather place the all the code of certain source files into the overlay by - * compiling them with --code-name OVERLAY1. - */ +** rather place the all the code of certain source files into the overlay by +** compiling them with --code-name OVERLAY1. +*/ #pragma code-name(push, "OVERLAY1"); void foo(void) { /* Functions resident in an overlay can access all program variables and - * constants at any time without any precautions because those are never - * placed in overlays. The string constant "One" is an example for such - * a constant resident in the main program. - */ + ** constants at any time without any precautions because those are never + ** placed in overlays. The string constant "One" is an example for such + ** a constant resident in the main program. + */ show("One"); } @@ -78,18 +78,18 @@ void main(int /*argc*/, char *argv[]) } /* The macro definitions OVERLAY_ADDR and OVERLAY_SIZE were generated in - * overlay-demores.h by grc65. They contain the overlay area address and - * size specific to a certain program. - */ + ** overlay-demores.h by grc65. They contain the overlay area address and + ** size specific to a certain program. + */ if (ReadRecord(OVERLAY_ADDR, OVERLAY_SIZE)) { _poserror("ReadRecord.1"); return; } /* The linker makes sure that the call to foo() ends up at the right mem - * addr. However it's up to user to make sure that the - right - overlay - * is actually loaded before making the the call. - */ + ** addr. However, it's up to user to make sure that the -- right -- overlay + ** actually is loaded before making the call. + */ foo(); DlgBoxOk(CBOLDON "Overlay Demo - Main" CPLAINTEXT, @@ -101,8 +101,8 @@ void main(int /*argc*/, char *argv[]) } /* Replacing one overlay with another one can only happen from the main - * program. This implies that an overlay can never load another overlay. - */ + ** program. This implies that an overlay can never load another overlay. + */ if (ReadRecord(OVERLAY_ADDR, OVERLAY_SIZE)) { _poserror("ReadRecord.2"); return; diff --git a/samples/gunzip65.c b/samples/gunzip65.c index bc515f0ee..2ad029467 100644 --- a/samples/gunzip65.c +++ b/samples/gunzip65.c @@ -1,14 +1,14 @@ /* - * gunzip65 - a gunzip utility for 6502-based machines. - * - * Piotr Fusik - * - * This should be considered as a test of my zlib-compatible library - * rather than a real application. - * It's not user-friendly, fault-tolerant, whatever. - * However, it really works for real GZIP files, provided they are small - * enough to fit in buffer[] (after decompression!). - */ +** gunzip65 - a gunzip utility for 6502-based machines. +** +** Piotr Fusik +** +** This should be considered as a test of my zlib-compatible library +** rather than a real application. +** It's not user-friendly, fault-tolerant, whatever. +** However, it really works for real GZIP files, provided they are small +** enough to fit in buffer[] (after decompression!). +*/ #include #include @@ -16,9 +16,9 @@ #ifndef __CC65__ /* - * Emulate inflatemem() if using original zlib. - * As you can see, this program is quite portable. - */ +** Emulate inflatemem() if using original zlib. +** As you can see, this program is quite portable. +*/ unsigned inflatemem(char* dest, const char* source) { z_stream stream; @@ -41,26 +41,26 @@ unsigned inflatemem(char* dest, const char* source) #endif /* __CC65__ */ /* - * Structure of a GZIP file: - * - * 1. GZIP header: - * Offset 0: Signature (2 bytes: 0x1f, 0x8b) - * Offset 2: Compression method (1 byte: 8 == "deflate") - * Offset 3: Flags (1 byte: see below) - * Offset 4: File date and time (4 bytes) - * Offset 8: Extra flags (1 byte) - * Offset 9: Target OS (1 byte: DOS, Amiga, Unix, etc.) - * if (flags & FEXTRA) { 2 bytes of length, then length bytes } - * if (flags & FNAME) { ASCIIZ filename } - * if (flags & FCOMMENT) { ASCIIZ comment } - * if (flags & FHCRC) { 2 bytes of CRC } - * - * 2. Deflate compressed data. - * - * 3. GZIP trailer: - * Offset 0: CRC-32 (4 bytes) - * Offset 4: uncompressed file length (4 bytes) - */ +** Structure of a GZIP file: +** +** 1. GZIP header: +** Offset 0: Signature (2 bytes: 0x1f, 0x8b) +** Offset 2: Compression method (1 byte: 8 == "deflate") +** Offset 3: Flags (1 byte: see below) +** Offset 4: File date and time (4 bytes) +** Offset 8: Extra flags (1 byte) +** Offset 9: Target OS (1 byte: DOS, Amiga, Unix, etc.) +** if (flags & FEXTRA) { 2 bytes of length, then length bytes } +** if (flags & FNAME) { ASCIIZ filename } +** if (flags & FCOMMENT) { ASCIIZ comment } +** if (flags & FHCRC) { 2 bytes of CRC } +** +** 2. Deflate compressed data. +** +** 3. GZIP trailer: +** Offset 0: CRC-32 (4 bytes) +** Offset 4: uncompressed file length (4 bytes) +*/ /* Flags in the GZIP header. */ #define FTEXT 1 /* Extra text */ @@ -70,28 +70,28 @@ unsigned inflatemem(char* dest, const char* source) #define FCOMMENT 16 /* File comment */ /* - * We read whole GZIP file into this buffer. - * Then we use this buffer for the decompressed data. - */ +** We read whole GZIP file into this buffer. +** Then we use this buffer for the decompressed data. +*/ static unsigned char buffer[26000]; /* - * Get a 16-bit little-endian unsigned number, using unsigned char* p. - * On many machines this could be (*(unsigned short*) p), - * but I really like portability. :-) - */ +** Get a 16-bit little-endian unsigned number, using unsigned char* p. +** On many machines this could be (*(unsigned short*) p), +** but I really like portability. :-) +*/ #define GET_WORD(p) (*(p) + ((unsigned) (p)[1] << 8)) /* Likewise, for a 32-bit number. */ #define GET_LONG(p) (GET_WORD(p) + ((unsigned long) GET_WORD(p + 2) << 16)) /* - * Uncompress a GZIP file. - * On entry, buffer[] should contain the whole GZIP file contents, - * and the argument complen should be equal to the length of the GZIP file. - * On return, buffer[] contains the uncompressed data, and the returned - * value is the length of the uncompressed data. - */ +** Uncompress a GZIP file. +** On entry, buffer[] should contain the whole GZIP file contents, +** and the argument complen should be equal to the length of the GZIP file. +** On return, buffer[] contains the uncompressed data, and the returned +** value is the length of the uncompressed data. +*/ unsigned uncompress_buffer(unsigned complen) { unsigned char* ptr; @@ -134,19 +134,19 @@ unsigned uncompress_buffer(unsigned complen) ptr += 2; /* - * calculate length of raw "deflate" data - * (without the GZIP header and 8-byte trailer) - */ + ** calculate length of raw "deflate" data + ** (without the GZIP header and 8-byte trailer) + */ complen -= (ptr - buffer) + 8; /* - * We will move the compressed data to the end of buffer[]. - * Thus the compressed data and the decompressed data (written from - * the beginning of buffer[]) may overlap, as long as the decompressed - * data doesn't go further than unread compressed data. - * ptr2 points to the beginning of compressed data at the end - * of buffer[]. - */ + ** We will move the compressed data to the end of buffer[]. + ** Thus the compressed data and the decompressed data (written from + ** the beginning of buffer[]) may overlap, as long as the decompressed + ** data doesn't go further than unread compressed data. + ** ptr2 points to the beginning of compressed data at the end + ** of buffer[]. + */ ptr2 = buffer + sizeof(buffer) - complen; /* move the compressed data to end of buffer[] */ memmove(ptr2, ptr, complen); @@ -173,8 +173,8 @@ unsigned uncompress_buffer(unsigned complen) } /* - * Get a filename from standard input. - */ +** Get a filename from standard input. +*/ char* get_fname(void) { static char filename[100]; diff --git a/samples/hello.c b/samples/hello.c index dcd6d6884..90a1d4bdc 100644 --- a/samples/hello.c +++ b/samples/hello.c @@ -1,9 +1,9 @@ /* - * Fancy hello world program using cc65. - * - * Ullrich von Bassewitz (ullrich@von-bassewitz.de) - * - */ +** Fancy hello world program using cc65. +** +** Ullrich von Bassewitz (ullrich@von-bassewitz.de) +** +*/ diff --git a/samples/mandelbrot.c b/samples/mandelbrot.c index 0ba4ebd2c..5d3d661c9 100644 --- a/samples/mandelbrot.c +++ b/samples/mandelbrot.c @@ -1,8 +1,8 @@ -/***************************************************************************** - * mandelbrot sample program for cc65. * - * * - * (w)2002 by groepaz/hitmen, TGI support by Stefan Haubenthal * - *****************************************************************************/ +/*****************************************************************************\ +** mandelbrot sample program for cc65. ** +** ** +** (w) 2002 by groepaz/hitmen, TGI support by Stefan Haubenthal ** +\*****************************************************************************/ diff --git a/samples/multidemo.c b/samples/multidemo.c index 788270a1d..74039cfd6 100644 --- a/samples/multidemo.c +++ b/samples/multidemo.c @@ -1,12 +1,12 @@ /* - * Extended memory overlay demo program. - * - * Shows how to combine multiple cc65 features - * incl. overlays and extended memory drivers. - * - * 2012-17-07, Oliver Schmidt (ol.sc@web.de) - * - */ +** Extended memory overlay demo program. +** +** Shows how to combine multiple cc65 features +** incl. overlays and extended memory drivers. +** +** 2012-17-07, Oliver Schmidt (ol.sc@web.de) +** +*/ @@ -25,9 +25,9 @@ /* The symbols _OVERLAY?_LOAD__ and _OVERLAY?_SIZE__ were generated by the - * linker. They contain the overlay area address and size specific to a - * certain program. - */ +** linker. They contain the overlay area address and size specific to a +** certain program. +*/ extern void _OVERLAY1_LOAD__[], _OVERLAY1_SIZE__[]; extern void _OVERLAY2_LOAD__[], _OVERLAY2_SIZE__[]; extern void _OVERLAY3_LOAD__[], _OVERLAY3_SIZE__[]; @@ -45,24 +45,24 @@ struct { /* Functions resident in an overlay can call back functions resident in the - * main program at any time without any precautions. The function log() is - * an example for such a function resident in the main program. - */ +** main program at any time without any precautions. The function log() is +** an example for such a function resident in the main program. +*/ void log (char *msg) { /* Functions resident in an overlay can access all program variables and - * constants at any time without any precautions because those are never - * placed in overlays. The string constant below is an example for such - * a constant resident in the main program. - */ + ** constants at any time without any precautions because those are never + ** placed in overlays. The string constant below is an example for such + ** a constant resident in the main program. + */ printf ("Log: %s\n", msg); } /* In a real-world overlay program one would probably not use a #pragma but - * rather place all the code of certain source files into the overlay by - * compiling them with --code-name OVERLAY1. - */ +** rather place all the code of certain source files into the overlay by +** compiling them with --code-name OVERLAY1. +*/ #pragma code-name (push, "OVERLAY1"); void foo (void) @@ -235,15 +235,15 @@ void main (void) log ("Calling overlay 1 from main"); /* The linker makes sure that the call to foo() ends up at the right mem - * addr. However it's up to user to make sure that the - right - overlay - * is actually loaded before making the the call. - */ + ** addr. However it's up to user to make sure that the - right - overlay + ** is actually loaded before making the the call. + */ foo (); } /* Replacing one overlay with another one can only happen from the main - * program. This implies that an overlay can never load another overlay. - */ + ** program. This implies that an overlay can never load another overlay. + */ if (loadoverlay (2)) { log ("Calling overlay 2 from main"); bar (); diff --git a/samples/nachtm.c b/samples/nachtm.c index 282df9abf..0b962fa5d 100644 --- a/samples/nachtm.c +++ b/samples/nachtm.c @@ -1,14 +1,14 @@ /* - * "Eine kleine Nachtmusik" by Wolfgang Amadeus Mozart, KV 525 - * - * First version in 1987 by - * Joachim von Bassewitz (joachim@von-bassewitz.de) and - * Ullrich von Bassewitz (ullrich@von-bassewitz.de). - * - * C conversion in 1998 by - * Ullrich von Bassewitz (ullrich@von-bassewitz.de) - * - */ +** "Eine kleine Nachtmusik" by Wolfgang Amadeus Mozart, KV 525 +** +** First version in 1987 by +** Joachim von Bassewitz (joachim@von-bassewitz.de) and +** Ullrich von Bassewitz (ullrich@von-bassewitz.de). +** +** C conversion in 1998 by +** Ullrich von Bassewitz (ullrich@von-bassewitz.de) +** +*/ @@ -28,17 +28,17 @@ /* Tables with voice data. - * - * Bit Description - * ------------------------------------------- - * 15 Pause bit. - * 12-14 Octave - * 8-11 Tone (index into frequency table) - * 7 Unused. Was thought as a control bit in the original version to - * change SID parameters, but this was never implemented. - * 0-6 Length of the tone in ticks. - * - */ +** +** Bit Description +** ------------------------------------------- +** 15 Pause bit. +** 12-14 Octave +** 8-11 Tone (index into frequency table) +** 7 Unused. Was thought as a control bit in the original version to +** change SID parameters, but this was never implemented. +** 0-6 Length of the tone in ticks. +** +*/ @@ -922,8 +922,8 @@ static clock_t StartTime; #define TICKS_PER_TONE 4 /* Done flag. Contains one bit for each voice. Will contain 0x07 if all - * voices have finished playing. - */ +** voices have finished playing. +*/ static unsigned char Done; @@ -1038,8 +1038,8 @@ static void DisplayTime (void) /* On the 510/610, the SID is in another bank (the system bank), so we cannot - * just write to the memory space. - */ +** just write to the memory space. +*/ #if defined(__CBM510__) || defined(__CBM610__) # define outb(addr,val) pokebsys ((unsigned)(addr), val) # define outw(addr,val) pokewsys ((unsigned)(addr), val) @@ -1149,9 +1149,9 @@ int main (void) } } else { /* Decrement the ticks. If this is the last tick of a tone, - * reset bit 0 of the trigger value and write it back to the - * SID to start the release phase. - */ + ** reset bit 0 of the trigger value and write it back to the + ** SID to start the release phase. + */ if (--(VC->Ticks) == 0) { outb (&Voice->ctrl, VC->Trigger & 0xFE); } diff --git a/samples/overlaydemo.c b/samples/overlaydemo.c index 4022eedd1..42e757153 100644 --- a/samples/overlaydemo.c +++ b/samples/overlaydemo.c @@ -1,11 +1,11 @@ /* - * Minimalistic overlay demo program. - * - * Shows how to load overlay files from disk. - * - * 2009-10-02, Oliver Schmidt (ol.sc@web.de) - * - */ +** Minimalistic overlay demo program. +** +** Shows how to load overlay files from disk. +** +** 2009-10-02, Oliver Schmidt (ol.sc@web.de) +** +*/ @@ -25,9 +25,9 @@ extern void _OVERLAY3_LOAD__[], _OVERLAY3_SIZE__[]; /* Functions resident in an overlay can call back functions resident in the - * main program at any time without any precautions. The function log() is - * an example for such a function resident in the main program. - */ +** main program at any time without any precautions. The function log() is +** an example for such a function resident in the main program. +*/ void log (char *msg) { printf ("Log: %s\n", msg); @@ -35,18 +35,18 @@ void log (char *msg) /* In a real-world overlay program one would probably not use a #pragma but - * rather place all the code of certain source files into the overlay by - * compiling them with --code-name OVERLAY1. - */ +** rather place all the code of certain source files into the overlay by +** compiling them with --code-name OVERLAY1. +*/ #pragma code-name (push, "OVERLAY1"); void foo (void) { /* Functions resident in an overlay can access all program variables and - * constants at any time without any precautions because those are never - * placed in overlays. The string constant below is an example for such - * a constant resident in the main program. - */ + ** constants at any time without any precautions because those are never + ** placed in overlays. The string constant below is an example for such + ** a constant resident in the main program. + */ log ("Calling main from overlay 1"); } @@ -104,23 +104,23 @@ void main (void) log ("Calling overlay 1 from main"); /* The symbols _OVERLAY1_LOAD__ and _OVERLAY1_SIZE__ were generated by the - * linker. They contain the overlay area address and size specific to a - * certain program. - */ + ** linker. They contain the overlay area address and size specific to a + ** certain program. + */ if (loadfile ("ovrldemo.1", _OVERLAY1_LOAD__, _OVERLAY1_SIZE__)) { /* The linker makes sure that the call to foo() ends up at the right mem - * addr. However it's up to user to make sure that the - right - overlay - * is actually loaded before making the the call. - */ + ** addr. However it's up to user to make sure that the - right - overlay + ** is actually loaded before making the the call. + */ foo (); } log ("Calling overlay 2 from main"); /* Replacing one overlay with another one can only happen from the main - * program. This implies that an overlay can never load another overlay. - */ + ** program. This implies that an overlay can never load another overlay. + */ if (loadfile ("ovrldemo.2", _OVERLAY2_LOAD__, _OVERLAY2_SIZE__)) { bar (); } diff --git a/samples/plasma.c b/samples/plasma.c index ef21ef60e..7b092ec81 100644 --- a/samples/plasma.c +++ b/samples/plasma.c @@ -1,11 +1,11 @@ -/***************************************************************************** - * plasma test program for cc65. * - * * - * (w)2001 by groepaz/hitmen * - * * - * Cleanup and porting by Ullrich von Bassewitz. * - * * - *****************************************************************************/ +/*****************************************************************************\ +** plasma test program for cc65. ** +** ** +** (w)2001 by groepaz/hitmen ** +** ** +** Cleanup and porting by Ullrich von Bassewitz. ** +** ** +\*****************************************************************************/ @@ -121,9 +121,9 @@ static void doplasma (register unsigned char* scrn) c2B -= 3; for (ii = 0; ii < 25; ++ii) { /* Unrolling the following loop will give a speed increase of - * nearly 100% (~24fps), but it will also increase the code - * size a lot. - */ + ** nearly 100% (~24fps), but it will also increase the code + ** size a lot. + */ for (i = 0; i < 40; ++i, ++scrn) { *scrn = (xbuf[i] + ybuf[ii]); } @@ -203,9 +203,9 @@ int main (void) outb (&CIA2.pra, (block & 0xFC) | ((SCREEN1 >> 14) ^ 0x03)); #endif #if defined(__C128__) - /* Save and change some flags, so that kernal/basic interupt handler will - * not interfere with our routine. - */ + /* Save and change some flags, so that kernal/basic interrupt handler will + ** not interfere with our routine. + */ initflag = *(unsigned char*) 0xA04; *(unsigned char*) 0xA04 &= 0xFE; graphflag = *(unsigned char*) 0xD8; diff --git a/samples/sieve.c b/samples/sieve.c index 9d166b768..9f110ec98 100644 --- a/samples/sieve.c +++ b/samples/sieve.c @@ -1,6 +1,6 @@ /* - * Calculate all primes up to a specific number. - */ +** Calculate all primes up to a specific number. +*/ diff --git a/src/ar65/exports.c b/src/ar65/exports.c index 11589a621..af176d019 100644 --- a/src/ar65/exports.c +++ b/src/ar65/exports.c @@ -130,8 +130,8 @@ void ExpInsert (const char* Name, const ObjData* Module) const ObjData* ExpFind (const char* Name) /* Check for an identifier in the list. Return NULL if not found, otherwise - * return a pointer to the module, that exports the identifer. - */ +** return a pointer to the module, that exports the identifer. +*/ { /* Get a pointer to the list with the symbols hash value */ HashEntry* L = HashTab [HashStr (Name) % HASHTAB_SIZE]; diff --git a/src/ar65/exports.h b/src/ar65/exports.h index 2dcd8a49c..054b5153c 100644 --- a/src/ar65/exports.h +++ b/src/ar65/exports.h @@ -59,8 +59,8 @@ void ExpInsert (const char* Name, const struct ObjData* Module); const struct ObjData* ExpFind (const char* Name); /* Check for an identifier in the list. Return NULL if not found, otherwise - * return a pointer to the module, that exports the identifer. - */ +** return a pointer to the module, that exports the identifer. +*/ diff --git a/src/ar65/fileio.c b/src/ar65/fileio.c index 5126d7fe2..8e17cbfac 100644 --- a/src/ar65/fileio.c +++ b/src/ar65/fileio.c @@ -7,7 +7,7 @@ /* */ /* */ /* (C) 1998-2003 Ullrich von Bassewitz */ -/* Römerstrasse 52 */ +/* Roemerstrasse 52 */ /* D-70794 Filderstadt */ /* EMail: uz@cc65.org */ /* */ @@ -84,10 +84,10 @@ void WriteVar (FILE* F, unsigned long V) /* Write a variable sized value to the file in special encoding */ { /* We will write the value to the file in 7 bit chunks. If the 8th bit - * is clear, we're done, if it is set, another chunk follows. This will - * allow us to encode smaller values with less bytes, at the expense of - * needing 5 bytes if a 32 bit value is written to file. - */ + ** is clear, we're done, if it is set, another chunk follows. This will + ** allow us to encode smaller values with less bytes, at the expense of + ** needing 5 bytes if a 32 bit value is written to file. + */ do { unsigned char C = (V & 0x7F); V >>= 7; @@ -156,8 +156,8 @@ unsigned long ReadVar (FILE* F) /* Read a variable size value from the file */ { /* The value was written to the file in 7 bit chunks LSB first. If there - * are more bytes, bit 8 is set, otherwise it is clear. - */ + ** are more bytes, bit 8 is set, otherwise it is clear. + */ unsigned char C; unsigned long V = 0; unsigned Shift = 0; diff --git a/src/ar65/library.c b/src/ar65/library.c index 8d92a1ec6..c72e6e3cf 100644 --- a/src/ar65/library.c +++ b/src/ar65/library.c @@ -216,9 +216,9 @@ static void WriteIndex (void) void LibOpen (const char* Name, int MustExist, int NeedTemp) /* Open an existing library and a temporary copy. If MustExist is true, the - * old library is expected to exist. If NeedTemp is true, a temporary library - * is created. - */ +** old library is expected to exist. If NeedTemp is true, a temporary library +** is created. +*/ { /* Remember the name */ LibName = xstrdup (Name); @@ -268,8 +268,8 @@ void LibOpen (const char* Name, int MustExist, int NeedTemp) unsigned long LibCopyTo (FILE* F, unsigned long Bytes) /* Copy data from F to the temp library file, return the start position in - * the temporary library file. - */ +** the temporary library file. +*/ { unsigned char Buf [4096]; @@ -311,8 +311,8 @@ void LibCopyFrom (unsigned long Pos, unsigned long Bytes, FILE* F) static void LibCheckExports (ObjData* O) /* Insert all exports from the given object file into the global list - * checking for duplicates. - */ +** checking for duplicates. +*/ { unsigned I; @@ -335,8 +335,8 @@ static void LibCheckExports (ObjData* O) void LibClose (void) /* Write remaining data, close both files and copy the temp file to the old - * filename - */ +** filename +*/ { /* Do we have a temporary library? */ if (NewLib) { @@ -346,9 +346,9 @@ void LibClose (void) size_t Count; /* Walk through the object file list, inserting exports into the - * export list checking for duplicates. Copy any data that is still - * in the old library into the new one. - */ + ** export list checking for duplicates. Copy any data that is still + ** in the old library into the new one. + */ for (I = 0; I < CollCount (&ObjPool); ++I) { /* Get a pointer to the object */ diff --git a/src/ar65/library.h b/src/ar65/library.h index f7b203aa4..861d56a78 100644 --- a/src/ar65/library.h +++ b/src/ar65/library.h @@ -61,22 +61,22 @@ extern const char* LibName; void LibOpen (const char* Name, int MustExist, int NeedTemp); /* Open an existing library and a temporary copy. If MustExist is true, the - * old library is expected to exist. If NeedTemp is true, a temporary library - * is created. - */ +** old library is expected to exist. If NeedTemp is true, a temporary library +** is created. +*/ unsigned long LibCopyTo (FILE* F, unsigned long Bytes); /* Copy data from F to the temp library file, return the start position in - * the temporary library file. - */ +** the temporary library file. +*/ void LibCopyFrom (unsigned long Pos, unsigned long Bytes, FILE* F); /* Copy data from the library file into another file */ void LibClose (void); /* Write remaining data, close both files and copy the temp file to the old - * filename - */ +** filename +*/ diff --git a/src/ar65/objdata.c b/src/ar65/objdata.c index 2a7cf4ed4..5a8f0c5fb 100644 --- a/src/ar65/objdata.c +++ b/src/ar65/objdata.c @@ -122,8 +122,8 @@ void ClearObjData (ObjData* O) ObjData* FindObjData (const char* Module) /* Search for the module with the given name and return it. Return NULL if the - * module is not in the list. - */ +** module is not in the list. +*/ { unsigned I; diff --git a/src/ar65/objdata.h b/src/ar65/objdata.h index 13590ee4d..3ae8e2949 100644 --- a/src/ar65/objdata.h +++ b/src/ar65/objdata.h @@ -97,8 +97,8 @@ void ClearObjData (ObjData* O); ObjData* FindObjData (const char* Module); /* Search for the module with the given name and return it. Return NULL if the - * module is not in the list. - */ +** module is not in the list. +*/ void DelObjData (const char* Module); /* Delete the object module from the list */ diff --git a/src/ar65/objfile.c b/src/ar65/objfile.c index 933a68852..0434f7e59 100644 --- a/src/ar65/objfile.c +++ b/src/ar65/objfile.c @@ -168,8 +168,8 @@ static void SkipLineInfoList (FILE* F) void ObjReadData (FILE* F, ObjData* O) /* Read object file data from the given file. The function expects the Name - * and Start fields to be valid. Header and basic data are read. - */ +** and Start fields to be valid. Header and basic data are read. +*/ { unsigned long Count; @@ -239,14 +239,14 @@ void ObjAdd (const char* Name) Error ("Could not open `%s': %s", Name, strerror (errno)); } - /* Get the modification time of the object file. There a race condition - * here, since we cannot use fileno() (non standard identifier in standard - * header file), and therefore not fstat. When using stat with the - * file name, there's a risk that the file was deleted and recreated - * while it was open. Since mtime and size are only used to check - * if a file has changed in the debugger, we will ignore this problem - * here. - */ + /* Get the modification time of the object file. There's a race condition + ** here, since we cannot use fileno() (non-standard identifier in standard + ** header file), and therefore not fstat. When using stat with the + ** file name, there's a risk that the file was deleted and recreated + ** while it was open. Since mtime and size are only used to check + ** if a file has changed in the debugger, we will ignore this problem + ** here. + */ if (FileStat (Name, &StatBuf) != 0) { Error ("Cannot stat object file `%s': %s", Name, strerror (errno)); } @@ -264,8 +264,8 @@ void ObjAdd (const char* Name) O = NewObjData (); } else { /* Found - check the file modification times of the internal copy - * and the external one. - */ + ** and the external one. + */ if (difftime ((time_t)O->MTime, StatBuf.st_mtime) > 0.0) { Warning ("Replacing module `%s' by older version in library `%s'", O->Name, LibName); @@ -289,8 +289,8 @@ void ObjAdd (const char* Name) ObjReadData (Obj, O); /* Copy the complete object data to the library file and update the - * starting offset - */ + ** starting offset + */ fseek (Obj, 0, SEEK_SET); O->Start = LibCopyTo (Obj, O->Size); @@ -323,8 +323,8 @@ void ObjExtract (const char* Name) } /* Copy the complete object file data from the library to the new object - * file. - */ + ** file. + */ LibCopyFrom (O->Start, O->Size, Obj); /* Close the file */ diff --git a/src/ar65/objfile.h b/src/ar65/objfile.h index f971d3ec6..bc564c470 100644 --- a/src/ar65/objfile.h +++ b/src/ar65/objfile.h @@ -60,8 +60,8 @@ struct ObjData; void ObjReadData (FILE* F, struct ObjData* O); /* Read object file data from the given file. The function expects the Name - * and Start fields to be valid. Header and basic data are read. - */ +** and Start fields to be valid. Header and basic data are read. +*/ void ObjAdd (const char* Name); /* Add an object file to the library */ diff --git a/src/ca65/anonname.c b/src/ca65/anonname.c index 242486916..90b73fcab 100644 --- a/src/ca65/anonname.c +++ b/src/ca65/anonname.c @@ -59,9 +59,9 @@ static const char AnonTag[] = "$anon"; StrBuf* AnonName (StrBuf* Buf, const char* Spec) /* Get a name for an anonymous scope, variable or type. Size is the size of - * the buffer passed to the function, Spec will be used as part of the - * identifier if given. A pointer to the buffer is returned. - */ +** the buffer passed to the function, Spec will be used as part of the +** identifier if given. A pointer to the buffer is returned. +*/ { static unsigned ACount = 0; SB_Printf (Buf, "%s-%s-%04X", AnonTag, Spec, ++ACount); diff --git a/src/ca65/anonname.h b/src/ca65/anonname.h index fdb64159a..142cd9f87 100644 --- a/src/ca65/anonname.h +++ b/src/ca65/anonname.h @@ -51,9 +51,9 @@ StrBuf* AnonName (StrBuf* Buf, const char* Spec); /* Get a name for an anonymous scope, variable or type. Size is the size of - * the buffer passed to the function, Spec will be used as part of the - * identifier if given. A pointer to the buffer is returned. - */ +** the buffer passed to the function, Spec will be used as part of the +** identifier if given. A pointer to the buffer is returned. +*/ int IsAnonName (const StrBuf* Name); /* Check if the given symbol name is that of an anonymous symbol */ diff --git a/src/ca65/condasm.c b/src/ca65/condasm.c index c9506c316..24cbae696 100644 --- a/src/ca65/condasm.c +++ b/src/ca65/condasm.c @@ -104,9 +104,9 @@ static int GetOverallIfCond (void) /* Get the overall condition based on all conditions on the stack. */ { /* Since the last entry contains the overall condition of the parent, we - * must check it in combination of the current condition. If there is no - * last entry, the overall condition is true. - */ + ** must check it in combination of the current condition. If there is no + ** last entry, the overall condition is true. + */ return (IfCount == 0) || ((IfStack[IfCount-1].Flags & (ifCond | ifParentCond)) == (ifCond | ifParentCond)); } @@ -114,7 +114,7 @@ static int GetOverallIfCond (void) static void CalcOverallIfCond (void) -/* Caclulate the overall condition based on all conditions on the stack. */ +/* Calculate the overall condition, based on all conditions on the stack. */ { IfCond = GetOverallIfCond (); } @@ -256,9 +256,9 @@ void DoConditionals (void) NextTok (); /* Ignore the new condition if we are inside a false .ELSE - * branch. This way we won't get any errors about undefined - * symbols or similar... - */ + ** branch. This way we won't get any errors about undefined + ** symbols or similar... + */ if (IfCond) { SetIfCond (D, ConstExpression ()); ExpectSep (); @@ -273,8 +273,8 @@ void DoConditionals (void) FreeIf (); /* Be sure not to read the next token until the .IF stack - * has been cleanup up, since we may be at end of file. - */ + ** has been cleanup up, since we may be at end of file. + */ NextTok (); ExpectSep (); @@ -440,9 +440,9 @@ void DoConditionals (void) int CheckConditionals (void) /* Check if the current token is one that starts a conditional directive, and - * call DoConditionals if so. Return true if a conditional directive was found, - * return false otherwise. - */ +** call DoConditionals if so. Return true if a conditional directive was found, +** return false otherwise. +*/ { switch (CurTok.Tok) { case TOK_ELSE: @@ -473,15 +473,15 @@ int CheckConditionals (void) void CheckOpenIfs (void) /* Called from the scanner before closing an input file. Will check for any - * open .ifs in this file. - */ +** open .ifs in this file. +*/ { const LineInfo* LI; while (1) { /* Get the current file number and check if the topmost entry on the - * .IF stack was inserted with this file number - */ + ** .IF stack was inserted with this file number + */ IfDesc* D = GetCurrentIf (); if (D == 0) { /* There are no open .IFs */ diff --git a/src/ca65/condasm.h b/src/ca65/condasm.h index fa1842bf3..334ec862b 100644 --- a/src/ca65/condasm.h +++ b/src/ca65/condasm.h @@ -60,14 +60,14 @@ void DoConditionals (void); int CheckConditionals (void); /* Check if the current token is one that starts a conditional directive, and - * call DoConditionals if so. Return true if a conditional directive was found, - * return false otherwise. - */ +** call DoConditionals if so. Return true if a conditional directive was found, +** return false otherwise. +*/ void CheckOpenIfs (void); /* Called from the scanner before closing an input file. Will check for any - * open .ifs in this file. - */ +** open .ifs in this file. +*/ unsigned GetIfStack (void); /* Get the current .IF stack pointer */ diff --git a/src/ca65/dbginfo.c b/src/ca65/dbginfo.c index 5e1bf912a..8a55f9ddc 100644 --- a/src/ca65/dbginfo.c +++ b/src/ca65/dbginfo.c @@ -130,8 +130,8 @@ static unsigned HexValue (char C) static int ValidateType (StrBuf* Type) /* Check if the given type is valid and if so, return a string id for it. If - * the type isn't valid, return -1. Type is overwritten when checking. - */ +** the type isn't valid, return -1. Type is overwritten when checking. +*/ { unsigned I; const char* A; @@ -311,8 +311,8 @@ void DbgInfoLine (void) } /* If a parameters follow, this is actual line info. If no parameters - * follow, the last line info is terminated. - */ + ** follow, the last line info is terminated. + */ if (CurTok.Tok == TOK_SEP) { return; } @@ -445,10 +445,10 @@ void DbgInfoCheck (void) /* Do checks on all hll debug info symbols when assembly is complete */ { /* When parsing the debug statements for HLL symbols, we have already - * tagged the functions to their asm counterparts. This wasn't done for - * C symbols, since we will allow forward declarations. So we have to - * resolve the normal C symbols now. - */ + ** tagged the functions to their asm counterparts. This wasn't done for + ** C symbols, since we will allow forward declarations. So we have to + ** resolve the normal C symbols now. + */ unsigned I; for (I = 0; I < CollCount (&HLLDbgSyms); ++I) { @@ -456,8 +456,8 @@ void DbgInfoCheck (void) HLLDbgSym* S = CollAtUnchecked (&HLLDbgSyms, I); /* Ignore functions and auto symbols, because the later live on the - * stack and don't have corresponding asm symbols. - */ + ** stack and don't have corresponding asm symbols. + */ if (HLL_IS_FUNC (S->Flags) || HLL_GET_SC (S->Flags) == HLL_SC_AUTO) { continue; } @@ -501,8 +501,8 @@ void WriteHLLDbgSyms (void) unsigned SC = HLL_GET_SC (S->Flags); /* Remember if the symbol has debug info attached - * ### This should go into DbgInfoCheck - */ + ** ### This should go into DbgInfoCheck + */ if (S->Sym && S->Sym->DebugSymId != ~0U) { S->Flags |= HLL_DATA_SYM; } diff --git a/src/ca65/ea65.c b/src/ca65/ea65.c index 71fea6296..5f76f2966 100644 --- a/src/ca65/ea65.c +++ b/src/ca65/ea65.c @@ -157,12 +157,12 @@ void GetEA (EffAddr* A) } else { /* Remaining stuff: - * - * adr - * adr,x - * adr,y - * adr,s - */ + ** + ** adr + ** adr,x + ** adr,y + ** adr,s + */ A->Expr = Expression (); if (CurTok.Tok == TOK_COMMA) { diff --git a/src/ca65/easw16.c b/src/ca65/easw16.c index 6b3fe4f4c..578a25734 100644 --- a/src/ca65/easw16.c +++ b/src/ca65/easw16.c @@ -51,9 +51,9 @@ static long RegNum () /* Try to read a register number specified not as a register (Rx) but as a - * numeric value between 0 and 15. Return the register number or -1 on - * failure. - */ +** numeric value between 0 and 15. Return the register number or -1 on +** failure. +*/ { long Val; ExprNode* Expr = Expression (); @@ -126,8 +126,8 @@ void GetSweet16EA (EffAddr* A) A->AddrModeSet = AMSW16_BRA; /* If the value is a constant between 0 and 15, it may also be a - * register number. - */ + ** register number. + */ if (IsConstExpr (A->Expr, &Reg) && Reg >= 0 && Reg <= 15) { FreeExpr (A->Expr); A->Reg = (unsigned) Reg; diff --git a/src/ca65/error.c b/src/ca65/error.c index 6731aa0e5..38195d669 100644 --- a/src/ca65/error.c +++ b/src/ca65/error.c @@ -128,10 +128,10 @@ static void AddNotifications (const Collection* LineInfos) unsigned Skipped; /* The basic line info is always in slot zero. It has been used to - * output the actual error or warning. The following slots may contain - * more information. Check them and print additional notifications if - * they're present, but limit the number to a reasonable value. - */ + ** output the actual error or warning. The following slots may contain + ** more information. Check them and print additional notifications if + ** they're present, but limit the number to a reasonable value. + */ for (I = 1, Output = 0, Skipped = 0; I < CollCount (LineInfos); ++I) { /* Get next line info */ const LineInfo* LI = CollConstAt (LineInfos, I); diff --git a/src/ca65/expr.c b/src/ca65/expr.c index 471700e46..e4d6f7363 100644 --- a/src/ca65/expr.c +++ b/src/ca65/expr.c @@ -72,11 +72,11 @@ /* Since all expressions are first packed into expression trees, and each - * expression tree node is allocated on the heap, we add some type of special - * purpose memory allocation here: Instead of freeing the nodes, we save some - * number of freed nodes for later and remember them in a single linked list - * using the Left link. - */ +** expression tree node is allocated on the heap, we add some type of special +** purpose memory allocation here: Instead of freeing the nodes, we save some +** number of freed nodes for later and remember them in a single linked list +** using the Left link. +*/ #define MAX_FREE_NODES 64 static ExprNode* FreeExprNodes = 0; static unsigned FreeNodeCount = 0; @@ -172,9 +172,9 @@ int IsFarRange (long Val) int IsEasyConst (const ExprNode* E, long* Val) /* Do some light checking if the given node is a constant. Don't care if E is - * a complex expression. If E is a constant, return true and place its value - * into Val, provided that Val is not NULL. - */ +** a complex expression. If E is a constant, return true and place its value +** into Val, provided that Val is not NULL. +*/ { /* Resolve symbols, follow symbol chains */ while (E->Op == EXPR_SYMBOL) { @@ -322,8 +322,8 @@ static ExprNode* Symbol (SymEntry* S) /* Mark the symbol as referenced */ SymRef (S); /* If the symbol is a variable, return just its value, otherwise - * return a reference to the symbol. - */ + ** return a reference to the symbol. + */ if (SymIsVar (S)) { return CloneExpr (GetSymExpr (S)); } else { @@ -355,16 +355,16 @@ static ExprNode* FuncBlank (void) /* Handle the .BLANK builtin function */ { /* We have a list of tokens that ends with the closing paren. Skip - * the tokens, and count them. Allow optionally curly braces. - */ + ** the tokens, and count them. Allow optionally curly braces. + */ token_t Term = GetTokListTerm (TOK_RPAREN); unsigned Count = 0; while (CurTok.Tok != Term) { /* Check for end of line or end of input. Since the calling function - * will check for the closing paren, we don't need to print an error - * here, just bail out. - */ + ** will check for the closing paren, we don't need to print an error + ** here, just bail out. + */ if (TokIsSep (CurTok.Tok)) { break; } @@ -458,9 +458,9 @@ static ExprNode* DoMatch (enum TC EqualityLevel) TokNode* Node; /* A list of tokens follows. Read this list and remember it building a - * single linked list of tokens including attributes. The list is - * either enclosed in curly braces, or terminated by a comma. - */ + ** single linked list of tokens including attributes. The list is + ** either enclosed in curly braces, or terminated by a comma. + */ token_t Term = GetTokListTerm (TOK_COMMA); while (CurTok.Tok != Term) { @@ -494,9 +494,9 @@ static ExprNode* DoMatch (enum TC EqualityLevel) } /* Read the second list which is optionally enclosed in curly braces and - * terminated by the right parenthesis. Compare each token against the - * one in the first list. - */ + ** terminated by the right parenthesis. Compare each token against the + ** one in the first list. + */ Term = GetTokListTerm (TOK_RPAREN); Result = 1; Node = Root; @@ -674,8 +674,8 @@ static ExprNode* FuncSizeOf (void) } /* If ScopeName is empty, no explicit scope was specified. We have to - * search upper scope levels in this case. - */ + ** search upper scope levels in this case. + */ NoScope = SB_IsEmpty (&ScopeName); /* First search for a scope with the given name */ @@ -686,8 +686,8 @@ static ExprNode* FuncSizeOf (void) } /* If we did find a scope with the name, read the symbol defining the - * size, otherwise search for a symbol entry with the name and scope. - */ + ** size, otherwise search for a symbol entry with the name and scope. + */ if (Scope) { /* Yep, it's a scope */ SizeSym = GetSizeOfScope (Scope); @@ -755,8 +755,8 @@ static ExprNode* FuncStrAt (void) } /* Get the char, handle as unsigned. Be sure to translate it into - * the target character set. - */ + ** the target character set. + */ C = TgtTranslateChar (SB_At (&Str, (unsigned)Index)); ExitPoint: @@ -803,16 +803,16 @@ static ExprNode* FuncTCount (void) /* Handle the .TCOUNT function */ { /* We have a list of tokens that ends with the closing paren. Skip - * the tokens, and count them. Allow optionally curly braces. - */ + ** the tokens, and count them. Allow optionally curly braces. + */ token_t Term = GetTokListTerm (TOK_RPAREN); int Count = 0; while (CurTok.Tok != Term) { /* Check for end of line or end of input. Since the calling function - * will check for the closing paren, we don't need to print an error - * here, just bail out. - */ + ** will check for the closing paren, we don't need to print an error + ** here, just bail out. + */ if (TokIsSep (CurTok.Tok)) { break; } @@ -1131,8 +1131,8 @@ static ExprNode* Term (void) } /* Generate a literal expression and delete the old left and - * right sides. - */ + ** right sides. + */ FreeExpr (Left); FreeExpr (Right); Root = GenLiteralExpr (Val); @@ -1198,8 +1198,8 @@ static ExprNode* SimpleExpr (void) } /* Generate a literal expression and delete the old left and - * right sides. - */ + ** right sides. + */ FreeExpr (Left); FreeExpr (Right); Root = GenLiteralExpr (Val); @@ -1264,8 +1264,8 @@ static ExprNode* BoolExpr (void) } /* Generate a literal expression and delete the old left and - * right sides. - */ + ** right sides. + */ FreeExpr (Left); FreeExpr (Right); Root = GenLiteralExpr (Val); @@ -1327,8 +1327,8 @@ static ExprNode* Expr2 (void) } /* Generate a literal expression and delete the old left and - * right sides. - */ + ** right sides. + */ FreeExpr (Left); FreeExpr (Right); Root = GenLiteralExpr (Val); @@ -1385,8 +1385,8 @@ static ExprNode* Expr1 (void) } /* Generate a literal expression and delete the old left and - * right sides. - */ + ** right sides. + */ FreeExpr (Left); FreeExpr (Right); Root = GenLiteralExpr (Val); @@ -1453,8 +1453,8 @@ static ExprNode* Expr0 (void) ExprNode* Expression (void) /* Evaluate an expression, build the expression tree on the heap and return - * a pointer to the root of the tree. - */ +** a pointer to the root of the tree. +*/ { return Expr0 (); } @@ -1463,9 +1463,9 @@ ExprNode* Expression (void) long ConstExpression (void) /* Parse an expression. Check if the expression is const, and print an error - * message if not. Return the value of the expression, or a dummy, if it is - * not constant. - */ +** message if not. Return the value of the expression, or a dummy, if it is +** not constant. +*/ { long Val; @@ -1620,8 +1620,8 @@ ExprNode* GenSwapExpr (ExprNode* Expr) ExprNode* GenBranchExpr (unsigned Offs) /* Return an expression that encodes the difference between current PC plus - * offset and the target expression (that is, Expression() - (*+Offs) ). - */ +** offset and the target expression (that is, Expression() - (*+Offs) ). +*/ { ExprNode* N; ExprNode* Root; @@ -1637,11 +1637,11 @@ ExprNode* GenBranchExpr (unsigned Offs) FreeExpr (N); /* Generate the final expression: - * Val - (* + Offs) - * Val - ((Seg + PC) + Offs) - * Val - Seg - PC - Offs - * (Val - PC - Offs) - Seg - */ + ** Val - (* + Offs) + ** Val - ((Seg + PC) + Offs) + ** Val - Seg - PC - Offs + ** (Val - PC - Offs) - Seg + */ Root = GenLiteralExpr (Val - GetPC () - Offs); if (GetRelocMode ()) { N = Root; @@ -1653,11 +1653,11 @@ ExprNode* GenBranchExpr (unsigned Offs) } else { /* Generate the expression: - * N - (* + Offs) - * N - ((Seg + PC) + Offs) - * N - Seg - PC - Offs - * N - (PC + Offs) - Seg - */ + ** N - (* + Offs) + ** N - ((Seg + PC) + Offs) + ** N - Seg - PC - Offs + ** N - (PC + Offs) - Seg + */ Root = NewExprNode (EXPR_MINUS); Root->Left = N; Root->Right = GenLiteralExpr (GetPC () + Offs); @@ -1759,9 +1759,9 @@ ExprNode* GenNE (ExprNode* Expr, long Val) int IsConstExpr (ExprNode* Expr, long* Val) /* Return true if the given expression is a constant expression, that is, one - * with no references to external symbols. If Val is not NULL and the - * expression is constant, the constant value is stored here. - */ +** with no references to external symbols. If Val is not NULL and the +** expression is constant, the constant value is stored here. +*/ { int IsConst; @@ -1785,8 +1785,8 @@ int IsConstExpr (ExprNode* Expr, long* Val) ExprNode* CloneExpr (ExprNode* Expr) /* Clone the given expression tree. The function will simply clone symbol - * nodes, it will not resolve them. - */ +** nodes, it will not resolve them. +*/ { ExprNode* Clone; @@ -1843,8 +1843,8 @@ void WriteExpr (ExprNode* Expr) } /* If the is a leafnode, write the expression attribute, otherwise - * write the expression operands. - */ + ** write the expression operands. + */ switch (Expr->Op) { case EXPR_LITERAL: @@ -1884,12 +1884,12 @@ void WriteExpr (ExprNode* Expr) void ExprGuessedAddrSize (const ExprNode* Expr, unsigned char AddrSize) /* Mark the address size of the given expression tree as guessed. The address - * size passed as argument is the one NOT used, because the actual address - * size wasn't known. Example: Zero page addressing was not used because symbol - * is undefined, and absolute addressing was available. - * This function will actually parse the expression tree for undefined symbols, - * and mark these symbols accordingly. - */ +** size passed as argument is the one NOT used, because the actual address +** size wasn't known. Example: Zero page addressing was not used because symbol +** is undefined, and absolute addressing was available. +** This function will actually parse the expression tree for undefined symbols, +** and mark these symbols accordingly. +*/ { /* Accept NULL expressions */ if (Expr == 0) { diff --git a/src/ca65/expr.h b/src/ca65/expr.h index 0105bb68f..03c2c26d8 100644 --- a/src/ca65/expr.h +++ b/src/ca65/expr.h @@ -62,14 +62,14 @@ struct ExprDesc; ExprNode* Expression (void); /* Evaluate an expression, build the expression tree on the heap and return - * a pointer to the root of the tree. - */ +** a pointer to the root of the tree. +*/ long ConstExpression (void); /* Parse an expression. Check if the expression is const, and print an error - * message if not. Return the value of the expression, or a dummy, if it is - * not constant. - */ +** message if not. Return the value of the expression, or a dummy, if it is +** not constant. +*/ void FreeExpr (ExprNode* Root); /* Free the expression tree, Root is pointing to. */ @@ -97,8 +97,8 @@ ExprNode* GenSwapExpr (ExprNode* Expr); ExprNode* GenBranchExpr (unsigned Offs); /* Return an expression that encodes the difference between current PC plus - * offset and the target expression (that is, Expression() - (*+Offs) ). - */ +** offset and the target expression (that is, Expression() - (*+Offs) ). +*/ ExprNode* GenULabelExpr (unsigned Num); /* Return an expression for an unnamed label with the given index */ @@ -120,9 +120,9 @@ ExprNode* GenNE (ExprNode* Expr, long Val); int IsConstExpr (ExprNode* Expr, long* Val); /* Return true if the given expression is a constant expression, that is, one - * with no references to external symbols. If Val is not NULL and the - * expression is constant, the constant value is stored here. - */ +** with no references to external symbols. If Val is not NULL and the +** expression is constant, the constant value is stored here. +*/ int IsByteExpr (ExprNode* Root); /* Return true if this is a byte expression */ @@ -138,26 +138,26 @@ int IsFarRange (long Val); int IsEasyConst (const ExprNode* E, long* Val); /* Do some light checking if the given node is a constant. Don't care if E is - * a complex expression. If E is a constant, return true and place its value - * into Val, provided that Val is not NULL. - */ +** a complex expression. If E is a constant, return true and place its value +** into Val, provided that Val is not NULL. +*/ ExprNode* CloneExpr (ExprNode* Expr); /* Clone the given expression tree. The function will simply clone symbol - * nodes, it will not resolve them. - */ +** nodes, it will not resolve them. +*/ void WriteExpr (ExprNode* Expr); /* Write the given expression to the object file */ void ExprGuessedAddrSize (const ExprNode* Expr, unsigned char AddrSize); /* Mark the address size of the given expression tree as guessed. The address - * size passed as argument is the one NOT used, because the actual address - * size wasn't known. Example: Zero page addressing was not used because symbol - * is undefined, and absolute addressing was available. - * This function will actually parse the expression tree for undefined symbols, - * and mark these symbols accordingly. - */ +** size passed as argument is the one NOT used, because the actual address +** size wasn't known. Example: Zero page addressing was not used because symbol +** is undefined, and absolute addressing was available. +** This function will actually parse the expression tree for undefined symbols, +** and mark these symbols accordingly. +*/ ExprNode* FuncBankByte (void); /* Handle the .BANKBYTE builtin function */ diff --git a/src/ca65/feature.c b/src/ca65/feature.c index 9a6055cb9..c398d2b37 100644 --- a/src/ca65/feature.c +++ b/src/ca65/feature.c @@ -75,8 +75,8 @@ static const char* FeatureKeys[FEAT_COUNT] = { feature_t FindFeature (const StrBuf* Key) /* Find the feature in a table and return the corresponding enum value. If the - * feature is invalid, return FEAT_UNKNOWN. - */ +** feature is invalid, return FEAT_UNKNOWN. +*/ { feature_t F; @@ -96,9 +96,9 @@ feature_t FindFeature (const StrBuf* Key) feature_t SetFeature (const StrBuf* Key) /* Find the feature and set the corresponding flag if the feature is known. - * In any case, return the feature found. An invalid Key will return - * FEAT_UNKNOWN. - */ +** In any case, return the feature found. An invalid Key will return +** FEAT_UNKNOWN. +*/ { /* Map the string to an enum value */ feature_t Feature = FindFeature (Key); diff --git a/src/ca65/feature.h b/src/ca65/feature.h index 563ef5c2d..9682ad9b9 100644 --- a/src/ca65/feature.h +++ b/src/ca65/feature.h @@ -80,14 +80,14 @@ typedef enum { feature_t FindFeature (const StrBuf* Key); /* Find the feature in a table and return the corresponding enum value. If the - * feature is invalid, return FEAT_UNKNOWN. - */ +** feature is invalid, return FEAT_UNKNOWN. +*/ feature_t SetFeature (const StrBuf* Key); /* Find the feature and set the corresponding flag if the feature is known. - * In any case, return the feature found. An invalid Key will return - * FEAT_UNKNOWN. - */ +** In any case, return the feature found. An invalid Key will return +** FEAT_UNKNOWN. +*/ diff --git a/src/ca65/filetab.c b/src/ca65/filetab.c index 0b7d7eb80..fbe163f51 100644 --- a/src/ca65/filetab.c +++ b/src/ca65/filetab.c @@ -66,9 +66,9 @@ static const void* HT_GetKey (const void* Entry); static int HT_Compare (const void* Key1, const void* Key2); /* Compare two keys. The function must return a value less than zero if - * Key1 is smaller than Key2, zero if both are equal, and a value greater - * than zero if Key1 is greater then Key2. - */ +** Key1 is smaller than Key2, zero if both are equal, and a value greater +** than zero if Key1 is greater then Key2. +*/ @@ -132,9 +132,9 @@ static const void* HT_GetKey (const void* Entry) static int HT_Compare (const void* Key1, const void* Key2) /* Compare two keys. The function must return a value less than zero if - * Key1 is smaller than Key2, zero if both are equal, and a value greater - * than zero if Key1 is greater then Key2. - */ +** Key1 is smaller than Key2, zero if both are equal, and a value greater +** than zero if Key1 is greater then Key2. +*/ { return (int)*(const unsigned*)Key1 - (int)*(const unsigned*)Key2; } @@ -183,9 +183,9 @@ const StrBuf* GetFileName (unsigned Name) if (Name == 0) { /* Name was defined outside any file scope, use the name of the first - * file instead. Errors are then reported with a file position of - * line zero in the first file. - */ + ** file instead. Errors are then reported with a file position of + ** line zero in the first file. + */ if (CollCount (&FileTab) == 0) { /* No files defined until now */ return &ErrorMsg; @@ -223,8 +223,8 @@ unsigned GetFileIndex (const StrBuf* Name) unsigned AddFile (const StrBuf* Name, FileType Type, unsigned long Size, unsigned long MTime) /* Add a new file to the list of input files. Return the index of the file in - * the table. - */ +** the table. +*/ { /* Create a new file entry and insert it into the tables */ FileEntry* F = NewFileEntry (GetStrBufId (Name), Type, Size, MTime); @@ -295,8 +295,8 @@ static void WriteDep (FILE* F, FileType Types) static void CreateDepFile (const char* Name, FileType Types) /* Create a dependency file with the given name and place dependencies for - * all files with the given types there. - */ +** all files with the given types there. +*/ { /* Open the file */ FILE* F = fopen (Name, "w"); diff --git a/src/ca65/filetab.h b/src/ca65/filetab.h index b6fd2b6a5..4e8cf5668 100644 --- a/src/ca65/filetab.h +++ b/src/ca65/filetab.h @@ -50,8 +50,8 @@ /* An enum that describes different types of input files. The members are - * choosen so that it is possible to combine them to bitsets - */ +** choosen so that it is possible to combine them to bitsets +*/ typedef enum { FT_MAIN = 0x01, /* Main input file */ FT_INCLUDE = 0x02, /* Normal include file */ @@ -76,8 +76,8 @@ unsigned GetFileIndex (const StrBuf* Name); unsigned AddFile (const StrBuf* Name, FileType Type, unsigned long Size, unsigned long MTime); /* Add a new file to the list of input files. Return the index of the file in - * the table. - */ +** the table. +*/ void WriteFiles (void); /* Write the list of input files to the object file */ diff --git a/src/ca65/fragment.c b/src/ca65/fragment.c index b4997cb6d..6a14a4cfc 100644 --- a/src/ca65/fragment.c +++ b/src/ca65/fragment.c @@ -49,8 +49,8 @@ Fragment* NewFragment (unsigned char Type, unsigned short Len) /* Create, initialize and return a new fragment. The fragment will be inserted - * into the current segment. - */ +** into the current segment. +*/ { /* Create a new fragment */ Fragment* F = xmalloc (sizeof (*F)); diff --git a/src/ca65/fragment.h b/src/ca65/fragment.h index 2420d332e..f89589501 100644 --- a/src/ca65/fragment.h +++ b/src/ca65/fragment.h @@ -76,8 +76,8 @@ struct Fragment { Fragment* NewFragment (unsigned char Type, unsigned short Len); /* Create, initialize and return a new fragment. The fragment will be inserted - * into the current segment. - */ +** into the current segment. +*/ diff --git a/src/ca65/instr.c b/src/ca65/instr.c index 1c7be086b..c2482577c 100644 --- a/src/ca65/instr.c +++ b/src/ca65/instr.c @@ -90,37 +90,37 @@ static void PutSEP (const InsDesc* Ins); static void PutTAMn (const InsDesc* Ins); /* Emit a TAMn instruction (HuC6280). Since this is a two byte instruction with - * implicit addressing mode, the opcode byte in the table is actually the - * second operand byte. The TAM instruction is the more generic form, it takes - * an immediate argument. - */ +** implicit addressing mode, the opcode byte in the table is actually the +** second operand byte. The TAM instruction is the more generic form, it takes +** an immediate argument. +*/ static void PutTMA (const InsDesc* Ins); /* Emit a TMA instruction (HuC6280) with an immediate argument. Only one bit - * in the argument byte may be set. - */ +** in the argument byte may be set. +*/ static void PutTMAn (const InsDesc* Ins); /* Emit a TMAn instruction (HuC6280). Since this is a two byte instruction with - * implicit addressing mode, the opcode byte in the table is actually the - * second operand byte. The TAM instruction is the more generic form, it takes - * an immediate argument. - */ +** implicit addressing mode, the opcode byte in the table is actually the +** second operand byte. The TAM instruction is the more generic form, it takes +** an immediate argument. +*/ static void PutTST (const InsDesc* Ins); /* Emit a TST instruction (HuC6280). */ static void PutJMP (const InsDesc* Ins); /* Handle the jump instruction for the 6502. Problem is that these chips have - * a bug: If the address crosses a page, the upper byte gets not corrected and - * the instruction will fail. The PutJmp function will add a linker assertion - * to check for this case and is otherwise identical to PutAll. - */ +** a bug: If the address crosses a page, the upper byte gets not corrected and +** the instruction will fail. The PutJmp function will add a linker assertion +** to check for this case and is otherwise identical to PutAll. +*/ static void PutRTS (const InsDesc* Ins attribute ((unused))); /* Handle the RTS instruction for the 816. In smart mode emit a RTL opcode if - * the enclosing scope is FAR. - */ +** the enclosing scope is FAR. +*/ static void PutAll (const InsDesc* Ins); /* Handle all other instructions */ @@ -783,8 +783,8 @@ static const InsTable* InsTabs[CPU_COUNT] = { const InsTable* InsTab = (const InsTable*) &InsTab6502; /* Table to build the effective 65xx opcode from a base opcode and an - * addressing mode. - */ +** addressing mode. +*/ static unsigned char EATab[10][AM65I_COUNT] = { { /* Table 0 */ 0x00, 0x00, 0x05, 0x0D, 0x0F, 0x15, 0x1D, 0x1F, @@ -849,8 +849,8 @@ static unsigned char EATab[10][AM65I_COUNT] = { }; /* Table to build the effective SWEET16 opcode from a base opcode and an - * addressing mode. - */ +** addressing mode. +*/ static unsigned char Sweet16EATab[2][AMSW16I_COUNT] = { { /* Table 0 */ 0x00, 0x00, 0x00, 0x00, 0x00, @@ -910,21 +910,21 @@ static unsigned char Sweet16ExtBytes[AMSW16I_COUNT] = { static int EvalEA (const InsDesc* Ins, EffAddr* A) /* Evaluate the effective address. All fields in A will be valid after calling - * this function. The function returns true on success and false on errors. - */ +** this function. The function returns true on success and false on errors. +*/ { /* Get the set of possible addressing modes */ GetEA (A); /* From the possible addressing modes, remove the ones that are invalid - * for this instruction or CPU. - */ + ** for this instruction or CPU. + */ A->AddrModeSet &= Ins->AddrMode; /* If we have an expression, check it and remove any addressing modes that - * are too small for the expression size. Since we have to study the - * expression anyway, do also replace it by a simpler one if possible. - */ + ** are too small for the expression size. Since we have to study the + ** expression anyway, do also replace it by a simpler one if possible. + */ if (A->Expr) { ExprDesc ED; ED_Init (&ED); @@ -937,10 +937,10 @@ static int EvalEA (const InsDesc* Ins, EffAddr* A) if (ED.AddrSize == ADDR_SIZE_DEFAULT) { /* We don't know how big the expression is. If the instruction - * allows just one addressing mode, assume this as address size - * for the expression. Otherwise assume the default address size - * for data. - */ + ** allows just one addressing mode, assume this as address size + ** for the expression. Otherwise assume the default address size + ** for data. + */ if ((A->AddrModeSet & ~AM65_ALL_ZP) == 0) { ED.AddrSize = ADDR_SIZE_ZP; } else if ((A->AddrModeSet & ~AM65_ALL_ABS) == 0) { @@ -950,12 +950,12 @@ static int EvalEA (const InsDesc* Ins, EffAddr* A) } else { ED.AddrSize = DataAddrSize; /* If the default address size of the data segment is unequal - * to zero page addressing, but zero page addressing is - * allowed by the instruction, mark all symbols in the - * expression tree. This mark will be checked at end of - * assembly, and a warning is issued, if a zero page symbol - * was guessed wrong here. - */ + ** to zero page addressing, but zero page addressing is + ** allowed by the instruction, mark all symbols in the + ** expression tree. This mark will be checked at end of + ** assembly, and a warning is issued, if a zero page symbol + ** was guessed wrong here. + */ if (ED.AddrSize > ADDR_SIZE_ZP && (A->AddrModeSet & AM65_SET_ZP)) { ExprGuessedAddrSize (A->Expr, ADDR_SIZE_ZP); } @@ -987,11 +987,11 @@ static int EvalEA (const InsDesc* Ins, EffAddr* A) A->AddrModeBit = (0x01UL << A->AddrMode); /* If the instruction has a one byte operand and immediate addressing is - * allowed but not used, check for an operand expression in the form - *