From b7f4c301f64986318aab64e94fd252f876acf770 Mon Sep 17 00:00:00 2001 From: Andrea Palmate Date: Wed, 13 Sep 2023 11:31:52 +0200 Subject: [PATCH 1/3] Added mfused-madd flag --- GNUmakefile.os4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GNUmakefile.os4 b/GNUmakefile.os4 index 2e37efd0..7faedc7f 100644 --- a/GNUmakefile.os4 +++ b/GNUmakefile.os4 @@ -102,7 +102,7 @@ STATIC := $(if $(STATIC),$(STATIC),yes) LARGEDATA := OPTIONS += $(LARGEDATA) -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D__CLIB2__ -Wa,-mregnames -fno-builtin -nostdlib -D_GNU_SOURCE -D_XOPEN_SOURCE -D_USE_GNU -pipe -OPTIMIZE := -O3 -mregnames -mmultiple -mupdate -mstrict-align +OPTIMIZE := -O3 -mregnames -mmultiple -mupdate -mfused-madd -mstrict-align STABS := DLIBS := From 4f5b94fa8ddea1512421c0dc2be70ac2a10652ae Mon Sep 17 00:00:00 2001 From: Andrea Palmate Date: Wed, 27 Sep 2023 11:16:52 +0200 Subject: [PATCH 2/3] Renamed library to clib4 --- .gitignore | 8 +- GNUmakefile.os4 | 72 +- LICENSE | 2 +- README.md | 43 +- documentation/BUILDING.html | 2 +- installer/Install | 8 +- libamiga.gmk | 2 +- libc.gmk | 4 +- libcrypt.gmk | 2 +- libdebug.gmk | 2 +- libm.gmk | 2 +- libprofile.gmk | 2 +- libpthread.gmk | 2 +- library/amiga/acrypt.c | 2 +- library/amiga/addtof.c | 2 +- library/amiga/amiga.lib_rev.c | 2 +- library/amiga/argarraydone.c | 2 +- library/amiga/argarrayinit.c | 2 +- library/amiga/argint.c | 2 +- library/amiga/argstring.c | 2 +- library/amiga/beginio.c | 2 +- library/amiga/createextio.c | 2 +- library/amiga/createport.c | 2 +- library/amiga/createstdio.c | 2 +- library/amiga/createtask.c | 2 +- library/amiga/deleteextio.c | 2 +- library/amiga/deleteport.c | 2 +- library/amiga/deletestdio.c | 2 +- library/amiga/deletetask.c | 2 +- library/amiga/dotimer.c | 2 +- library/amiga/fastrand.c | 2 +- library/amiga/freeievents.c | 2 +- library/amiga/hotkey.c | 2 +- library/amiga/invertstring.c | 2 +- library/amiga/newlist.c | 2 +- library/amiga/rangerand.c | 2 +- library/amiga/remtof.c | 2 +- library/amiga/rexxvars.c | 2 +- library/amiga/timedelay.c | 2 +- library/amiga/waitbeam.c | 2 +- library/argz/add.c | 2 +- library/argz/add_sep.c | 2 +- library/argz/append.c | 2 +- library/argz/count.c | 2 +- library/argz/create.c | 2 +- library/argz/create_sep.c | 2 +- library/argz/delete.c | 2 +- library/argz/extract.c | 2 +- library/argz/insert.c | 2 +- library/argz/next.c | 2 +- library/argz/replace.c | 2 +- library/argz/stringify.c | 2 +- library/c.lib_rev.c | 2 +- library/c.lib_rev.h | 10 +- library/contrib/README | 3 - library/cpu/altivec/longjmp_altivec.sx | 2 +- library/cpu/altivec/setjmp_altivec.sx | 2 +- library/cpu/spe/_longjmpE500.S | 2 +- library/cpu/spe/_setjmpE500.S | 2 +- library/cpu/spe/longjmpE500.S | 2 +- library/cpu/spe/setjmpE500.S | 2 +- library/cpu/spe/sigsetjmpE500.S | 2 +- library/crt0.S | 2 +- library/crtbegin.c | 28 +- library/crtend.c | 2 +- library/crypt/crypt.c | 2 +- library/crypt/crypt.lib_rev.c | 2 +- library/crypt/crypt_blowfish.c | 2 +- library/crypt/crypt_des.c | 2 +- library/crypt/crypt_md5.c | 2 +- library/crypt/crypt_r.c | 2 +- library/crypt/crypt_sha256.c | 2 +- library/crypt/crypt_sha512.c | 2 +- library/crypt/encrypt.c | 2 +- library/ctype/ctype_headers.h | 2 +- library/ctype/isalnum.c | 12 +- library/ctype/isalpha.c | 12 +- library/ctype/isascii.c | 2 +- library/ctype/isblank.c | 2 +- library/ctype/iscntrl.c | 12 +- library/ctype/isdigit.c | 12 +- library/ctype/isgraph.c | 12 +- library/ctype/islower.c | 12 +- library/ctype/isprint.c | 12 +- library/ctype/ispunct.c | 12 +- library/ctype/isspace.c | 12 +- library/ctype/isupper.c | 12 +- library/ctype/isxdigit.c | 12 +- library/ctype/toascii.c | 2 +- library/ctype/tolower.c | 12 +- library/ctype/toupper.c | 12 +- library/debug/cmpstrexec.c | 2 +- library/debug/debug.c | 98 +- library/debug/debug.h | 4 +- library/debug/debug.lib_rev.c | 2 +- library/debug/debug_headers.h | 2 +- library/debug/kcmpstr.c | 2 +- library/debug/kdofmt.c | 2 +- library/debug/kgetc.c | 2 +- library/debug/kgetch1.c | 2 +- library/debug/kgetch2.c | 2 +- library/debug/kgetchar1.c | 2 +- library/debug/kgetchar2.c | 2 +- library/debug/kgetnum1.c | 2 +- library/debug/kgetnum2.c | 2 +- library/debug/kmaygetch.c | 2 +- library/debug/kmaygetchar.c | 2 +- library/debug/kprintf1.c | 2 +- library/debug/kprintf2.c | 2 +- library/debug/kputc.c | 2 +- library/debug/kputch1.c | 2 +- library/debug/kputch2.c | 2 +- library/debug/kputchar1.c | 2 +- library/debug/kputchar2.c | 2 +- library/debug/kputfmt.c | 2 +- library/debug/kputs1.c | 2 +- library/debug/kputs2.c | 2 +- library/debug/kputstr1.c | 2 +- library/debug/kputstr2.c | 2 +- library/debug/kvprintf1.c | 2 +- library/debug/kvprintf2.c | 2 +- library/dirent/alphasort.c | 2 +- library/dirent/closedir.c | 44 +- library/dirent/dirent_headers.h | 6 +- library/dirent/dirfd.c | 2 +- library/dirent/fdopendir.c | 2 +- library/dirent/opendir.c | 16 +- library/dirent/readdir.c | 8 +- library/dirent/readdir64_r.c | 2 +- library/dirent/readdir_r.c | 2 +- library/dirent/rewinddir.c | 2 +- library/dirent/scandir.c | 2 +- library/envz/buf_findstr.c | 2 +- library/envz/envz_add.c | 2 +- library/envz/envz_entry.c | 2 +- library/envz/envz_get.c | 2 +- library/envz/envz_merge.c | 2 +- library/envz/envz_remove.c | 2 +- library/envz/envz_strip.c | 2 +- library/errno_data.c | 6 +- library/fcntl/close.c | 6 +- library/fcntl/creat.c | 2 +- library/fcntl/fcntl.c | 28 +- library/fcntl/fcntl_headers.h | 2 +- library/fcntl/flock.c | 2 +- library/fcntl/open.c | 18 +- library/fcntl/openat.c | 6 +- library/fcntl/read.c | 14 +- library/fcntl/write.c | 16 +- library/fts/fts.c | 18 +- library/{getclib2.c => getclib4.c} | 16 +- library/iconv/iconv.c | 2 +- library/iconv/iconv_close.c | 2 +- library/iconv/iconv_open.c | 2 +- library/iconv/iconv_priv.c | 2 +- library/include/argz.h | 2 +- library/include/arpa/inet.h | 2 +- library/include/assert.h | 2 +- library/include/complex.h | 2 +- library/include/ctype.h | 24 +- library/include/dirent.h | 2 +- library/include/dlfcn.h | 2 +- library/include/dos.h | 20 +- library/include/errno.h | 2 +- library/include/fcntl.h | 2 +- library/include/features.h | 4 +- library/include/fenv.h | 2 +- library/include/float.h | 2 +- library/include/ftw.h | 2 +- library/include/getopt.h | 9 +- library/include/grp.h | 2 +- library/include/inttypes.h | 2 +- library/include/iso646.h | 2 +- library/include/langinfo.h | 2 +- library/include/libgen.h | 2 +- library/include/limits.h | 2 +- library/include/locale.h | 2 +- library/include/malloc.h | 2 +- library/include/math.h | 6 +- library/include/netdb.h | 2 +- library/include/nl_types.h | 2 +- library/include/poll.h | 2 +- library/include/pthread.h | 2 +- library/include/pwd.h | 2 +- library/include/sched.h | 2 +- library/include/semaphore.h | 2 +- library/include/setjmp.h | 2 +- library/include/signal.h | 2 +- library/include/stdalign.h | 2 +- library/include/stdarg.h | 2 +- library/include/stdatomic.h | 2 +- library/include/stdbool.h | 2 +- library/include/stddef.h | 2 +- library/include/stdint.h | 2 +- library/include/stdio.h | 8 +- library/include/stdlib.h | 32 +- library/include/stdnoreturn.h | 2 +- library/include/string.h | 2 +- library/include/strings.h | 2 +- library/include/sys/amigaos-va.h | 2 +- library/include/sys/cdefs.h | 14 +- .../include/sys/{clib2_io.h => clib4_io.h} | 8 +- .../sys/{clib2_stdc.h => clib4_stdc.h} | 8 +- library/include/sys/filio.h | 2 +- library/include/sys/ioccom.h | 2 +- library/include/sys/ioctl.h | 2 +- library/include/sys/mman.h | 2 +- library/include/sys/mount.h | 2 +- library/include/sys/param.h | 7 - library/include/sys/resource.h | 2 +- library/include/sys/select.h | 2 +- library/include/sys/sem.h | 2 +- library/include/sys/stat.h | 2 +- library/include/sys/syslog.h | 2 +- library/include/sys/systeminfo.h | 2 +- library/include/sys/timeb.h | 2 +- library/include/sys/types.h | 2 +- library/include/sys/uio.h | 2 +- library/include/sys/utsname.h | 2 +- library/include/termcap.h | 8 +- library/include/termios.h | 2 +- library/include/time.h | 8 +- library/include/ulimit.h | 2 +- library/include/unistd.h | 2 +- library/include/utime.h | 2 +- library/include/wchar.h | 8 +- library/include/wctype.h | 2 +- library/inttypes/imaxabs.c | 2 +- library/inttypes/imaxdiv.c | 2 +- library/inttypes/inttypes_headers.h | 2 +- library/inttypes/strtoimax.c | 2 +- library/inttypes/strtoumax.c | 2 +- library/inttypes/wcstoimax.c | 2 +- library/inttypes/wcstoumax.c | 2 +- library/libc_init_global.c | 134 +- library/locale/dcngettext.c | 54 +- library/locale/init_exit.c | 144 +- library/locale/langinfo.c | 20 +- library/locale/locale_headers.h | 8 +- library/locale/localeconv.c | 12 +- library/locale/setlocale.c | 30 +- library/macros.h | 2 +- library/math/b_tgamma.c | 2 +- library/math/complex_headers.h | 2 +- library/math/e_acos.c | 2 +- library/math/e_acosf.c | 2 +- library/math/e_acosh.c | 2 +- library/math/e_acoshf.c | 2 +- library/math/e_acoshl.c | 2 +- library/math/e_acosl.c | 2 +- library/math/e_asin.c | 2 +- library/math/e_asinf.c | 2 +- library/math/e_asinl.c | 2 +- library/math/e_atan2.c | 2 +- library/math/e_atan2l.c | 2 +- library/math/e_atanh.c | 2 +- library/math/e_atanhf.c | 2 +- library/math/e_atanhl.c | 2 +- library/math/e_cosh.c | 2 +- library/math/e_coshf.c | 2 +- library/math/e_coshl.c | 2 +- library/math/e_exp.c | 2 +- library/math/e_expf.c | 2 +- library/math/e_fmod.c | 2 +- library/math/e_fmodf.c | 2 +- library/math/e_fmodl.c | 2 +- library/math/e_hypot.c | 2 +- library/math/e_hypotf.c | 2 +- library/math/e_hypotl.c | 2 +- library/math/e_j0.c | 2 +- library/math/e_j0f.c | 2 +- library/math/e_j1.c | 2 +- library/math/e_j1f.c | 2 +- library/math/e_jn.c | 2 +- library/math/e_jnf.c | 2 +- library/math/e_lgamma.c | 2 +- library/math/e_lgammaf.c | 2 +- library/math/e_lgammal.c | 2 +- library/math/e_log10.c | 2 +- library/math/e_log10f.c | 2 +- library/math/e_log10l.c | 2 +- library/math/e_log2.c | 2 +- library/math/e_log2f.c | 2 +- library/math/e_log2l.c | 2 +- library/math/e_logf.c | 2 +- library/math/e_logl.c | 2 +- library/math/e_pow.c | 2 +- library/math/e_powf.c | 2 +- library/math/e_powl.c | 2 +- library/math/e_rem_pio2.c | 2 +- library/math/e_rem_pio2f.c | 2 +- library/math/e_remainder.c | 2 +- library/math/e_remainderf.c | 2 +- library/math/e_remainderl.c | 2 +- library/math/e_sinh.c | 2 +- library/math/e_sinhf.c | 2 +- library/math/e_sinhl.c | 2 +- library/math/e_sqrt.c | 2 +- library/math/e_sqrtf.c | 2 +- library/math/e_sqrtl.c | 2 +- library/math/fenv.c | 2 +- library/math/finite.c | 2 +- library/math/fpgetmask.c | 2 +- library/math/fpgetround.c | 2 +- library/math/fpgetsticky.c | 2 +- library/math/fpsetmask.c | 2 +- library/math/fpsetround.c | 2 +- library/math/init_exit.c | 8 +- library/math/invtrig.c | 2 +- library/math/invtrig.h | 2 +- library/math/k_cos.c | 2 +- library/math/k_cosf.c | 2 +- library/math/k_exp.c | 2 +- library/math/k_expf.c | 2 +- library/math/k_rem_pio2.c | 2 +- library/math/k_sin.c | 2 +- library/math/k_sinf.c | 2 +- library/math/k_tan.c | 2 +- library/math/k_tanf.c | 2 +- library/math/m.lib_rev.c | 2 +- library/math/math_fp_support.h | 2 +- library/math/math_headers.h | 2 +- library/math/s_asinh.c | 2 +- library/math/s_asinhf.c | 2 +- library/math/s_asinhl.c | 2 +- library/math/s_atan.c | 2 +- library/math/s_atan2f.c | 2 +- library/math/s_atanf.c | 2 +- library/math/s_atanl.c | 2 +- library/math/s_cabs.c | 2 +- library/math/s_cabsf.c | 2 +- library/math/s_cabsl.c | 2 +- library/math/s_cacos.c | 2 +- library/math/s_cacosf.c | 2 +- library/math/s_cacosh.c | 2 +- library/math/s_cacoshf.c | 2 +- library/math/s_cacoshl.c | 2 +- library/math/s_cacosl.c | 2 +- library/math/s_carg.c | 2 +- library/math/s_cargf.c | 2 +- library/math/s_cargl.c | 2 +- library/math/s_casin.c | 2 +- library/math/s_casinf.c | 2 +- library/math/s_casinh.c | 2 +- library/math/s_casinhf.c | 2 +- library/math/s_casinhl.c | 2 +- library/math/s_casinl.c | 2 +- library/math/s_catan.c | 2 +- library/math/s_catanf.c | 2 +- library/math/s_catanh.c | 2 +- library/math/s_catanhf.c | 2 +- library/math/s_catanhl.c | 2 +- library/math/s_catanl.c | 2 +- library/math/s_cbrt.c | 2 +- library/math/s_cbrtf.c | 2 +- library/math/s_cbrtl.c | 2 +- library/math/s_ccos.c | 2 +- library/math/s_ccosf.c | 2 +- library/math/s_ccosh.c | 2 +- library/math/s_ccoshf.c | 2 +- library/math/s_ccoshl.c | 2 +- library/math/s_ccosl.c | 2 +- library/math/s_ceil.c | 2 +- library/math/s_ceilf.c | 2 +- library/math/s_ceill.c | 2 +- library/math/s_cexp.c | 2 +- library/math/s_cexpf.c | 2 +- library/math/s_cexpl.c | 2 +- library/math/s_cimag.c | 2 +- library/math/s_cimagf.c | 2 +- library/math/s_cimagl.c | 2 +- library/math/s_clog.c | 2 +- library/math/s_clogf.c | 2 +- library/math/s_clogl.c | 2 +- library/math/s_conj.c | 2 +- library/math/s_conjf.c | 2 +- library/math/s_conjl.c | 2 +- library/math/s_copysign.c | 2 +- library/math/s_copysignf.c | 2 +- library/math/s_copysignl.c | 2 +- library/math/s_cos.c | 2 +- library/math/s_cosf.c | 2 +- library/math/s_cosl.c | 2 +- library/math/s_cpow.c | 2 +- library/math/s_cpowf.c | 2 +- library/math/s_cpowl.c | 2 +- library/math/s_cproj.c | 2 +- library/math/s_cprojf.c | 2 +- library/math/s_cprojl.c | 2 +- library/math/s_creal.c | 2 +- library/math/s_crealf.c | 2 +- library/math/s_creall.c | 2 +- library/math/s_csin.c | 2 +- library/math/s_csinf.c | 2 +- library/math/s_csinh.c | 2 +- library/math/s_csinhf.c | 2 +- library/math/s_csinhl.c | 2 +- library/math/s_csinl.c | 2 +- library/math/s_csqrt.c | 2 +- library/math/s_csqrtf.c | 2 +- library/math/s_csqrtl.c | 2 +- library/math/s_ctan.c | 2 +- library/math/s_ctanf.c | 2 +- library/math/s_ctanh.c | 2 +- library/math/s_ctanhf.c | 2 +- library/math/s_ctanhl.c | 2 +- library/math/s_ctanl.c | 2 +- library/math/s_erf.c | 2 +- library/math/s_erfc.c | 2 +- library/math/s_erfcf.c | 2 +- library/math/s_erfcl.c | 2 +- library/math/s_erff.c | 2 +- library/math/s_erfl.c | 2 +- library/math/s_exp10.c | 2 +- library/math/s_exp10f.c | 2 +- library/math/s_exp10l.c | 2 +- library/math/s_exp2.c | 2 +- library/math/s_exp2f.c | 2 +- library/math/s_exp2l.c | 2 +- library/math/s_expl.c | 2 +- library/math/s_expm1.c | 2 +- library/math/s_expm1f.c | 2 +- library/math/s_expm1l.c | 2 +- library/math/s_fabs.c | 2 +- library/math/s_fabs_spe.S | 2 +- library/math/s_fabsf.c | 2 +- library/math/s_fabsf_spe.S | 2 +- library/math/s_fabsl.c | 2 +- library/math/s_fdim.c | 2 +- library/math/s_fdimf.c | 2 +- library/math/s_fdiml.c | 2 +- library/math/s_floor.c | 2 +- library/math/s_floorf.c | 2 +- library/math/s_floorl.c | 2 +- library/math/s_fma.c | 2 +- library/math/s_fmaf.c | 2 +- library/math/s_fmal.c | 2 +- library/math/s_fmax.c | 2 +- library/math/s_fmaxf.c | 2 +- library/math/s_fmaxl.c | 2 +- library/math/s_fmin.c | 2 +- library/math/s_fminf.c | 2 +- library/math/s_fminl.c | 2 +- library/math/s_fpclassify.c | 2 +- library/math/s_frexp.c | 2 +- library/math/s_frexpf.c | 2 +- library/math/s_frexpl.c | 2 +- library/math/s_ilogb.c | 2 +- library/math/s_ilogbf.c | 2 +- library/math/s_ilogbl.c | 2 +- library/math/s_isfinite.c | 2 +- library/math/s_isinf.c | 2 +- library/math/s_isnan.c | 2 +- library/math/s_isnormal.c | 2 +- library/math/s_ldexp.c | 2 +- library/math/s_ldexpf.c | 2 +- library/math/s_ldexpl.c | 2 +- library/math/s_llrint.c | 2 +- library/math/s_llrintf.c | 2 +- library/math/s_llrintl.c | 2 +- library/math/s_llround.c | 2 +- library/math/s_llroundf.c | 2 +- library/math/s_llroundl.c | 2 +- library/math/s_log1p.c | 2 +- library/math/s_log1pf.c | 2 +- library/math/s_log1pl.c | 2 +- library/math/s_logb.c | 2 +- library/math/s_logbf.c | 2 +- library/math/s_logbl.c | 2 +- library/math/s_lrint.c | 2 +- library/math/s_lrintf.c | 2 +- library/math/s_lrintf_spe.S | 2 +- library/math/s_lrintl.c | 2 +- library/math/s_lround.c | 2 +- library/math/s_lroundf.c | 2 +- library/math/s_lroundl.c | 2 +- library/math/s_modf.c | 2 +- library/math/s_modff.c | 2 +- library/math/s_modfl.c | 2 +- library/math/s_nan.c | 2 +- library/math/s_nanf.c | 2 +- library/math/s_nanl.c | 2 +- library/math/s_nearbyint.c | 2 +- library/math/s_nearbyintf.c | 2 +- library/math/s_nearbyintl.c | 2 +- library/math/s_nextafter.c | 2 +- library/math/s_nextafterf.c | 2 +- library/math/s_nextafterl.c | 2 +- library/math/s_nexttoward.c | 2 +- library/math/s_nexttowardf.c | 2 +- library/math/s_nexttowardl.c | 2 +- library/math/s_pow10.c | 2 +- library/math/s_pow10f.c | 2 +- library/math/s_pow10l.c | 2 +- library/math/s_remquo.c | 2 +- library/math/s_remquof.c | 2 +- library/math/s_remquol.c | 2 +- library/math/s_rint.c | 2 +- library/math/s_rintf.c | 2 +- library/math/s_rintl.c | 2 +- library/math/s_round.c | 2 +- library/math/s_roundf.c | 2 +- library/math/s_roundl.c | 2 +- library/math/s_scalbln.c | 2 +- library/math/s_scalblnf.c | 2 +- library/math/s_scalblnl.c | 2 +- library/math/s_scalbn.c | 2 +- library/math/s_scalbnf.c | 2 +- library/math/s_scalbnl.c | 2 +- library/math/s_signbit.c | 2 +- library/math/s_signgam.c | 6 +- library/math/s_sin.c | 2 +- library/math/s_sincos.c | 2 +- library/math/s_sincosf.c | 2 +- library/math/s_sincosl.c | 2 +- library/math/s_sinf.c | 2 +- library/math/s_sinl.c | 2 +- library/math/s_tan.c | 2 +- library/math/s_tanf.c | 2 +- library/math/s_tanh.c | 2 +- library/math/s_tanhf.c | 2 +- library/math/s_tanhl.c | 2 +- library/math/s_tanl.c | 2 +- library/math/s_tgammaf.c | 2 +- library/math/s_tgammal.c | 2 +- library/math/s_trunc.c | 2 +- library/math/s_truncf.c | 2 +- library/math/s_truncl.c | 2 +- library/misc/map.c | 2 +- library/misc/uuid.c | 2 +- library/mount/convertinfo.c | 2 +- library/mount/fstatfs.c | 14 +- library/mount/mount_headers.h | 2 +- library/mount/statfs.c | 6 +- library/ndbm/db.c | 2 +- library/ndbm/dbm_clearerr.c | 2 +- library/ndbm/dbm_close.c | 2 +- library/ndbm/dbm_delete.c | 2 +- library/ndbm/dbm_dirfno.c | 2 +- library/ndbm/dbm_error.c | 2 +- library/ndbm/dbm_fetch.c | 2 +- library/ndbm/dbm_firstkey.c | 2 +- library/ndbm/dbm_nextkey.c | 2 +- library/ndbm/dbm_open.c | 2 +- library/ndbm/dbm_store.c | 2 +- library/ndbm/hash.c | 2 +- library/ndbm/hash_bigkey.c | 2 +- library/ndbm/hash_buf.c | 2 +- library/ndbm/hash_func.c | 2 +- library/ndbm/hash_log2.c | 2 +- library/ndbm/hash_page.c | 2 +- library/nltypes/catclose.c | 2 +- library/nltypes/catgets.c | 2 +- library/nltypes/catopen.c | 2 +- library/posix/basename.c | 2 +- library/posix/checkabort.c | 6 +- library/posix/dirname.c | 2 +- library/posix/fnmatch.c | 2 +- library/posix/fstatvfs.c | 2 +- library/posix/getrlimit.c | 2 +- library/posix/getrusage.c | 16 +- library/posix/glob.c | 2 +- library/posix/globfree.c | 2 +- library/posix/ipc_headers.h | 4 +- library/posix/kill.c | 2 +- library/posix/memalign.c | 12 +- library/posix/mmap.c | 2 +- library/posix/msync.c | 2 +- library/posix/munmap.c | 2 +- library/posix/poll.c | 2 +- library/posix/posix_headers.h | 2 +- library/posix/raise.c | 24 +- library/posix/readv.c | 10 +- library/posix/setrlimit.c | 2 +- library/posix/shm_headers.h | 2 +- library/posix/sigaction.c | 2 +- library/posix/sigaddset.c | 2 +- library/posix/sigblock.c | 8 +- library/posix/sigdelset.c | 2 +- library/posix/sigemptyset.c | 2 +- library/posix/sigfillset.c | 2 +- library/posix/sigismember.c | 2 +- library/posix/sigmask.c | 2 +- library/posix/signal.c | 8 +- library/posix/signal_headers.h | 2 +- library/posix/sigprocmask.c | 12 +- library/posix/sigsetmask.c | 8 +- library/posix/statvfs.c | 6 +- library/posix/sysinfo.c | 2 +- library/posix/sysv_ftok.c | 6 +- library/posix/sysv_idkey.c | 16 +- library/posix/sysv_msgctl.c | 4 +- library/posix/sysv_msgget.c | 4 +- library/posix/sysv_msgids.c | 4 +- library/posix/sysv_msgrcv.c | 4 +- library/posix/sysv_msgsnap.c | 4 +- library/posix/sysv_msgsnd.c | 4 +- library/posix/sysv_semctl.c | 4 +- library/posix/sysv_semget.c | 4 +- library/posix/sysv_semids.c | 4 +- library/posix/sysv_semop.c | 4 +- library/posix/sysv_semtimedop.c | 4 +- library/posix/sysv_shmat.c | 4 +- library/posix/sysv_shmctl.c | 4 +- library/posix/sysv_shmdt.c | 4 +- library/posix/sysv_shmget.c | 4 +- library/posix/sysv_shmids.c | 4 +- library/posix/uio_headers.h | 2 +- library/posix/ulimit.c | 2 +- library/posix/uname.c | 2 +- library/posix/writev.c | 12 +- library/prng/__rand48_step.c | 2 +- library/prng/__seed48.c | 2 +- library/prng/drand48.c | 2 +- library/prng/erand48.c | 2 +- library/prng/getrandom.c | 8 +- library/prng/inistate.c | 20 +- library/prng/jrand48.c | 2 +- library/prng/lcong48.c | 2 +- library/prng/lrand48.c | 2 +- library/prng/mrand48.c | 2 +- library/prng/nrand48.c | 2 +- library/prng/rand.c | 8 +- library/prng/rand_r.c | 2 +- library/prng/random.c | 40 +- library/prng/seed48.c | 2 +- library/prng/setstate.c | 8 +- library/prng/srand.c | 6 +- library/prng/srand48.c | 2 +- library/prng/srandom.c | 24 +- library/profile/_mcount.c | 2 +- library/profile/gmon.c | 2 +- library/profile/mcount.S | 2 +- library/profile/profil.c | 2 +- library/profile/profile.lib_rev.c | 2 +- library/profile/profile_gmon.h | 2 +- library/pthread/README.md | 2 +- library/pthread/common.c | 2 +- library/pthread/pthread.c | 2 +- library/pthread/pthread.lib_rev.c | 2 +- library/pthread/pthread_attr_destroy.c | 2 +- library/pthread/pthread_attr_getdetachstate.c | 2 +- library/pthread/pthread_attr_getguardsize.c | 2 +- .../pthread/pthread_attr_getinheritsched.c | 2 +- library/pthread/pthread_attr_getschedparam.c | 2 +- library/pthread/pthread_attr_getschedpolicy.c | 2 +- library/pthread/pthread_attr_getscope.c | 2 +- library/pthread/pthread_attr_getstack.c | 2 +- library/pthread/pthread_attr_getstacksize.c | 2 +- library/pthread/pthread_attr_init.c | 2 +- library/pthread/pthread_attr_setdetachstate.c | 2 +- library/pthread/pthread_attr_setguardsize.c | 2 +- .../pthread/pthread_attr_setinheritsched.c | 2 +- library/pthread/pthread_attr_setschedparam.c | 2 +- library/pthread/pthread_attr_setschedpolicy.c | 2 +- library/pthread/pthread_attr_setscope.c | 2 +- library/pthread/pthread_attr_setstack.c | 2 +- library/pthread/pthread_attr_setstacksize.c | 2 +- library/pthread/pthread_barrier_destroy.c | 2 +- library/pthread/pthread_barrier_init.c | 2 +- library/pthread/pthread_barrier_wait.c | 2 +- library/pthread/pthread_barrierattr_destroy.c | 2 +- .../pthread/pthread_barrierattr_getpshared.c | 2 +- library/pthread/pthread_barrierattr_init.c | 2 +- .../pthread/pthread_barrierattr_setpshared.c | 2 +- library/pthread/pthread_cancel.c | 2 +- library/pthread/pthread_cleanup_pop.c | 2 +- library/pthread/pthread_cleanup_push.c | 2 +- library/pthread/pthread_cond_broadcast.c | 2 +- library/pthread/pthread_cond_destroy.c | 2 +- library/pthread/pthread_cond_init.c | 2 +- library/pthread/pthread_cond_signal.c | 2 +- library/pthread/pthread_cond_timedwait.c | 2 +- .../pthread_cond_timedwait_relative_np.c | 2 +- library/pthread/pthread_cond_wait.c | 2 +- library/pthread/pthread_condattr_destroy.c | 2 +- library/pthread/pthread_condattr_getpshared.c | 2 +- library/pthread/pthread_condattr_init.c | 2 +- library/pthread/pthread_condattr_setpshared.c | 2 +- library/pthread/pthread_create.c | 4 +- library/pthread/pthread_detach.c | 2 +- library/pthread/pthread_equal.c | 2 +- library/pthread/pthread_exit.c | 2 +- library/pthread/pthread_getattr_np.c | 2 +- library/pthread/pthread_getconcurrency.c | 2 +- library/pthread/pthread_getname_np.c | 2 +- library/pthread/pthread_getschedparam.c | 2 +- library/pthread/pthread_getspecific.c | 2 +- library/pthread/pthread_join.c | 2 +- library/pthread/pthread_key_create.c | 2 +- library/pthread/pthread_key_delete.c | 2 +- library/pthread/pthread_kill.c | 2 +- library/pthread/pthread_mutex_destroy.c | 2 +- library/pthread/pthread_mutex_init.c | 2 +- library/pthread/pthread_mutex_lock.c | 2 +- library/pthread/pthread_mutex_timedlock.c | 2 +- library/pthread/pthread_mutex_trylock.c | 2 +- library/pthread/pthread_mutex_unlock.c | 2 +- library/pthread/pthread_mutexattr_destroy.c | 2 +- .../pthread/pthread_mutexattr_getpshared.c | 2 +- library/pthread/pthread_mutexattr_gettype.c | 2 +- library/pthread/pthread_mutexattr_init.c | 2 +- .../pthread/pthread_mutexattr_setpshared.c | 2 +- library/pthread/pthread_mutexattr_settype.c | 2 +- library/pthread/pthread_num_processors_np.c | 2 +- library/pthread/pthread_once.c | 2 +- library/pthread/pthread_rwlock_destroy.c | 2 +- library/pthread/pthread_rwlock_init.c | 2 +- library/pthread/pthread_rwlock_rdlock.c | 2 +- library/pthread/pthread_rwlock_timedrdlock.c | 2 +- library/pthread/pthread_rwlock_timedwrlock.c | 2 +- library/pthread/pthread_rwlock_tryrdlock.c | 2 +- library/pthread/pthread_rwlock_trywrlock.c | 2 +- library/pthread/pthread_rwlock_unlock.c | 2 +- library/pthread/pthread_rwlock_wrlock.c | 2 +- library/pthread/pthread_rwlockattr_destroy.c | 2 +- .../pthread/pthread_rwlockattr_getpshared.c | 2 +- library/pthread/pthread_rwlockattr_init.c | 2 +- .../pthread/pthread_rwlockattr_setpshared.c | 2 +- library/pthread/pthread_self.c | 2 +- library/pthread/pthread_setcancelstate.c | 2 +- library/pthread/pthread_setcanceltype.c | 2 +- library/pthread/pthread_setconcurrency.c | 2 +- library/pthread/pthread_setname_np.c | 2 +- library/pthread/pthread_setschedparam.c | 2 +- library/pthread/pthread_setschedprio.c | 2 +- library/pthread/pthread_setspecific.c | 2 +- library/pthread/pthread_spin_destroy.c | 2 +- library/pthread/pthread_spin_init.c | 2 +- library/pthread/pthread_spin_lock.c | 2 +- library/pthread/pthread_spin_trylock.c | 2 +- library/pthread/pthread_spin_unlock.c | 2 +- library/pthread/pthread_testcancel.c | 2 +- library/pthread/sched_get_priority_max.c | 2 +- library/pthread/sched_get_priority_min.c | 2 +- library/pthread/sched_yield.c | 2 +- library/regex/regcomp.c | 2 +- library/regex/regerror.c | 2 +- library/regex/regexec.c | 2 +- library/regex/regfree.c | 2 +- library/regex/regmem.c | 2 +- library/regex/tre.h | 2 +- library/resolv/dns_parse.c | 2 +- library/resolv/lookup_name.c | 2 +- library/resolv/lookup_serv.c | 2 +- library/resolv/res_init.c | 2 +- library/resolv/res_mkquery.c | 2 +- library/resolv/res_msend_rc.c | 2 +- library/resolv/res_query.c | 2 +- library/resolv/res_querydomain.c | 2 +- library/resolv/res_search.c | 2 +- library/resolv/res_send.c | 2 +- library/resolv/res_state.c | 2 +- library/resolv/resolvconf.c | 2 +- library/rt/aio_cancel.c | 2 +- library/rt/aio_error.c | 2 +- library/rt/aio_fsync.c | 2 +- library/rt/aio_init.c | 2 +- library/rt/aio_misc.c | 2 +- library/rt/aio_notify.c | 2 +- library/rt/aio_read.c | 2 +- library/rt/aio_read64.c | 2 +- library/rt/aio_return.c | 2 +- library/rt/aio_sigqueue.c | 2 +- library/rt/aio_suspend.c | 2 +- library/rt/aio_write.c | 2 +- library/rt/aio_write64.c | 2 +- library/rt/clist.c | 2 +- library/rt/clist.h | 2 +- library/rt/lio_listio.c | 2 +- library/rt/rt.lib_rev.c | 2 +- library/search/ftw.c | 2 +- library/search/ftw_headers.h | 2 +- library/search/hash_func.c | 2 +- library/search/hcreate.c | 2 +- library/search/lfind.c | 2 +- library/search/lsearch.c | 2 +- library/search/nftw.c | 2 +- library/search/tdelete.c | 2 +- library/search/tdestroy.c | 2 +- library/search/tfind.c | 2 +- library/search/tsearch.c | 2 +- library/search/twalk.c | 2 +- library/setjmp/_longjmp.S | 4 +- library/setjmp/longjmp.S | 2 +- library/setjmp/setjmp.S | 2 +- library/setjmp/siglongjmp.c | 2 +- library/shared_library/{clib2.c => clib4.c} | 84 +- library/shared_library/{clib2.h => clib4.h} | 18 +- .../{clib2_vectors.h => clib4_vectors.h} | 11 +- library/shared_library/interface.h | 22 +- library/shared_library/stubs.c | 2130 ++++++++--------- library/shcrtbegin.c | 2 +- library/shcrtend.c | 2 +- library/socket/accept.c | 28 +- library/socket/bind.c | 14 +- library/socket/bindresvport.c | 2 +- library/socket/bindresvport6.c | 2 +- library/socket/closelog.c | 10 +- library/socket/connect.c | 14 +- library/socket/dn_comp.c | 2 +- library/socket/dn_expand.c | 2 +- library/socket/dn_skipname.c | 2 +- library/socket/ether_aton.c | 2 +- library/socket/ether_aton_r.c | 2 +- library/socket/ether_hostton.c | 2 +- library/socket/ether_line.c | 2 +- library/socket/ether_ntoa.c | 2 +- library/socket/ether_ntoa_r.c | 2 +- library/socket/ether_ntohost.c | 2 +- library/socket/freeaddrinfo.c | 2 +- library/socket/freeifaddrs.c | 2 +- library/socket/gai_strerror.c | 2 +- library/socket/get_descriptor.c | 2 +- library/socket/getaddrinfo.c | 2 +- library/socket/gethostbyaddr.c | 2 +- library/socket/gethostbyaddr_r.c | 2 +- library/socket/gethostbyname.c | 2 +- library/socket/gethostbyname2.c | 2 +- library/socket/gethostbyname2_r.c | 2 +- library/socket/gethostbyname_r.c | 2 +- library/socket/gethostid.c | 2 +- library/socket/gethostname.c | 2 +- library/socket/getifaddrs.c | 2 +- library/socket/getnameinfo.c | 2 +- library/socket/getnetbyaddr.c | 2 +- library/socket/getnetbyname.c | 2 +- library/socket/getpeername.c | 12 +- library/socket/getprotobyname.c | 2 +- library/socket/getprotobynumber.c | 2 +- library/socket/getservbyname.c | 2 +- library/socket/getservbyname_r.c | 2 +- library/socket/getservbyport.c | 2 +- library/socket/getservbyport_r.c | 2 +- library/socket/getsockname.c | 12 +- library/socket/getsockopt.c | 12 +- library/socket/herror.c | 2 +- library/socket/hook_entry.c | 12 +- library/socket/hstrerror.c | 2 +- library/socket/if_indextoname.c | 2 +- library/socket/if_nametoindex.c | 2 +- library/socket/in6addr_any.c | 2 +- library/socket/inet_addr.c | 2 +- library/socket/inet_aton.c | 2 +- library/socket/inet_lnaof.c | 2 +- library/socket/inet_makeaddr.c | 2 +- library/socket/inet_netof.c | 2 +- library/socket/inet_network.c | 2 +- library/socket/inet_ntoa.c | 2 +- library/socket/inet_ntop.c | 2 +- library/socket/inet_pton.c | 2 +- library/socket/init_exit.c | 48 +- library/socket/ioctl.c | 12 +- library/socket/listen.c | 12 +- library/socket/ns_parse.c | 2 +- library/socket/openlog.c | 20 +- library/socket/recv.c | 2 +- library/socket/recvfrom.c | 12 +- library/socket/recvmsg.c | 12 +- library/socket/select.c | 2 +- library/socket/select_signal.c | 50 +- library/socket/send.c | 12 +- library/socket/sendmsg.c | 12 +- library/socket/sendto.c | 12 +- library/socket/set_h_errno.c | 2 +- library/socket/setlogmask.c | 8 +- library/socket/setsockopt.c | 12 +- library/socket/shutdown.c | 12 +- library/socket/socket.c | 16 +- library/socket/socket_headers.h | 114 +- library/socket/socketpair.c | 2 +- library/socket/syslog.c | 2 +- library/socket/vsyslog.c | 16 +- library/socket/wait_select.c | 2 +- library/stat/chmod.c | 6 +- library/stat/convertfileinfo.c | 2 +- library/stat/fchmod.c | 14 +- library/stat/fstat.c | 16 +- library/stat/futimens.c | 2 +- library/stat/lock.c | 2 +- library/stat/lstat.c | 6 +- library/stat/mkdir.c | 6 +- library/stat/rmdir.c | 6 +- library/stat/stat.c | 6 +- library/stat/stat_headers.h | 2 +- library/stat/umask.c | 2 +- library/stat/utimensat.c | 6 +- library/stdio/asprintf.c | 2 +- library/stdio/change_fd_action.c | 8 +- library/stdio/change_fd_user_data.c | 8 +- library/stdio/clearerr.c | 6 +- library/stdio/ctermid.c | 2 +- library/stdio/dprintf.c | 2 +- library/stdio/dropiobreadbuffer.c | 6 +- library/stdio/duplicate_fd.c | 2 +- library/stdio/err.c | 6 +- library/stdio/fclose.c | 10 +- library/stdio/fdhookentry.c | 18 +- library/stdio/feof.c | 6 +- library/stdio/ferror.c | 6 +- library/stdio/fflush.c | 26 +- library/stdio/fgetc.c | 12 +- library/stdio/fgetpos.c | 2 +- library/stdio/fgetpos64.c | 2 +- library/stdio/fgets.c | 2 +- library/stdio/file_init.c | 120 +- library/stdio/filliobreadbuffer.c | 6 +- library/stdio/findvacantfdentry.c | 22 +- library/stdio/findvacantiobentry.c | 20 +- library/stdio/flockfile.c | 6 +- library/stdio/flush.c | 8 +- library/stdio/flush_all_files.c | 22 +- library/stdio/flushiobwritebuffer.c | 6 +- library/stdio/fopen.c | 18 +- library/stdio/fopen64.c | 2 +- library/stdio/fprintf.c | 2 +- library/stdio/fputc.c | 14 +- library/stdio/fputs.c | 14 +- library/stdio/fread.c | 6 +- library/stdio/freopen.c | 8 +- library/stdio/freopen64.c | 2 +- library/stdio/fscanf.c | 2 +- library/stdio/fseek.c | 12 +- library/stdio/fseeko.c | 2 +- library/stdio/fseeko64.c | 12 +- library/stdio/fsetpos.c | 2 +- library/stdio/fsetpos64.c | 2 +- library/stdio/ftell.c | 8 +- library/stdio/ftello.c | 2 +- library/stdio/ftello64.c | 8 +- library/stdio/ftrylockfile.c | 6 +- library/stdio/funlockfile.c | 6 +- library/stdio/fwrite.c | 12 +- library/stdio/get_fd.c | 2 +- library/stdio/get_file_descriptor.c | 12 +- library/stdio/getc.c | 2 +- library/stdio/getc_unlocked.c | 2 +- library/stdio/getchar.c | 2 +- library/stdio/getchar_unlocked.c | 2 +- library/stdio/getdelim.c | 2 +- library/stdio/getline.c | 2 +- library/stdio/gets.c | 2 +- library/stdio/grow_file.c | 8 +- library/stdio/growfdtable.c | 24 +- library/stdio/growiobtable.c | 24 +- library/stdio/init_exit.c | 42 +- library/stdio/initializefd.c | 2 +- library/stdio/initializeiob.c | 2 +- library/stdio/iobhookentry.c | 14 +- library/stdio/lock.c | 30 +- library/stdio/openiob.c | 22 +- library/stdio/parent_of_fh.c | 2 +- library/stdio/perror.c | 2 +- library/stdio/popen.c | 6 +- library/stdio/printf.c | 8 +- library/stdio/putc.c | 2 +- library/stdio/putc_unlocked.c | 2 +- library/stdio/putchar.c | 2 +- library/stdio/putchar_unlocked.c | 2 +- library/stdio/puts.c | 10 +- library/stdio/record_locking.c | 16 +- library/stdio/remove.c | 6 +- library/stdio/remove_fd_alias.c | 8 +- library/stdio/rename.c | 8 +- library/stdio/resolve_fd_file.c | 2 +- library/stdio/rewind.c | 2 +- library/stdio/scanf.c | 2 +- library/stdio/setbuf.c | 2 +- library/stdio/setvbuf.c | 14 +- library/stdio/snprintf.c | 2 +- library/stdio/sprintf.c | 2 +- library/stdio/sscanf.c | 2 +- library/stdio/sscanf_hook_entry.c | 4 +- library/stdio/stdio_ext.c | 2 +- library/stdio/stdio_headers.h | 20 +- library/stdio/stdio_protos.h | 36 +- library/stdio/tempnam.c | 10 +- library/stdio/tmpfile.c | 2 +- library/stdio/tmpfile64.c | 2 +- library/stdio/tmpnam.c | 2 +- library/stdio/translateioerror.c | 2 +- library/stdio/ungetc.c | 8 +- library/stdio/unlockfile.c | 2 +- library/stdio/vasprintf.c | 2 +- library/stdio/vasprintf_hook_entry.c | 4 +- library/stdio/vdprintf.c | 2 +- library/stdio/vfprintf.c | 2 +- library/stdio/vfscanf.c | 12 +- library/stdio/vprintf.c | 2 +- library/stdio/vscanf.c | 2 +- library/stdio/vsnprintf.c | 2 +- library/stdio/vsnprintf_hook_entry.c | 4 +- library/stdio/vsprintf.c | 2 +- library/stdio/vsprintf_hook_entry.c | 4 +- library/stdio/vsscanf.c | 2 +- library/stdlib/a64l.c | 2 +- library/stdlib/abort.c | 6 +- library/stdlib/abs.c | 2 +- library/stdlib/aligned_alloc.c | 2 +- library/stdlib/arc4random.c | 128 +- library/stdlib/arg.c | 52 +- library/stdlib/assertion_failure.c | 18 +- library/stdlib/atexit.c | 24 +- library/stdlib/atof.c | 2 +- library/stdlib/atoff.c | 2 +- library/stdlib/atoi.c | 2 +- library/stdlib/atol.c | 2 +- library/stdlib/atoll.c | 2 +- library/stdlib/bsearch.c | 2 +- library/stdlib/calloc.c | 2 +- library/stdlib/div.c | 2 +- library/stdlib/divsi3.c | 2 +- library/stdlib/divsi4.c | 2 +- library/stdlib/dlclose.c | 12 +- library/stdlib/dlerror.c | 10 +- library/stdlib/dlopen.c | 14 +- library/stdlib/dlsym.c | 12 +- library/stdlib/ecvt.c | 2 +- library/stdlib/exit.c | 22 +- library/stdlib/fcvt.c | 2 +- library/stdlib/free.c | 18 +- library/stdlib/gcvt.c | 2 +- library/stdlib/gdtoa-gethex.c | 6 +- library/stdlib/gdtoa-hexnan.c | 2 +- library/stdlib/get_errno.c | 2 +- library/stdlib/getenv.c | 2 +- library/stdlib/getexecname.c | 2 +- library/stdlib/getsp.c | 2 +- library/stdlib/itoa.c | 2 +- library/stdlib/l64a.c | 2 +- library/stdlib/labs.c | 2 +- library/stdlib/ldiv.c | 2 +- library/stdlib/llabs.c | 2 +- library/stdlib/lldiv.c | 2 +- library/stdlib/lltoa.c | 2 +- library/stdlib/main.c | 110 +- library/stdlib/malloc.c | 60 +- library/stdlib/mblen.c | 2 +- library/stdlib/mbstowcs.c | 2 +- library/stdlib/mbtowc.c | 6 +- library/stdlib/mkdtemp.c | 2 +- library/stdlib/mkostemp.c | 2 +- library/stdlib/mkostemps.c | 6 +- library/stdlib/mkstemp.c | 2 +- library/stdlib/mktemp.c | 6 +- library/stdlib/modsi3.c | 2 +- library/stdlib/mprec.c | 2 +- library/stdlib/mulsi3.c | 2 +- library/stdlib/posix_memalign.c | 2 +- library/stdlib/program_name.c | 26 +- library/stdlib/putenv.c | 2 +- library/stdlib/qsort.c | 2 +- library/stdlib/qsort_r.c | 2 +- library/stdlib/randname.c | 6 +- library/stdlib/realloc.c | 10 +- library/stdlib/secure_getenv.c | 2 +- library/stdlib/semaphore.c | 2 +- library/stdlib/set_errno.c | 2 +- library/stdlib/set_process_window.c | 2 +- library/stdlib/setenv.c | 20 +- library/stdlib/shared_objs.c | 2 +- library/stdlib/showerror.c | 10 +- library/stdlib/stdlib_constructor.h | 2 +- library/stdlib/stdlib_headers.h | 2 +- library/stdlib/stdlib_localebase.h | 10 +- library/stdlib/stdlib_memory.h | 6 +- library/stdlib/stdlib_protos.h | 6 +- library/stdlib/stdlib_sysvbase.h | 4 +- library/stdlib/stdlib_timerbase.h | 6 +- library/stdlib/stdlib_timezonebase.h | 6 +- library/stdlib/stdlib_utilitybase.h | 2 +- library/stdlib/strtod.c | 16 +- library/stdlib/strtol.c | 2 +- library/stdlib/strtold.c | 2 +- library/stdlib/strtoll.c | 2 +- library/stdlib/strtoq.c | 2 +- library/stdlib/strtoul.c | 2 +- library/stdlib/strtoull.c | 2 +- library/stdlib/strtouq.c | 2 +- library/stdlib/system.c | 6 +- library/stdlib/termination_message.c | 6 +- library/stdlib/udivsi3.c | 2 +- library/stdlib/udivsi4.c | 2 +- library/stdlib/umodsi3.c | 2 +- library/stdlib/unsetenv.c | 2 +- library/stdlib/valloc.c | 2 +- library/stdlib/wof_allocator.c | 8 +- library/string/bcmp.c | 2 +- library/string/bcopy.c | 10 +- library/string/bzero.c | 8 +- library/string/index.c | 2 +- library/string/memccpy.c | 2 +- library/string/memchr.c | 8 +- library/string/memcmp.c | 10 +- library/string/memcpy.c | 2 +- library/string/memmem.c | 2 +- library/string/memmove.c | 2 +- library/string/mempcpy.c | 2 +- library/string/memrchr.c | 2 +- library/string/memset.c | 2 +- library/string/rindex.c | 2 +- library/string/stccpy.c | 2 +- library/string/stpcpy.c | 2 +- library/string/stpncpy.c | 2 +- library/string/strcasestr.c | 2 +- library/string/strcat.c | 2 +- library/string/strchr.c | 8 +- library/string/strchrnul.c | 2 +- library/string/strcmp.c | 8 +- library/string/strcoll.c | 12 +- library/string/strcpy.c | 10 +- library/string/strcspn.c | 2 +- library/string/strdup.c | 2 +- library/string/strerror.c | 2 +- library/string/strerror_r.c | 2 +- library/string/string_headers.h | 2 +- library/string/strings_ffs.c | 2 +- library/string/strings_ffsl.c | 2 +- library/string/strings_ffsll.c | 2 +- library/string/strings_headers.h | 2 +- library/string/strings_strcasecmp.c | 2 +- library/string/strings_strncasecmp.c | 2 +- library/string/strlcat.c | 2 +- library/string/strlcpy.c | 2 +- library/string/strlen.c | 8 +- library/string/strncat.c | 2 +- library/string/strncmp.c | 8 +- library/string/strncpy.c | 2 +- library/string/strndup.c | 2 +- library/string/strnlen.c | 2 +- library/string/strnstr.c | 2 +- library/string/strpbrk.c | 2 +- library/string/strrchr.c | 8 +- library/string/strsep.c | 2 +- library/string/strsignal.c | 2 +- library/string/strspn.c | 2 +- library/string/strstr.c | 2 +- library/string/strtok.c | 2 +- library/string/strtok_r.c | 2 +- library/string/strverscmp.c | 2 +- library/string/strxfrm.c | 12 +- library/termcap/termcap.c | 12 +- library/termcap/tparam.c | 4 +- library/termios/cfgetispeed.c | 2 +- library/termios/cfgetospeed.c | 2 +- library/termios/cfmakeraw.c | 2 +- library/termios/cfsetispeed.c | 2 +- library/termios/cfsetospeed.c | 2 +- library/termios/console_fdhookentry.c | 10 +- library/termios/openserial.c | 4 +- library/termios/tcdrain.c | 8 +- library/termios/tcflow.c | 8 +- library/termios/tcflush.c | 10 +- library/termios/tcgetattr.c | 8 +- library/termios/tcsendbreak.c | 8 +- library/termios/tcsetattr.c | 8 +- library/termios/termios_headers.h | 6 +- library/time/asctime.c | 2 +- library/time/asctime_r.c | 2 +- library/time/clock.c | 12 +- library/time/clock_getres.c | 2 +- library/time/clock_gettime.c | 14 +- library/time/clock_gettime64.c | 14 +- library/time/clock_nanosleep.c | 2 +- library/time/clock_settime.c | 26 +- library/time/convert_datestamp.c | 12 +- library/time/convert_time.c | 12 +- library/time/converttime.c | 10 +- library/time/ctime.c | 2 +- library/time/ctime_r.c | 2 +- library/time/data.c | 2 +- library/time/days_per_date.c | 2 +- library/time/difftime.c | 2 +- library/time/ftime.c | 2 +- library/time/getitimer.c | 10 +- library/time/gettimeofday.c | 10 +- library/time/gmtime.c | 2 +- library/time/gmtime_r.c | 2 +- library/time/itimer_tasks.c | 24 +- library/time/localtime.c | 2 +- library/time/localtime_r.c | 12 +- library/time/mktime.c | 12 +- library/time/nanosleep.c | 2 +- library/time/numbertostring.c | 2 +- library/time/rdtsc.c | 2 +- library/time/setitimer.c | 40 +- library/time/settimeofday.c | 22 +- library/time/strftime.c | 30 +- library/time/strptime.c | 2 +- library/time/time.c | 2 +- library/time/time_headers.h | 4 +- library/time/timegm.c | 2 +- library/time/times.c | 2 +- library/time/timezone_headers.h | 2 +- library/time/timezone_init_exit.c | 92 +- library/time/utime.c | 6 +- library/time/utime_headers.h | 2 +- library/time/utimes.c | 6 +- library/time/weekday.c | 2 +- library/unistd/access.c | 8 +- library/unistd/alarm.c | 2 +- library/unistd/chdir.c | 18 +- library/unistd/chdir_exit.c | 16 +- library/unistd/chown.c | 6 +- library/unistd/common_pathconf.c | 2 +- library/unistd/dup.c | 24 +- library/unistd/dup2.c | 24 +- library/unistd/environ.c | 6 +- library/unistd/execl.c | 6 +- library/unistd/execle.c | 2 +- library/unistd/execlp.c | 2 +- library/unistd/execv.c | 6 +- library/unistd/execve.c | 10 +- library/unistd/execve_env_exit.c | 2 +- library/unistd/execve_env_init.c | 2 +- library/unistd/execve_exit.c | 2 +- library/unistd/execvp.c | 12 +- library/unistd/fchdir.c | 2 +- library/unistd/fchown.c | 14 +- library/unistd/fdatasync.c | 14 +- library/unistd/fdopen.c | 24 +- library/unistd/fdopen64.c | 2 +- library/unistd/fileno.c | 12 +- library/unistd/fpathconf.c | 2 +- library/unistd/fsync.c | 14 +- library/unistd/ftruncate.c | 14 +- library/unistd/ftruncate64.c | 14 +- library/unistd/get_current_dir_name.c | 2 +- library/unistd/get_default_file.c | 10 +- library/unistd/getcwd.c | 14 +- library/unistd/getdomainname.c | 2 +- library/unistd/getentropy.c | 2 +- library/unistd/getlogin.c | 2 +- library/unistd/getlogin_r.c | 2 +- library/unistd/getopt.c | 2 +- library/unistd/getopt_long.c | 2 +- library/unistd/getpagesize.c | 2 +- library/unistd/getpid.c | 2 +- library/unistd/getppid.c | 2 +- library/unistd/getwd.c | 2 +- library/unistd/init_exit.c | 16 +- library/unistd/isatty.c | 14 +- library/unistd/lchown.c | 2 +- library/unistd/link.c | 6 +- library/unistd/lock.c | 2 +- library/unistd/lockf.c | 2 +- library/unistd/lseek.c | 16 +- library/unistd/lseek64.c | 2 +- library/unistd/pathconf.c | 6 +- library/unistd/pause.c | 2 +- library/unistd/pipe.c | 8 +- library/unistd/pipe2.c | 2 +- library/unistd/pread.c | 2 +- library/unistd/pread64.c | 2 +- library/unistd/pwrite.c | 2 +- library/unistd/pwrite64.c | 2 +- library/unistd/readlink.c | 8 +- library/unistd/reallocarray.c | 2 +- library/unistd/realpath.c | 8 +- library/unistd/restorepathname.c | 2 +- library/unistd/setcurrentpath.c | 16 +- library/unistd/setdomainname.c | 2 +- library/unistd/setlogin.c | 2 +- library/unistd/sleep.c | 8 +- library/unistd/spawnv.c | 6 +- library/unistd/spawnvp.c | 2 +- library/unistd/strip_double_slash.c | 2 +- library/unistd/symlink.c | 6 +- library/unistd/sync_fd.c | 2 +- library/unistd/sysconf.c | 2 +- library/unistd/time_delay.c | 2 +- library/unistd/timer.c | 64 +- library/unistd/translatea2u.c | 2 +- library/unistd/translaterel.c | 14 +- library/unistd/translateu2a.c | 2 +- library/unistd/truncate.c | 2 +- library/unistd/truncate64.c | 2 +- library/unistd/ttyname.c | 2 +- library/unistd/ttyname_r.c | 10 +- library/unistd/ualarm.c | 2 +- library/unistd/unistd_headers.h | 2 +- library/unistd/unlink.c | 20 +- library/unistd/usleep.c | 2 +- library/unistd/wildcard_expand.c | 36 +- library/usergroup/endgrent.c | 2 +- library/usergroup/endpwent.c | 2 +- library/usergroup/getegid.c | 8 +- library/usergroup/geteuid.c | 8 +- library/usergroup/getgid.c | 8 +- library/usergroup/getgrent.c | 2 +- library/usergroup/getgrgid.c | 2 +- library/usergroup/getgrnam.c | 2 +- library/usergroup/getgroups.c | 2 +- library/usergroup/getpass.c | 2 +- library/usergroup/getpgrp.c | 2 +- library/usergroup/getpwent.c | 2 +- library/usergroup/getpwnam.c | 2 +- library/usergroup/getpwnam_r.c | 2 +- library/usergroup/getpwuid.c | 2 +- library/usergroup/getpwuid_r.c | 2 +- library/usergroup/getuid.c | 8 +- library/usergroup/init_exit.c | 34 +- library/usergroup/initgroups.c | 2 +- library/usergroup/setegid.c | 2 +- library/usergroup/seteuid.c | 2 +- library/usergroup/setgid.c | 8 +- library/usergroup/setgrent.c | 2 +- library/usergroup/setgroups.c | 2 +- library/usergroup/setpwent.c | 2 +- library/usergroup/setregid.c | 10 +- library/usergroup/setreuid.c | 10 +- library/usergroup/setsid.c | 2 +- library/usergroup/setuid.c | 8 +- library/usergroup/tcgetpgrp.c | 2 +- library/usergroup/tcsetpgrp.c | 2 +- library/usergroup/usergroup_headers.h | 84 +- library/wait/wait.c | 2 +- library/wchar/_mbstowcs_r.c | 2 +- library/wchar/_mbtowc_r.c | 14 +- library/wchar/_wcstombs_r.c | 2 +- library/wchar/bittab.c | 2 +- library/wchar/btowc.c | 6 +- library/wchar/c16rtomb.c | 2 +- library/wchar/c32rtomb.c | 2 +- library/wchar/fgetwc.c | 2 +- library/wchar/fgetws.c | 2 +- library/wchar/fputwc.c | 2 +- library/wchar/fputws.c | 2 +- library/wchar/fwide.c | 2 +- library/wchar/fwprintf.c | 2 +- library/wchar/fwscanf.c | 2 +- library/wchar/getwc.c | 2 +- library/wchar/getwchar.c | 2 +- library/wchar/iswalnum.c | 2 +- library/wchar/iswalpha.c | 14 +- library/wchar/iswblank.c | 14 +- library/wchar/iswcntrl.c | 14 +- library/wchar/iswctype.c | 2 +- library/wchar/iswdigit.c | 2 +- library/wchar/iswgraph.c | 2 +- library/wchar/iswlower.c | 2 +- library/wchar/iswprint.c | 14 +- library/wchar/iswpunc.c | 14 +- library/wchar/iswspace.c | 14 +- library/wchar/iswupper.c | 2 +- library/wchar/iswxdigit.c | 2 +- library/wchar/jp2uc.c | 2 +- library/wchar/mbrlen.c | 6 +- library/wchar/mbrtoc16.c | 2 +- library/wchar/mbrtoc32.c | 2 +- library/wchar/mbrtowc.c | 6 +- library/wchar/mbsinit.c | 2 +- library/wchar/mbsnrtowcs.c | 2 +- library/wchar/mbsrtowcs.c | 2 +- library/wchar/putwc.c | 2 +- library/wchar/putwchar.c | 2 +- library/wchar/swprintf.c | 2 +- library/wchar/swscanf.c | 2 +- library/wchar/towctrans.c | 2 +- library/wchar/towlower.c | 14 +- library/wchar/towupper.c | 14 +- library/wchar/ungetwc.c | 2 +- library/wchar/utf8alpha.h | 2 +- library/wchar/utf8print.h | 2 +- library/wchar/utf8punct.h | 2 +- library/wchar/vfwprintf.c | 2 +- library/wchar/vfwscanf.c | 2 +- library/wchar/vswprintf.c | 2 +- library/wchar/vswscanf.c | 2 +- library/wchar/vwprintf.c | 2 +- library/wchar/vwscanf.c | 2 +- library/wchar/wchar_headers.h | 2 +- library/wchar/wcpcpy.c | 2 +- library/wchar/wcpncpy.c | 2 +- library/wchar/wcrtomb.c | 14 +- library/wchar/wcscasecmp.c | 2 +- library/wchar/wcscasecmp_l.c | 2 +- library/wchar/wcscat.c | 2 +- library/wchar/wcschr.c | 2 +- library/wchar/wcscmp.c | 2 +- library/wchar/wcscoll.c | 2 +- library/wchar/wcscoll_l.c | 2 +- library/wchar/wcscpy.c | 2 +- library/wchar/wcscspn.c | 2 +- library/wchar/wcsdup.c | 2 +- library/wchar/wcsftime.c | 2 +- library/wchar/wcslen.c | 2 +- library/wchar/wcsncasecmp.c | 2 +- library/wchar/wcsncasecmp_l.c | 2 +- library/wchar/wcsncat.c | 2 +- library/wchar/wcsncmp.c | 2 +- library/wchar/wcsncpy.c | 2 +- library/wchar/wcsnlen.c | 2 +- library/wchar/wcsnrtombs.c | 6 +- library/wchar/wcspbrk.c | 2 +- library/wchar/wcsrchr.c | 2 +- library/wchar/wcsrtombs.c | 2 +- library/wchar/wcsspn.c | 2 +- library/wchar/wcsstr.c | 2 +- library/wchar/wcstod.c | 2 +- library/wchar/wcstof.c | 2 +- library/wchar/wcstok.c | 2 +- library/wchar/wcstol.c | 2 +- library/wchar/wcstold.c | 2 +- library/wchar/wcstoll.c | 2 +- library/wchar/wcstombs.c | 2 +- library/wchar/wcstoul.c | 2 +- library/wchar/wcstoull.c | 2 +- library/wchar/wcswidth.c | 2 +- library/wchar/wcsxfrm.c | 2 +- library/wchar/wcsxfrm_l.c | 2 +- library/wchar/wctob.c | 2 +- library/wchar/wctomb.c | 14 +- library/wchar/wctrans.c | 2 +- library/wchar/wctype.c | 2 +- library/wchar/wctype_headers.h | 2 +- library/wchar/wctype_jp2uc.h | 2 +- library/wchar/wcwidth.c | 2 +- library/wchar/wmemchr.c | 2 +- library/wchar/wmemcmp.c | 2 +- library/wchar/wmemcpy.c | 2 +- library/wchar/wmemmove.c | 2 +- library/wchar/wmemset.c | 2 +- library/wchar/wprintf.c | 2 +- library/wchar/wscanf.c | 2 +- library/wchar/wscoll.c | 2 +- librt.gmk | 2 +- misc/control | 4 +- misc/make_table.c | 2 +- misc/specs | 32 +- misc/termcap.os4 | 4 +- shared.gmk | 10 +- test_programs/Makefile | 6 +- test_programs/README.md | 2 +- test_programs/fcntl/fstat_stdout_test.c | 2 +- test_programs/fcntl/fstat_test.c | 2 +- test_programs/io/fgets_test.c | 2 +- test_programs/locale/hellogt.cxx | 2 +- test_programs/math/factorial.c | 4 +- test_programs/math/libm_test/Makefile | 4 +- test_programs/memory/memalign/Makefile | 2 +- test_programs/memory/memcmp/Makefile | 2 +- test_programs/memory/memcpy/Makefile | 2 +- test_programs/memory/memset/Makefile | 2 +- test_programs/memory/ramspeed.c | 2 +- test_programs/memory/strcmp_bench.c | 6 +- test_programs/misc/base_dir_nametest.c | 2 +- test_programs/misc/execvp_test.c | 2 +- test_programs/misc/simple.c | 2 +- test_programs/misc/test_ts.c | 4 +- test_programs/misc/translate_test.c | 2 +- test_programs/misc/uname.c | 2 +- test_programs/network/client_server/Makefile | 4 +- test_programs/network/client_server2/Makefile | 4 +- test_programs/network/select_poll.c | 2 +- test_programs/print/benchmark/Makefile | 2 +- test_programs/print/simple_sprintf.cc | 2 +- test_programs/print/strtok_test.c | 2 +- test_programs/print/test.c | 2 +- test_programs/profile/test_gprof.c | 2 +- test_programs/resolv/main_test/Makefile | 4 +- test_programs/shared_lib/open.c | 26 +- test_programs/threads/semaphore_test.c | 2 +- 1463 files changed, 4820 insertions(+), 4841 deletions(-) delete mode 100755 library/contrib/README rename library/{getclib2.c => getclib4.c} (59%) rename library/include/sys/{clib2_io.h => clib4_io.h} (97%) mode change 100755 => 100644 rename library/include/sys/{clib2_stdc.h => clib4_stdc.h} (69%) mode change 100755 => 100644 rename library/shared_library/{clib2.c => clib4.c} (86%) rename library/shared_library/{clib2.h => clib4.h} (89%) rename library/shared_library/{clib2_vectors.h => clib4_vectors.h} (99%) diff --git a/.gitignore b/.gitignore index 93cb5dda..dc358ddb 100755 --- a/.gitignore +++ b/.gitignore @@ -5,13 +5,13 @@ *.lha *.bak /library/compiler.log -clib2.info +clib4.info compiler.log *.map .vscode build/ -clib2.lha +clib4.lha .idea/ -clib2_1.0_amd64 +clib4_1.0_amd64 *.deb -clib2/ \ No newline at end of file +clib4/ \ No newline at end of file diff --git a/GNUmakefile.os4 b/GNUmakefile.os4 index 7faedc7f..2d7a1837 100644 --- a/GNUmakefile.os4 +++ b/GNUmakefile.os4 @@ -1,5 +1,5 @@ # -# $Id: Makefile,v 2.1 2021-03-26 11:28:07 clib2devs Exp $ +# $Id: Makefile,v 2.1 2021-03-26 11:28:07 clib4devs Exp $ # # :ts=8 # @@ -23,7 +23,7 @@ # called "netinclude". UNAME := $(shell uname) -INSTALL_PREFIX ?= /usr/ppc-amigaos/SDK/clib2 +INSTALL_PREFIX ?= /usr/ppc-amigaos/SDK/clib4 SDK_INCLUDE ?= /usr/ppc-amigaos/SDK/include CC := ppc-amigaos-gcc @@ -54,7 +54,7 @@ LIB_ROOT ?= $(shell pwd) LIB_DIR = $(LIB_ROOT)/library BUILD_DIR = $(LIB_ROOT)/build OUTPUT_LIB = $(BUILD_DIR)/lib -DPKG_LIB = clib2_1.0_amd64 +DPKG_LIB = clib4_1.0_amd64 ############################################################################## @@ -101,8 +101,8 @@ SHARED := $(if $(SHARED),$(SHARED),yes) STATIC := $(if $(STATIC),$(STATIC),yes) LARGEDATA := -OPTIONS += $(LARGEDATA) -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D__CLIB2__ -Wa,-mregnames -fno-builtin -nostdlib -D_GNU_SOURCE -D_XOPEN_SOURCE -D_USE_GNU -pipe -OPTIMIZE := -O3 -mregnames -mmultiple -mupdate -mfused-madd -mstrict-align +OPTIONS += $(LARGEDATA) -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D__CLIB2__ -Wa,-mregnames -fno-builtin -nostdlib -D_GNU_SOURCE -D_XOPEN_SOURCE -D_USE_GNU -pipe -specs=misc/specs +OPTIMIZE := -O3 -mregnames -mmultiple -mupdate -ffp-contract=fast -mstrict-align STABS := DLIBS := @@ -133,7 +133,7 @@ VERBOSE ?= @ # This is the first target: it depends on all the targets -all: prepare all-targets all-libs clib2.library.debug clib2.library +all: prepare all-targets all-libs clib4.library.debug clib4.library ############################################################################## @@ -166,7 +166,7 @@ ALL_TARGETS = \ $(OUTPUT_LIB)/crtend.o \ $(OUTPUT_LIB)/shcrtbegin.o \ $(OUTPUT_LIB)/shcrtend.o \ - $(OUT_SHARED_LIB)/shared_library/clib2.o \ + $(OUT_SHARED_LIB)/shared_library/clib4.o \ $(OUT_SHARED_LIB)/shared_library/math.o \ $(MAIN_LIB) @@ -188,9 +188,9 @@ clean: -$(DELETE) $(BUILD_DIR)/PatchForSPE -$(DELETE) $(OUTPUT_LIB) -$(DELETE) $(BUILD_DIR)/compiler.log - -$(DELETE) $(BUILD_DIR)/clib2.library* - -$(DELETE) clib2.lha - -$(DELETE) clib2.bak + -$(DELETE) $(BUILD_DIR)/clib4.library* + -$(DELETE) clib4.lha + -$(DELETE) clib4.bak -$(DELETE) $(DPKG_LIB) -$(DELETE) $(DPKG_LIB).deb -cd test_programs; make clean @@ -211,12 +211,12 @@ version: bumprev crypt.lib bumprev pthread.lib -# Shared clib2.library rules +# Shared clib4.library rules -clib2.library.debug: $(OBJ_C_LIB) - $(VERBOSE)$(CC) -o $(BUILD_DIR)/$@ $(CFLAGS) $(BUILD_DIR)/shared/shared_library/clib2.o $(BUILD_DIR)/shared/shared_library/math.o $(OBJ_C_LIB) $(DLIBS) -Wl,--cref,-M,-Map=$(BUILD_DIR)/$@.map -nostartfiles -nostdlib +clib4.library.debug: $(OBJ_C_LIB) + $(VERBOSE)$(CC) -o $(BUILD_DIR)/$@ $(CFLAGS) $(BUILD_DIR)/shared/shared_library/clib4.o $(BUILD_DIR)/shared/shared_library/math.o $(OBJ_C_LIB) $(DLIBS) -Wl,--cref,-M,-Map=$(BUILD_DIR)/$@.map -nostartfiles -nostdlib -clib2.library: clib2.library.debug +clib4.library: clib4.library.debug cp $(BUILD_DIR)/$< $(BUILD_DIR)/$@ $(STRIP) -R.comment -R.sdata2 --strip-unneeded-rel-relocs $(BUILD_DIR)/$@ @@ -236,12 +236,12 @@ $(OUTPUT_LIB)/crt0.o : $(LIB_DIR)/crt0.S $(VERBOSE)$(ASSEMBLE) -$(COPY) $(OUTPUT_LIB)/crt0.o $(INSTALL_PREFIX)/lib/ -$(OUTPUT_LIB)/crtbegin.o : CFLAGS = -mcrt=clib2 $(STABS) $(OPTIONS) $(INCLUDES) -O0 -fno-aggressive-loop-optimizations +$(OUTPUT_LIB)/crtbegin.o : CFLAGS = -mcrt=clib4 $(STABS) $(OPTIONS) $(INCLUDES) -O0 -fno-aggressive-loop-optimizations $(OUTPUT_LIB)/crtbegin.o : $(LIB_DIR)/crtbegin.c $(VERBOSE)$(COMPILE) -$(COPY) $(OUTPUT_LIB)/crtbegin.o $(INSTALL_PREFIX)/lib/ -$(OUTPUT_LIB)/crtend.o : CFLAGS = -mcrt=clib2 -O0 $(OPTIONS) $(INCLUDES) -fno-aggressive-loop-optimizations +$(OUTPUT_LIB)/crtend.o : CFLAGS = -mcrt=clib4 -O0 $(OPTIONS) $(INCLUDES) -fno-aggressive-loop-optimizations $(OUTPUT_LIB)/crtend.o : $(LIB_DIR)/crtend.c $(VERBOSE)$(COMPILE) -$(COPY) $(OUTPUT_LIB)/crtend.o $(INSTALL_PREFIX)/lib/ @@ -342,7 +342,7 @@ define MAKESHARED $(VERBOSE)@$(MAKEDIR) $(@D) $(VERBOSE)@$(DELETE) $@ $(VERBOSE)echo -e "\rMaking Shared \033[0;31m$@\033[0m" -$(VERBOSE)$(CC) -nostdlib -mcrt=clib2 -shared -o $@ $(OUTPUT_LIB)/shcrtbegin.o $^ $(OUTPUT_LIB)/shcrtend.o $(LOG_COMMAND) -Wl,-soname,$(@F) +$(VERBOSE)$(CC) -nostdlib -mcrt=clib4 -shared -o $@ $(OUTPUT_LIB)/shcrtbegin.o $^ $(OUTPUT_LIB)/shcrtend.o $(LOG_COMMAND) -Wl,-soname,$(@F) -specs=misc/specs endef PatchForSPE : $(LIB_ROOT)/misc/PatchForSPE.cpp @@ -358,30 +358,30 @@ compile-tests: install: $(DELETE) $(INSTALL_PREFIX)/include/* $(DELETE) $(INSTALL_PREFIX)/lib/* - $(DELETE) $(INSTALL_PREFIX)/clib2.library* + $(DELETE) $(INSTALL_PREFIX)/clib4.library* $(COPY) $(OUTPUT_LIB)/* $(INSTALL_PREFIX)/lib/ $(COPY) libs/libauto.a $(INSTALL_PREFIX)/lib/ - $(COPY) $(BUILD_DIR)/clib2.library* $(INSTALL_PREFIX) + $(COPY) $(BUILD_DIR)/clib4.library* $(INSTALL_PREFIX) $(COPY) $(LIB_ROOT)/library/include/* $(INSTALL_PREFIX)/include/ release: - -$(DELETE) clib2.lha - -$(DELETE) clib2.info - -$(MAKEDIR) clib2/include - -$(MAKEDIR) clib2/lib - -$(COPY) *.md clib2/ - -$(COPY) LICENSE* clib2/ - -$(COPY) installer/Install* clib2/ - -$(COPY) installer/clib2.info . - -$(COPY) installer/README.md.info clib2/ - -$(COPY) $(BUILD_DIR)/clib2.library clib2/ - -$(COPY) misc clib2/ - -$(COPY) libs/libauto.a clib2/lib/ - -$(COPY) $(OUTPUT_LIB)/* clib2/lib/ - -$(COPY) $(LIB_ROOT)/library/include/* clib2/include/ - lha -ao5i clib2.lha clib2 clib2.info - -$(DELETE) clib2 - -$(DELETE) clib2.info + -$(DELETE) clib4.lha + -$(DELETE) clib4.info + -$(MAKEDIR) clib4/include + -$(MAKEDIR) clib4/lib + -$(COPY) *.md clib4/ + -$(COPY) LICENSE* clib4/ + -$(COPY) installer/Install* clib4/ + -$(COPY) installer/clib4.info . + -$(COPY) installer/README.md.info clib4/ + -$(COPY) $(BUILD_DIR)/clib4.library clib4/ + -$(COPY) misc clib4/ + -$(COPY) libs/libauto.a clib4/lib/ + -$(COPY) $(OUTPUT_LIB)/* clib4/lib/ + -$(COPY) $(LIB_ROOT)/library/include/* clib4/include/ + lha -ao5i clib4.lha clib4 clib4.info + -$(DELETE) clib4 + -$(DELETE) clib4.info dpkg: -$(DELETE) $(DPKG_LIB) diff --git a/LICENSE b/LICENSE index aaaab8cc..d0e7a665 100755 --- a/LICENSE +++ b/LICENSE @@ -1,7 +1,7 @@ BSD 3-Clause License Copyright (c) 2016, Olaf Barthel -Copyright (c) 2021, Clib2Developers +Copyright (c) 2021, Clib4Developers All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/README.md b/README.md index b0a4fdfd..3e4a94a6 100755 --- a/README.md +++ b/README.md @@ -26,17 +26,17 @@ If you find any issue please ## Shared library -`clib2` now is an AmigaOS4 shared library. This means that you have to install `clib2.library` in LIBS: folder. +`clib4` now is an AmigaOS4 shared library. This means that you have to install `clib4.library` in LIBS: folder. Thanks to shared library now the exe files will be smaller since libc.a/so are just stubs to main library files. ### Libraries -Clib2 now has also a working shared version called `libc.so`. And of course also all other libs. Don't use newlib .so +Clib4 now has also a working shared version called `libc.so`. And of course also all other libs. Don't use newlib .so files when linking because **it will not work** If you want to use `dlopen`/`dlsym` with shared objects: -**YOU MUST** compile your Clib2 version of library you want to use! +**YOU MUST** compile your Clib4 version of library you want to use! **DON'T TRY TO USE** newlib shared objects because it will crash badly! **DON'T USE** static libraries otherwise you could have undefined symbols! @@ -44,16 +44,16 @@ The plain `libc.a` now contains also `libnet.a`, `libunix.a`. Socket support and enabled. Soft float version is no longer available. -Clib2 define `__THREAD_SAFE` used to check if the library is thread safe +Clib4 define `__THREAD_SAFE` used to check if the library is thread safe -If you want to use the shared version of library remember to pack your OS4 software with all clib2 shared objects +If you want to use the shared version of library remember to pack your OS4 software with all clib4 shared objects otherwise the elf loader will try to load objects from SOBJS: and it will load newlib one. -**DON'T overwrite SOBJS: files with your Clib2 files** otherwise OS4 most probably will not load them, and you could +**DON'T overwrite SOBJS: files with your Clib4 files** otherwise OS4 most probably will not load them, and you could have problems running existent software! ### New memory allocator -Clib2 now use `Wheel Of Fortune` allocator that is faster than previous one, and it seems more robust and with a cleaner +Clib4 now use `Wheel Of Fortune` allocator that is faster than previous one, and it seems more robust and with a cleaner and portable code ### Optimized AMCC functions @@ -63,22 +63,22 @@ Feel free to add other CPU versions. ### Altivec -`libmotovec` has been added to clib2 and enable some altivec functions. Altivec optimizations are not enabled at program -start except if you recompile clib2 with *ENABLE_ALTIVEC_AT_START*. +`libmotovec` has been added to clib4 and enable some altivec functions. Altivec optimizations are not enabled at program +start except if you recompile clib4 with *ENABLE_ALTIVEC_AT_START*. However two new methods (**enableAltivec** and **disableAltivec**) are present and you can use them to enable or disable optimizations at runtime. -Keep in mind that clib2 is not compiled with altivec optimizations for all files. +Keep in mind that clib4 is not compiled with altivec optimizations for all files. ### SPE -`libcfsl_e500` (thanks to wayback machine..) has been added to clib2 providing some optimized functions. To compile +`libcfsl_e500` (thanks to wayback machine..) has been added to clib4 providing some optimized functions. To compile *e500* functions pass SPE=true at makefile. However to compile these functions you need a compiler that supports SPE ABI. The latest gcc version that supports SPE is gcc8. ### Shared objects -Shared objects **are working** also with clib2 (there is an example under test_programs/dlopen folder). +Shared objects **are working** also with clib4 (there is an example under test_programs/dlopen folder). However shared objects needs the beta elf.library not yet released to public ### Large file support @@ -88,10 +88,9 @@ problem). ### SYSV functions -Clib2 now contains **shm***, **msg*** and **sem*** functions. +Clib4 now contains **shm***, **msg*** and **sem*** functions. SYSV IPC library is now fully -integrated into clib2 library and -doesn't need any external resource +integrated into clib4 library and doesn't need any external resource ### Unix path support @@ -122,7 +121,7 @@ Accepted encodings are: ### Math library Math library has been replaced with openlibm (https://github.com/JuliaMath/openlibm). -This version is faster and more compatible and contains also fenv support that wasn't implemented in clib2. +This version is faster and more compatible and contains also fenv support that wasn't implemented in clib4. ### Complex numbers @@ -131,11 +130,11 @@ A lot of other functions has been added trying to make OS4 ports easier. ### libauto -Clib2 now contain also libauto with almost all OS4 components. We'll try to keep them updated. +Clib4 now contain also libauto with almost all OS4 components. We'll try to keep them updated. ### libpthread -Clib2 now contain a native pthread implementation with some functions are not present in the pthread.library. +Clib4 now contain a native pthread implementation with some functions are not present in the pthread.library. All mutex* function now use OS4 Mutexes instead of Semaphores ### librt @@ -154,7 +153,7 @@ Added crypt library that implements crypt and crypt_r ### UNIX sockets (AF_UNIX) -clib2 now supports emulated UNIX sockets. Since roadshow and OS4 doesn't support them natively, UNIX sockets are +clib4 now supports emulated UNIX sockets. Since roadshow and OS4 doesn't support them natively, UNIX sockets are emulated via native sockets. The user doesn't need to change anything in the linux code. Everything will be transparent for him @@ -202,7 +201,7 @@ If you want to use `gstabs` to non debug version of library you can use the flag ### Misc -Clib2 now supports opening directories with open() and opendir() functions. There are also new other functions that are +Clib4 now supports opening directories with open() and opendir() functions. There are also new other functions that are used with fd int files. Check `fcntl.h` for details @@ -214,7 +213,7 @@ constructors/destructors executions ### TODO -- There is a memory leak at clib2 end needs to be tracked down +- There are some memory leaks at clib4 end needs to be tracked down - Try to use Microsoft `mimalloc` as memory allocator that should be faster when there are multiple cores. - Add a test suite @@ -228,7 +227,7 @@ The BSD license would probably be appropriate here. BSD 3-Clause License Copyright (c) 2016, Olaf Barthel -Copyright (c) 2021, Clib2Developers +Copyright (c) 2021, Clib4Developers All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/documentation/BUILDING.html b/documentation/BUILDING.html index 15ebc0e7..a3ee126c 100755 --- a/documentation/BUILDING.html +++ b/documentation/BUILDING.html @@ -12,7 +12,7 @@

Notes on building the library

Follow the instructions on adtools site and you are ready to go

There is a makefiles for GCC called(GNUmakefile.os4). The file is named in this way because the old -clib2 version that had both .os3 and .os4 versions and adtools is searching for it.
+clib4 version that had both .os3 and .os4 versions and adtools is searching for it.
So to compile the lib just do a simply:

make -f GNUmakefile.os4

and the ibrary will be built diff --git a/installer/Install b/installer/Install index 0956381d..178faf05 100644 --- a/installer/Install +++ b/installer/Install @@ -1,10 +1,10 @@ (welcome) (complete 0) (set @default-dest "LIBS:") -(set @default-sdk-dest "SDK:clib2") +(set @default-sdk-dest "SDK:clib4") (set @default-dest (askdir - (prompt "Where would you like to install clib2.library?\nA new Drawer will be created if necessary") + (prompt "Where would you like to install clib4.library?\nA new Drawer will be created if necessary") (help @askdir-help) (default @default-dest) (newpath) @@ -12,10 +12,10 @@ ) (complete 30) (copyfiles - (prompt "clib2 installation") + (prompt "clib4 installation") (help @copyfiles-help) (source "") - (choices "clib2.library") + (choices "clib4.library") (dest @default-dest) (confirm) ) diff --git a/libamiga.gmk b/libamiga.gmk index d1d1da2c..1f5ac6be 100755 --- a/libamiga.gmk +++ b/libamiga.gmk @@ -1,5 +1,5 @@ # -# $Id: libamiga.gmk,v 1.1 2006-09-17 17:37:27 clib2devs Exp $ +# $Id: libamiga.gmk,v 1.1 2006-09-17 17:37:27 clib4devs Exp $ # OUT_STATIC := $(BUILD_DIR)/obj/libamiga diff --git a/libc.gmk b/libc.gmk index 1a6754bb..7f58b1d2 100755 --- a/libc.gmk +++ b/libc.gmk @@ -1,5 +1,5 @@ # -# $Id: libc.gmk,v 1.9 2010-10-20 13:50:17 clib2devs Exp $ +# $Id: libc.gmk,v 1.9 2010-10-20 13:50:17 clib4devs Exp $ # :ts=8 # -*- mode: makefile; -*- @@ -15,7 +15,7 @@ endif C_BASE := \ libc_init_global.o \ - getclib2.o \ + getclib4.o \ errno_data.o C_ARGZ := \ diff --git a/libcrypt.gmk b/libcrypt.gmk index 2708b43d..1bbb1c2d 100644 --- a/libcrypt.gmk +++ b/libcrypt.gmk @@ -1,5 +1,5 @@ # -# $Id: libcrypt.gmk,v 1.0 2022-07-09 10:09:48 clib2devs Exp $ +# $Id: libcrypt.gmk,v 1.0 2022-07-09 10:09:48 clib4devs Exp $ # # :ts=8 # diff --git a/libdebug.gmk b/libdebug.gmk index afffb4b7..d037d4ba 100644 --- a/libdebug.gmk +++ b/libdebug.gmk @@ -1,5 +1,5 @@ # -# $Id: libdebug.gmk,v 1.0 2022-07-09 10:09:48 clib2devs Exp $ +# $Id: libdebug.gmk,v 1.0 2022-07-09 10:09:48 clib4devs Exp $ # OUT_STATIC := $(BUILD_DIR)/obj/libdebug diff --git a/libm.gmk b/libm.gmk index 2e7e0769..60e17b6b 100755 --- a/libm.gmk +++ b/libm.gmk @@ -1,5 +1,5 @@ # -# $Id: libm.gmk,v 1.3 2007-01-06 10:09:48 clib2devs Exp $ +# $Id: libm.gmk,v 1.3 2007-01-06 10:09:48 clib4devs Exp $ # # :ts=8 # diff --git a/libprofile.gmk b/libprofile.gmk index 86e5e56e..53bf0cb8 100755 --- a/libprofile.gmk +++ b/libprofile.gmk @@ -1,5 +1,5 @@ # -# $Id: libprofile.gmk,v 1.1 2006-09-17 17:37:27 clib2devs Exp $ +# $Id: libprofile.gmk,v 1.1 2006-09-17 17:37:27 clib4devs Exp $ # OUT_STATIC := $(BUILD_DIR)/obj/libprofile diff --git a/libpthread.gmk b/libpthread.gmk index 2b890d99..c68b301e 100644 --- a/libpthread.gmk +++ b/libpthread.gmk @@ -1,5 +1,5 @@ # -# $Id: libpthread.gmk,v 1.1 2023-04-23 10:09:48 clib2devs Exp $ +# $Id: libpthread.gmk,v 1.1 2023-04-23 10:09:48 clib4devs Exp $ # OUT_STATIC := $(BUILD_DIR)/obj/libpthread diff --git a/library/amiga/acrypt.c b/library/amiga/acrypt.c index 124bb74e..58044ffa 100644 --- a/library/amiga/acrypt.c +++ b/library/amiga/acrypt.c @@ -1,5 +1,5 @@ /* - * $Id: amiga_acrypt.c,v 1.5 2006-09-25 15:12:47 clib2devs Exp $ + * $Id: amiga_acrypt.c,v 1.5 2006-09-25 15:12:47 clib4devs Exp $ */ #define ACrypt __ACrypt diff --git a/library/amiga/addtof.c b/library/amiga/addtof.c index f99b7c39..5799ac0a 100644 --- a/library/amiga/addtof.c +++ b/library/amiga/addtof.c @@ -1,5 +1,5 @@ /* - * $Id: amiga_addtof.c,v 1.4 2006-01-08 12:04:22 clib2devs Exp $ + * $Id: amiga_addtof.c,v 1.4 2006-01-08 12:04:22 clib4devs Exp $ */ #include diff --git a/library/amiga/amiga.lib_rev.c b/library/amiga/amiga.lib_rev.c index da719de9..07c9f7eb 100755 --- a/library/amiga/amiga.lib_rev.c +++ b/library/amiga/amiga.lib_rev.c @@ -1,5 +1,5 @@ /* - * $Id: amiga.lib_rev.c,v 1.3 2006-01-08 12:04:21 clib2devs Exp $ + * $Id: amiga.lib_rev.c,v 1.3 2006-01-08 12:04:21 clib4devs Exp $ */ #include "amiga.lib_rev.h" diff --git a/library/amiga/argarraydone.c b/library/amiga/argarraydone.c index b7058c85..4dadbe0e 100644 --- a/library/amiga/argarraydone.c +++ b/library/amiga/argarraydone.c @@ -1,5 +1,5 @@ /* - * $Id: amiga_argarraydone.c,v 1.4 2006-09-25 14:05:31 clib2devs Exp $ + * $Id: amiga_argarraydone.c,v 1.4 2006-09-25 14:05:31 clib4devs Exp $ */ #include diff --git a/library/amiga/argarrayinit.c b/library/amiga/argarrayinit.c index f1c7e05c..33a3c775 100644 --- a/library/amiga/argarrayinit.c +++ b/library/amiga/argarrayinit.c @@ -1,5 +1,5 @@ /* - * $Id: amiga_argarrayinit.c,v 1.7 2021-01-31 14:09:00 clib2devs Exp $ + * $Id: amiga_argarrayinit.c,v 1.7 2021-01-31 14:09:00 clib4devs Exp $ */ #include diff --git a/library/amiga/argint.c b/library/amiga/argint.c index 410b5644..0f2622a2 100644 --- a/library/amiga/argint.c +++ b/library/amiga/argint.c @@ -1,5 +1,5 @@ /* - * $Id: amiga_argint.c,v 1.3 2006-01-08 12:04:22 clib2devs Exp $ + * $Id: amiga_argint.c,v 1.3 2006-01-08 12:04:22 clib4devs Exp $ */ #include diff --git a/library/amiga/argstring.c b/library/amiga/argstring.c index 20e76ece..86219ddd 100644 --- a/library/amiga/argstring.c +++ b/library/amiga/argstring.c @@ -1,5 +1,5 @@ /* - * $Id: amiga_argstring.c,v 1.3 2006-01-08 12:04:22 clib2devs Exp $ + * $Id: amiga_argstring.c,v 1.3 2006-01-08 12:04:22 clib4devs Exp $ */ #include diff --git a/library/amiga/beginio.c b/library/amiga/beginio.c index 89be0d18..314e54ed 100644 --- a/library/amiga/beginio.c +++ b/library/amiga/beginio.c @@ -1,5 +1,5 @@ /* - * $Id: amiga_beginio.c,v 1.5 2006-09-25 15:12:47 clib2devs Exp $ + * $Id: amiga_beginio.c,v 1.5 2006-09-25 15:12:47 clib4devs Exp $ */ #include diff --git a/library/amiga/createextio.c b/library/amiga/createextio.c index 73ac855e..dcb8d218 100644 --- a/library/amiga/createextio.c +++ b/library/amiga/createextio.c @@ -1,5 +1,5 @@ /* - * $Id: amiga_createextio.c,v 1.6 2021-01-31 15:12:47 clib2devs Exp $ + * $Id: amiga_createextio.c,v 1.6 2021-01-31 15:12:47 clib4devs Exp $ */ #include diff --git a/library/amiga/createport.c b/library/amiga/createport.c index 7fdb1e30..4764e2ba 100644 --- a/library/amiga/createport.c +++ b/library/amiga/createport.c @@ -1,5 +1,5 @@ /* - * $Id: amiga_createport.c,v 1.6 2021-01-31 15:12:47 clib2devs Exp $ + * $Id: amiga_createport.c,v 1.6 2021-01-31 15:12:47 clib4devs Exp $ */ #include diff --git a/library/amiga/createstdio.c b/library/amiga/createstdio.c index 7d0b5513..59dcbb60 100644 --- a/library/amiga/createstdio.c +++ b/library/amiga/createstdio.c @@ -1,5 +1,5 @@ /* - * $Id: amiga_createstdio.c,v 1.6 2021-09-31 15:12:47 clib2devs Exp $ + * $Id: amiga_createstdio.c,v 1.6 2021-09-31 15:12:47 clib4devs Exp $ */ #include diff --git a/library/amiga/createtask.c b/library/amiga/createtask.c index cf3d5140..b2a0225b 100644 --- a/library/amiga/createtask.c +++ b/library/amiga/createtask.c @@ -1,5 +1,5 @@ /* - * $Id: amiga_createtask.c,v 1.6 2006-09-25 15:12:47 clib2devs Exp $ + * $Id: amiga_createtask.c,v 1.6 2006-09-25 15:12:47 clib4devs Exp $ */ #include diff --git a/library/amiga/deleteextio.c b/library/amiga/deleteextio.c index 4dc487e9..ce3b3aed 100644 --- a/library/amiga/deleteextio.c +++ b/library/amiga/deleteextio.c @@ -1,5 +1,5 @@ /* - * $Id: amiga_deleteextio.c,v 1.6 2021-01-31 15:12:47 clib2devs Exp $ + * $Id: amiga_deleteextio.c,v 1.6 2021-01-31 15:12:47 clib4devs Exp $ */ #include diff --git a/library/amiga/deleteport.c b/library/amiga/deleteport.c index 035c110f..a14d6829 100644 --- a/library/amiga/deleteport.c +++ b/library/amiga/deleteport.c @@ -1,5 +1,5 @@ /* - * $Id: amiga_deleteport.c,v 1.6 2021-01-31 15:12:47 clib2devs Exp $ + * $Id: amiga_deleteport.c,v 1.6 2021-01-31 15:12:47 clib4devs Exp $ */ #include diff --git a/library/amiga/deletestdio.c b/library/amiga/deletestdio.c index a1f53afb..8237683d 100644 --- a/library/amiga/deletestdio.c +++ b/library/amiga/deletestdio.c @@ -1,5 +1,5 @@ /* - * $Id: amiga_deletestdio.c,v 1.6 2021-01-31 15:12:47 clib2devs Exp $ + * $Id: amiga_deletestdio.c,v 1.6 2021-01-31 15:12:47 clib4devs Exp $ */ #include diff --git a/library/amiga/deletetask.c b/library/amiga/deletetask.c index e71639c0..a7bd9857 100644 --- a/library/amiga/deletetask.c +++ b/library/amiga/deletetask.c @@ -1,5 +1,5 @@ /* - * $Id: amiga_deletetask.c,v 1.5 2006-09-25 15:12:47 clib2devs Exp $ + * $Id: amiga_deletetask.c,v 1.5 2006-09-25 15:12:47 clib4devs Exp $ */ #include diff --git a/library/amiga/dotimer.c b/library/amiga/dotimer.c index f079a86f..13412f7a 100644 --- a/library/amiga/dotimer.c +++ b/library/amiga/dotimer.c @@ -1,5 +1,5 @@ /* - * $Id: amiga_dotimer.c,v 1.9 2021-01-31 06:43:56 clib2devs Exp $ + * $Id: amiga_dotimer.c,v 1.9 2021-01-31 06:43:56 clib4devs Exp $ */ #include diff --git a/library/amiga/fastrand.c b/library/amiga/fastrand.c index 920a3dcb..1484cc6b 100644 --- a/library/amiga/fastrand.c +++ b/library/amiga/fastrand.c @@ -1,5 +1,5 @@ /* - * $Id: amiga_fastrand.c,v 1.3 2006-01-08 12:04:22 clib2devs Exp $ + * $Id: amiga_fastrand.c,v 1.3 2006-01-08 12:04:22 clib4devs Exp $ */ #include diff --git a/library/amiga/freeievents.c b/library/amiga/freeievents.c index e74fd223..0c59dcc8 100644 --- a/library/amiga/freeievents.c +++ b/library/amiga/freeievents.c @@ -1,5 +1,5 @@ /* - * $Id: amiga_freeievents.c,v 1.3 2006-01-08 12:04:22 clib2devs Exp $ + * $Id: amiga_freeievents.c,v 1.3 2006-01-08 12:04:22 clib4devs Exp $ */ #include diff --git a/library/amiga/hotkey.c b/library/amiga/hotkey.c index 75550ce4..35269908 100644 --- a/library/amiga/hotkey.c +++ b/library/amiga/hotkey.c @@ -1,5 +1,5 @@ /* - * $Id: amiga_hotkey.c,v 1.3 2006-01-08 12:04:22 clib2devs Exp $ + * $Id: amiga_hotkey.c,v 1.3 2006-01-08 12:04:22 clib4devs Exp $ */ #include diff --git a/library/amiga/invertstring.c b/library/amiga/invertstring.c index 3451ff3a..02878901 100644 --- a/library/amiga/invertstring.c +++ b/library/amiga/invertstring.c @@ -1,5 +1,5 @@ /* - * $Id: amiga_invertstring.c,v 1.5 2021-01-31 12:04:22 clib2devs Exp $ + * $Id: amiga_invertstring.c,v 1.5 2021-01-31 12:04:22 clib4devs Exp $ */ #include diff --git a/library/amiga/newlist.c b/library/amiga/newlist.c index b9a2ddc1..1a785cdf 100644 --- a/library/amiga/newlist.c +++ b/library/amiga/newlist.c @@ -1,5 +1,5 @@ /* - * $Id: amiga_newlist.c,v 1.4 2006-09-25 15:12:47 clib2devs Exp $ + * $Id: amiga_newlist.c,v 1.4 2006-09-25 15:12:47 clib4devs Exp $ */ #include diff --git a/library/amiga/rangerand.c b/library/amiga/rangerand.c index 0bc47417..1bbfd213 100644 --- a/library/amiga/rangerand.c +++ b/library/amiga/rangerand.c @@ -1,5 +1,5 @@ /* - * $Id: amiga_rangerand.c,v 1.3 2006-01-08 12:04:22 clib2devs Exp $ + * $Id: amiga_rangerand.c,v 1.3 2006-01-08 12:04:22 clib4devs Exp $ */ #include diff --git a/library/amiga/remtof.c b/library/amiga/remtof.c index a5af779f..ab8d0b4e 100644 --- a/library/amiga/remtof.c +++ b/library/amiga/remtof.c @@ -1,5 +1,5 @@ /* - * $Id: amiga_remtof.c,v 1.3 2006-01-08 12:04:22 clib2devs Exp $ + * $Id: amiga_remtof.c,v 1.3 2006-01-08 12:04:22 clib4devs Exp $ */ #include diff --git a/library/amiga/rexxvars.c b/library/amiga/rexxvars.c index 86448211..f2b3e04c 100644 --- a/library/amiga/rexxvars.c +++ b/library/amiga/rexxvars.c @@ -1,5 +1,5 @@ /* - * $Id: amiga_rexxvars.c,v 1.209 2021-01-01 10:11:59 clib2devs Exp $ + * $Id: amiga_rexxvars.c,v 1.209 2021-01-01 10:11:59 clib4devs Exp $ */ /* We don't want to pull in */ diff --git a/library/amiga/timedelay.c b/library/amiga/timedelay.c index 518f35c1..89ea829a 100644 --- a/library/amiga/timedelay.c +++ b/library/amiga/timedelay.c @@ -1,5 +1,5 @@ /* - * $Id: amiga_timedelay.c,v 1.4 2006-04-05 06:43:56 clib2devs Exp $ + * $Id: amiga_timedelay.c,v 1.4 2006-04-05 06:43:56 clib4devs Exp $ */ #include diff --git a/library/amiga/waitbeam.c b/library/amiga/waitbeam.c index 7175ed86..c8bd2bb8 100644 --- a/library/amiga/waitbeam.c +++ b/library/amiga/waitbeam.c @@ -1,5 +1,5 @@ /* - * $Id: amiga_waitbeam.c,v 1.3 2006-01-08 12:04:22 clib2devs Exp $ + * $Id: amiga_waitbeam.c,v 1.3 2006-01-08 12:04:22 clib4devs Exp $ */ #include diff --git a/library/argz/add.c b/library/argz/add.c index 9b042d4c..7fb6bade 100644 --- a/library/argz/add.c +++ b/library/argz/add.c @@ -1,5 +1,5 @@ /* - * $Id: argz_add.c,v 1.0 2021-01-21 10:08:32 clib2devs Exp $ + * $Id: argz_add.c,v 1.0 2021-01-21 10:08:32 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H diff --git a/library/argz/add_sep.c b/library/argz/add_sep.c index c1d7d364..03f7d282 100644 --- a/library/argz/add_sep.c +++ b/library/argz/add_sep.c @@ -1,5 +1,5 @@ /* - * $Id: argz_add_sep.c,v 1.0 2021-01-21 10:08:32 clib2devs Exp $ + * $Id: argz_add_sep.c,v 1.0 2021-01-21 10:08:32 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H diff --git a/library/argz/append.c b/library/argz/append.c index e37af8de..6325eaab 100644 --- a/library/argz/append.c +++ b/library/argz/append.c @@ -1,5 +1,5 @@ /* - * $Id: argz_append.c,v 1.0 2021-01-21 10:48:32 clib2devs Exp $ + * $Id: argz_append.c,v 1.0 2021-01-21 10:48:32 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H diff --git a/library/argz/count.c b/library/argz/count.c index e1ac8d67..f39c30e9 100644 --- a/library/argz/count.c +++ b/library/argz/count.c @@ -1,5 +1,5 @@ /* - * $Id: argz_count.c,v 1.0 2021-01-21 11:24:12 clib2devs Exp $ + * $Id: argz_count.c,v 1.0 2021-01-21 11:24:12 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H diff --git a/library/argz/create.c b/library/argz/create.c index 0213eb1e..02c353ea 100644 --- a/library/argz/create.c +++ b/library/argz/create.c @@ -1,5 +1,5 @@ /* - * $Id: argz_create.c,v 1.0 2021-01-21 10:08:32 clib2devs Exp $ + * $Id: argz_create.c,v 1.0 2021-01-21 10:08:32 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H diff --git a/library/argz/create_sep.c b/library/argz/create_sep.c index f187ea2a..bc2134b2 100644 --- a/library/argz/create_sep.c +++ b/library/argz/create_sep.c @@ -1,5 +1,5 @@ /* - * $Id: argz_create_sep.c,v 1.0 2021-01-21 11:14:32 clib2devs Exp $ + * $Id: argz_create_sep.c,v 1.0 2021-01-21 11:14:32 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H diff --git a/library/argz/delete.c b/library/argz/delete.c index 5e276225..127b9d67 100644 --- a/library/argz/delete.c +++ b/library/argz/delete.c @@ -1,5 +1,5 @@ /* - * $Id: argz_delete.c,v 1.0 2021-01-21 11:25:47 clib2devs Exp $ + * $Id: argz_delete.c,v 1.0 2021-01-21 11:25:47 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H diff --git a/library/argz/extract.c b/library/argz/extract.c index 707f83b4..01790559 100644 --- a/library/argz/extract.c +++ b/library/argz/extract.c @@ -1,5 +1,5 @@ /* - * $Id: argz_extract.c,v 1.0 2021-01-21 11:27:06 clib2devs Exp $ + * $Id: argz_extract.c,v 1.0 2021-01-21 11:27:06 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H diff --git a/library/argz/insert.c b/library/argz/insert.c index 0e784513..14194936 100644 --- a/library/argz/insert.c +++ b/library/argz/insert.c @@ -1,5 +1,5 @@ /* - * $Id: argz_insert.c,v 1.0 2021-01-21 10:08:32 clib2devs Exp $ + * $Id: argz_insert.c,v 1.0 2021-01-21 10:08:32 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H diff --git a/library/argz/next.c b/library/argz/next.c index f8c05a46..10ca9df6 100644 --- a/library/argz/next.c +++ b/library/argz/next.c @@ -1,5 +1,5 @@ /* - * $Id: argz_next.c,v 1.0 2021-01-21 11:33:52 clib2devs Exp $ + * $Id: argz_next.c,v 1.0 2021-01-21 11:33:52 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H diff --git a/library/argz/replace.c b/library/argz/replace.c index bf0c4739..0893b679 100644 --- a/library/argz/replace.c +++ b/library/argz/replace.c @@ -1,5 +1,5 @@ /* - * $Id: argz_replace.c,v 1.0 2021-01-21 11:38:20 clib2devs Exp $ + * $Id: argz_replace.c,v 1.0 2021-01-21 11:38:20 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H diff --git a/library/argz/stringify.c b/library/argz/stringify.c index 5ef81dd8..9b663166 100644 --- a/library/argz/stringify.c +++ b/library/argz/stringify.c @@ -1,5 +1,5 @@ /* - * $Id: argz_stringify.c,v 1.0 2021-01-21 11:39:35 clib2devs Exp $ + * $Id: argz_stringify.c,v 1.0 2021-01-21 11:39:35 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H diff --git a/library/c.lib_rev.c b/library/c.lib_rev.c index 9435f3f6..3fc68bcb 100755 --- a/library/c.lib_rev.c +++ b/library/c.lib_rev.c @@ -1,5 +1,5 @@ /* - * $Id: c.lib_rev.c,v 1.0 2023-04-16 12:04:22 clib2devs Exp $ + * $Id: c.lib_rev.c,v 1.0 2023-04-16 12:04:22 clib4devs Exp $ */ #include "c.lib_rev.h" diff --git a/library/c.lib_rev.h b/library/c.lib_rev.h index 8006c6bd..8830cd48 100755 --- a/library/c.lib_rev.h +++ b/library/c.lib_rev.h @@ -1,8 +1,8 @@ #define VERSION 1 #define REVISION 0 -#define SUBREVISION 13 +#define SUBREVISION 0 -#define DATE "10.07.2023" -#define VERS "clib2.library 1.0.13" -#define VSTRING "clib2.library 1.0.13 (10.07.2023)\r\n" -#define VERSTAG "\0$VER: clib2.library 1.0.13 (10.07.2023)" +#define DATE "27.09.2023" +#define VERS "clib4.library 1.0.0" +#define VSTRING "clib4.library 1.0.0 (27.09.2023)\r\n" +#define VERSTAG "\0$VER: clib4.library 1.0.0 (27.09.2023)" diff --git a/library/contrib/README b/library/contrib/README deleted file mode 100755 index 811c04ff..00000000 --- a/library/contrib/README +++ /dev/null @@ -1,3 +0,0 @@ -This directory contains contributions which have not yet been integrated -with the clib2 library build but which should be in the CVS repository -both for safekeeping and for you to look at and adapt. diff --git a/library/cpu/altivec/longjmp_altivec.sx b/library/cpu/altivec/longjmp_altivec.sx index 5b8709fd..0a819b22 100644 --- a/library/cpu/altivec/longjmp_altivec.sx +++ b/library/cpu/altivec/longjmp_altivec.sx @@ -1,5 +1,5 @@ /* - * $Id: stdlib_longjmp.c,v 1.6 2010-10-20 13:50:17 clib2devs Exp $ + * $Id: stdlib_longjmp.c,v 1.6 2010-10-20 13:50:17 clib4devs Exp $ */ /* This is a simple version of setjmp and longjmp for the PowerPC. diff --git a/library/cpu/altivec/setjmp_altivec.sx b/library/cpu/altivec/setjmp_altivec.sx index 505b9fff..1d2e733b 100644 --- a/library/cpu/altivec/setjmp_altivec.sx +++ b/library/cpu/altivec/setjmp_altivec.sx @@ -1,5 +1,5 @@ /* - * $Id: stdlib_setjmp.c,v 2.0 2010-10-20 13:50:17 clib2devs Exp $ + * $Id: stdlib_setjmp.c,v 2.0 2010-10-20 13:50:17 clib4devs Exp $ */ /* This is a simple version of setjmp and longjmp for the PowerPC. Ian Lance Taylor, Cygnus Support, 9 Feb 1994. diff --git a/library/cpu/spe/_longjmpE500.S b/library/cpu/spe/_longjmpE500.S index d28ca222..dfc6bcd6 100644 --- a/library/cpu/spe/_longjmpE500.S +++ b/library/cpu/spe/_longjmpE500.S @@ -1,5 +1,5 @@ /* - * $Id: _longjmpE500.c,v 1.0 2023-07-14 13:50:17 clib2devs Exp $ + * $Id: _longjmpE500.c,v 1.0 2023-07-14 13:50:17 clib4devs Exp $ */ #include "ppc-asm.h" diff --git a/library/cpu/spe/_setjmpE500.S b/library/cpu/spe/_setjmpE500.S index 24f3e4e0..8c60a09a 100644 --- a/library/cpu/spe/_setjmpE500.S +++ b/library/cpu/spe/_setjmpE500.S @@ -1,5 +1,5 @@ /* - * $Id: _setjmpE500.c,v 1.0 2023-07-14 13:50:17 clib2devs Exp $ + * $Id: _setjmpE500.c,v 1.0 2023-07-14 13:50:17 clib4devs Exp $ */ #include "ppc-asm.h" diff --git a/library/cpu/spe/longjmpE500.S b/library/cpu/spe/longjmpE500.S index 93930bc9..e4cb222b 100644 --- a/library/cpu/spe/longjmpE500.S +++ b/library/cpu/spe/longjmpE500.S @@ -1,5 +1,5 @@ /* - * $Id: longjmpE500.c,v 1.0 2023-07-14 13:50:17 clib2devs Exp $ + * $Id: longjmpE500.c,v 1.0 2023-07-14 13:50:17 clib4devs Exp $ */ /* This is a simple version of setjmp and longjmp for the PowerPC. diff --git a/library/cpu/spe/setjmpE500.S b/library/cpu/spe/setjmpE500.S index 4721d4d5..21befef0 100644 --- a/library/cpu/spe/setjmpE500.S +++ b/library/cpu/spe/setjmpE500.S @@ -1,5 +1,5 @@ /* - * $Id: setjmpE500.c,v 1.0 2023-07-14 13:50:17 clib2devs Exp $ + * $Id: setjmpE500.c,v 1.0 2023-07-14 13:50:17 clib4devs Exp $ */ /* This is a simple version of setjmp and longjmp for the PowerPC. diff --git a/library/cpu/spe/sigsetjmpE500.S b/library/cpu/spe/sigsetjmpE500.S index 18955734..4bf7b6dd 100644 --- a/library/cpu/spe/sigsetjmpE500.S +++ b/library/cpu/spe/sigsetjmpE500.S @@ -1,5 +1,5 @@ /* - * $Id: sigsetjmpE500.S,v 1.0 2023-07-13 13:50:17 clib2devs Exp $ + * $Id: sigsetjmpE500.S,v 1.0 2023-07-13 13:50:17 clib4devs Exp $ */ /* diff --git a/library/crt0.S b/library/crt0.S index 49eaff6e..3fd86e40 100644 --- a/library/crt0.S +++ b/library/crt0.S @@ -1,5 +1,5 @@ // -// $Id: crt0.S,v 1.7 2005-10-11 09:28:29 clib2devs Exp $ +// $Id: crt0.S,v 1.7 2005-10-11 09:28:29 clib4devs Exp $ // // :ts=4 // .text diff --git a/library/crtbegin.c b/library/crtbegin.c index 70d82561..f8f33357 100644 --- a/library/crtbegin.c +++ b/library/crtbegin.c @@ -1,5 +1,5 @@ /* -* $Id: crtbegin.c,v 1.3 2022-03-09 21:07:25 clib2devs Exp $ +* $Id: crtbegin.c,v 1.3 2022-03-09 21:07:25 clib4devs Exp $ */ #undef __USE_INLINE__ #define __NOLIBBASE__ @@ -59,13 +59,13 @@ const struct UtilityIFace *IUtility = NULL; struct Library *ElfBase = NULL; struct ElfIFace *IElf = NULL; -const struct Clib2IFace *IClib2 = NULL; +const struct Clib4IFace *IClib4 = NULL; register void *r13 __asm("r13"); extern void *_SDA_BASE_ __attribute__((force_no_baserel)); extern int main(int, char **); -int clib2_start(char *args, int32 arglen, struct Library *sysbase); +int clib4_start(char *args, int32 arglen, struct Library *sysbase); int _start(char *args, int32 arglen, struct Library *sysbase); static struct Interface *OpenLibraryInterface(struct ExecIFace *iexec, const char *name, int version) { @@ -99,9 +99,9 @@ static void CloseLibraryInterface(struct ExecIFace *iexec, struct Interface *int } int -clib2_start(char *args, int32 arglen, struct Library *sysbase) { +clib4_start(char *args, int32 arglen, struct Library *sysbase) { struct ExecIFace *iexec; - struct Clib2IFace *iclib2; + struct Clib4IFace *iclib4; struct DOSIFace *idos; int rc = -1; @@ -120,16 +120,16 @@ clib2_start(char *args, int32 arglen, struct Library *sysbase) { IUtility = (struct UtilityIFace *) OpenLibraryInterface(iexec, "utility.library", MIN_OS_VERSION); if (IUtility != NULL) { UtilityBase = IUtility->Data.LibBase; - iclib2 = (struct Clib2IFace *) OpenLibraryInterface(iexec, "clib2.library", 1); - if (iclib2 != NULL) { - struct Library *clib2base = ((struct Interface *) iclib2)->Data.LibBase; - if (clib2base->lib_Version == VERSION && clib2base->lib_Revision == REVISION) { - IClib2 = iclib2; + iclib4 = (struct Clib4IFace *) OpenLibraryInterface(iexec, "clib4.library", 1); + if (iclib4 != NULL) { + struct Library *clib4base = ((struct Interface *) iclib4)->Data.LibBase; + if (clib4base->lib_Version == VERSION && clib4base->lib_Revision == REVISION) { + IClib4 = iclib4; - rc = iclib2->library_start(args, arglen, main, __CTOR_LIST__, __DTOR_LIST__); + rc = iclib4->library_start(args, arglen, main, __CTOR_LIST__, __DTOR_LIST__); } else { - idos->Printf("This program requires clib2.library %d\n", VERS); + idos->Printf("This program requires clib4.library %d\n", VERS); } } else { idos->Printf("Cannot open %s\n", VERS); @@ -142,7 +142,7 @@ clib2_start(char *args, int32 arglen, struct Library *sysbase) { else { iexec->Alert(AT_Recovery | AG_OpenLib | AO_DOSLib); } - CloseLibraryInterface(iexec, (struct Interface *) iclib2); + CloseLibraryInterface(iexec, (struct Interface *) iclib4); CloseLibraryInterface(iexec, (struct Interface *) IUtility); CloseLibraryInterface(iexec, (struct Interface *) idos); @@ -155,5 +155,5 @@ clib2_start(char *args, int32 arglen, struct Library *sysbase) { int _start(STRPTR argstring, int32 arglen, struct Library *sysbase) { - return clib2_start(argstring, arglen, sysbase); + return clib4_start(argstring, arglen, sysbase); } \ No newline at end of file diff --git a/library/crtend.c b/library/crtend.c index 4914609c..db57f639 100644 --- a/library/crtend.c +++ b/library/crtend.c @@ -1,5 +1,5 @@ /* - * $Id: crtend.c,v 1.3 2023-02-18 21:07:25 clib2devs Exp $ + * $Id: crtend.c,v 1.3 2023-02-18 21:07:25 clib4devs Exp $ */ static void (*__CTOR_LIST__[1])(void) __attribute__((used, section(".ctors"))); diff --git a/library/crypt/crypt.c b/library/crypt/crypt.c index ed7f4bc6..c0dd69e8 100644 --- a/library/crypt/crypt.c +++ b/library/crypt/crypt.c @@ -1,5 +1,5 @@ /* - * $Id: crypt_crypt.c,v 1.00 2022-07-30 12:04:27 clib2devs Exp $ + * $Id: crypt_crypt.c,v 1.00 2022-07-30 12:04:27 clib4devs Exp $ */ #ifndef _UNISTD_HEADERS_H diff --git a/library/crypt/crypt.lib_rev.c b/library/crypt/crypt.lib_rev.c index 3af10024..8e9531ab 100644 --- a/library/crypt/crypt.lib_rev.c +++ b/library/crypt/crypt.lib_rev.c @@ -1,5 +1,5 @@ /* - * $Id: crypt.lib_rev.c,v 1.0 2022-03-14 11:59:23 clib2devs Exp $ + * $Id: crypt.lib_rev.c,v 1.0 2022-03-14 11:59:23 clib4devs Exp $ */ #include "crypt.lib_rev.h" diff --git a/library/crypt/crypt_blowfish.c b/library/crypt/crypt_blowfish.c index ef433433..b0222e3e 100644 --- a/library/crypt/crypt_blowfish.c +++ b/library/crypt/crypt_blowfish.c @@ -1,5 +1,5 @@ /* - * $Id: crypt_crypt_blowfish.c,v 1.00 2022-07-30 12:04:27 clib2devs Exp $ + * $Id: crypt_crypt_blowfish.c,v 1.00 2022-07-30 12:04:27 clib4devs Exp $ */ /* Modified by Rich Felker in for inclusion in musl libc, based on diff --git a/library/crypt/crypt_des.c b/library/crypt/crypt_des.c index 2b71c583..41e47dfa 100644 --- a/library/crypt/crypt_des.c +++ b/library/crypt/crypt_des.c @@ -1,5 +1,5 @@ /* - * $Id: crypt_crypt_des.c,v 1.00 2022-07-30 12:04:27 clib2devs Exp $ + * $Id: crypt_crypt_des.c,v 1.00 2022-07-30 12:04:27 clib4devs Exp $ */ /* diff --git a/library/crypt/crypt_md5.c b/library/crypt/crypt_md5.c index 47008349..e2c8dab4 100644 --- a/library/crypt/crypt_md5.c +++ b/library/crypt/crypt_md5.c @@ -1,5 +1,5 @@ /* - * $Id: crypt_crypt_md5.c,v 1.00 2022-07-30 12:04:27 clib2devs Exp $ + * $Id: crypt_crypt_md5.c,v 1.00 2022-07-30 12:04:27 clib4devs Exp $ */ /* diff --git a/library/crypt/crypt_r.c b/library/crypt/crypt_r.c index f05e3cd2..9d29afb5 100644 --- a/library/crypt/crypt_r.c +++ b/library/crypt/crypt_r.c @@ -1,5 +1,5 @@ /* - * $Id: crypt_crypt_r.c,v 1.00 2022-07-30 12:04:27 clib2devs Exp $ + * $Id: crypt_crypt_r.c,v 1.00 2022-07-30 12:04:27 clib4devs Exp $ */ #ifndef _UNISTD_HEADERS_H diff --git a/library/crypt/crypt_sha256.c b/library/crypt/crypt_sha256.c index 5b9a00ad..42ab925e 100644 --- a/library/crypt/crypt_sha256.c +++ b/library/crypt/crypt_sha256.c @@ -1,5 +1,5 @@ /* - * $Id: crypt_crypt_sha256.c,v 1.00 2022-07-30 12:04:27 clib2devs Exp $ + * $Id: crypt_crypt_sha256.c,v 1.00 2022-07-30 12:04:27 clib4devs Exp $ */ /* diff --git a/library/crypt/crypt_sha512.c b/library/crypt/crypt_sha512.c index ef11cfe1..ce151427 100644 --- a/library/crypt/crypt_sha512.c +++ b/library/crypt/crypt_sha512.c @@ -1,5 +1,5 @@ /* - * $Id: crypt_crypt_sha512.c,v 1.00 2022-07-30 12:04:27 clib2devs Exp $ + * $Id: crypt_crypt_sha512.c,v 1.00 2022-07-30 12:04:27 clib4devs Exp $ */ /* diff --git a/library/crypt/encrypt.c b/library/crypt/encrypt.c index c88ab2ae..be3b12c9 100644 --- a/library/crypt/encrypt.c +++ b/library/crypt/encrypt.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_encrypt.c,v 1.0 2022-08-06 10:36:26 clib2devs Exp $ + * $Id: stdlib_encrypt.c,v 1.0 2022-08-06 10:36:26 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H diff --git a/library/ctype/ctype_headers.h b/library/ctype/ctype_headers.h index 0730dfcd..8836326e 100755 --- a/library/ctype/ctype_headers.h +++ b/library/ctype/ctype_headers.h @@ -1,5 +1,5 @@ /* - * $Id: ctype_headers.h,v 1.6 2006-01-08 12:04:22 clib2devs Exp $ + * $Id: ctype_headers.h,v 1.6 2006-01-08 12:04:22 clib4devs Exp $ */ #ifndef _CTYPE_HEADERS_H diff --git a/library/ctype/isalnum.c b/library/ctype/isalnum.c index af8be382..2b09b3b4 100644 --- a/library/ctype/isalnum.c +++ b/library/ctype/isalnum.c @@ -1,5 +1,5 @@ /* - * $Id: ctype_isalnum.c,v 1.5 2006-01-08 12:04:22 clib2devs Exp $ + * $Id: ctype_isalnum.c,v 1.5 2006-01-08 12:04:22 clib4devs Exp $ */ #ifndef _CTYPE_HEADERS_H @@ -14,28 +14,28 @@ int isalnum(int c) { DECLARE_LOCALEBASE(); int result; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); SHOWVALUE(c); - __locale_lock(__clib2); + __locale_lock(__clib4); - if (__clib2->__locale_table[LC_CTYPE] != NULL) { + if (__clib4->__locale_table[LC_CTYPE] != NULL) { assert(LocaleBase != NULL); /* The parameter must be either EOF or in the range of an 'unsigned char'. If it's not, then the behaviour is undefined. */ if (c != EOF && ((0 <= c && c <= UCHAR_MAX) || ((c + 256) <= UCHAR_MAX))) - result = IsAlNum(__clib2->__locale_table[LC_CTYPE], (ULONG)(c & 255)); + result = IsAlNum(__clib4->__locale_table[LC_CTYPE], (ULONG)(c & 255)); else result = FALSE; } else { result = isalpha(c) || isdigit(c); } - __locale_unlock(__clib2); + __locale_unlock(__clib4); RETURN(result); return (result); diff --git a/library/ctype/isalpha.c b/library/ctype/isalpha.c index a95d2646..fe38102e 100644 --- a/library/ctype/isalpha.c +++ b/library/ctype/isalpha.c @@ -1,5 +1,5 @@ /* - * $Id: ctype_isalpha.c,v 1.5 2006-01-08 12:04:22 clib2devs Exp $ + * $Id: ctype_isalpha.c,v 1.5 2006-01-08 12:04:22 clib4devs Exp $ */ #ifndef _CTYPE_HEADERS_H @@ -13,21 +13,21 @@ int isalpha(int c) { DECLARE_LOCALEBASE(); int result; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); SHOWVALUE(c); - __locale_lock(__clib2); + __locale_lock(__clib4); - if (__clib2->__locale_table[LC_CTYPE] != NULL) { + if (__clib4->__locale_table[LC_CTYPE] != NULL) { assert(LocaleBase != NULL); /* The parameter must be either EOF or in the range of an 'unsigned char'. If it's not, then the behaviour is undefined. */ if (c != EOF && ((0 <= c && c <= UCHAR_MAX) || ((c + 256) <= UCHAR_MAX))) - result = IsAlpha(__clib2->__locale_table[LC_CTYPE], (ULONG)(c & 255)); + result = IsAlpha(__clib4->__locale_table[LC_CTYPE], (ULONG)(c & 255)); else result = FALSE; } else { @@ -35,7 +35,7 @@ isalpha(int c) { ('A' <= c && c <= 'Z')); } - __locale_unlock(__clib2); + __locale_unlock(__clib4); RETURN(result); return (result); diff --git a/library/ctype/isascii.c b/library/ctype/isascii.c index 3267bdbc..f4fe711d 100644 --- a/library/ctype/isascii.c +++ b/library/ctype/isascii.c @@ -1,5 +1,5 @@ /* - * $Id: ctype_isascii.c,v 1.4 2021-02-10 23:46:22 clib2devs Exp $ + * $Id: ctype_isascii.c,v 1.4 2021-02-10 23:46:22 clib4devs Exp $ */ #ifndef _CTYPE_HEADERS_H diff --git a/library/ctype/isblank.c b/library/ctype/isblank.c index e2c8e850..f09bd099 100644 --- a/library/ctype/isblank.c +++ b/library/ctype/isblank.c @@ -1,5 +1,5 @@ /* - * $Id: ctype_isblank.c,v 1.3 2006-01-08 12:04:22 clib2devs Exp $ + * $Id: ctype_isblank.c,v 1.3 2006-01-08 12:04:22 clib4devs Exp $ */ #ifndef _CTYPE_HEADERS_H diff --git a/library/ctype/iscntrl.c b/library/ctype/iscntrl.c index 5262f3fc..cd679dde 100644 --- a/library/ctype/iscntrl.c +++ b/library/ctype/iscntrl.c @@ -1,5 +1,5 @@ /* - * $Id: ctype_iscntrl.c,v 1.5 2006-01-08 12:04:22 clib2devs Exp $ + * $Id: ctype_iscntrl.c,v 1.5 2006-01-08 12:04:22 clib4devs Exp $ */ #ifndef _CTYPE_HEADERS_H @@ -12,28 +12,28 @@ int iscntrl(int c) { DECLARE_LOCALEBASE(); int result; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); SHOWVALUE(c); - __locale_lock(__clib2); + __locale_lock(__clib4); - if (__clib2->__locale_table[LC_CTYPE] != NULL) { + if (__clib4->__locale_table[LC_CTYPE] != NULL) { assert(LocaleBase != NULL); /* The parameter must be either EOF or in the range of an 'unsigned char'. If it's not, then the behaviour is undefined. */ if (c != EOF && ((0 <= c && c <= UCHAR_MAX) || ((c + 256) <= UCHAR_MAX))) - result = IsCntrl(__clib2->__locale_table[LC_CTYPE], (ULONG)(c & 255)); + result = IsCntrl(__clib4->__locale_table[LC_CTYPE], (ULONG)(c & 255)); else result = FALSE; } else { result = (('\0' <= c && c < ' ') || (c == 127)); } - __locale_unlock(__clib2); + __locale_unlock(__clib4); RETURN(result); return (result); diff --git a/library/ctype/isdigit.c b/library/ctype/isdigit.c index 23743643..fb95eea7 100644 --- a/library/ctype/isdigit.c +++ b/library/ctype/isdigit.c @@ -1,5 +1,5 @@ /* - * $Id: ctype_isdigit.c,v 1.5 2006-01-08 12:04:22 clib2devs Exp $ + * $Id: ctype_isdigit.c,v 1.5 2006-01-08 12:04:22 clib4devs Exp $ */ #ifndef _CTYPE_HEADERS_H @@ -12,28 +12,28 @@ int isdigit(int c) { DECLARE_LOCALEBASE(); int result; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); SHOWVALUE(c); - __locale_lock(__clib2); + __locale_lock(__clib4); - if (__clib2->__locale_table[LC_CTYPE] != NULL) { + if (__clib4->__locale_table[LC_CTYPE] != NULL) { assert(LocaleBase != NULL); /* The parameter must be either EOF or in the range of an 'unsigned char'. If it's not, then the behaviour is undefined. */ if (c != EOF && ((0 <= c && c <= UCHAR_MAX) || ((c + 256) <= UCHAR_MAX))) - result = IsDigit(__clib2->__locale_table[LC_CTYPE], (ULONG)(c & 255)); + result = IsDigit(__clib4->__locale_table[LC_CTYPE], (ULONG)(c & 255)); else result = FALSE; } else { result = ('0' <= c && c <= '9'); } - __locale_unlock(__clib2); + __locale_unlock(__clib4); RETURN(result); return (result); diff --git a/library/ctype/isgraph.c b/library/ctype/isgraph.c index 72238f85..83dd8a94 100644 --- a/library/ctype/isgraph.c +++ b/library/ctype/isgraph.c @@ -1,5 +1,5 @@ /* - * $Id: ctype_isgraph.c,v 1.5 2006-01-08 12:04:22 clib2devs Exp $ + * $Id: ctype_isgraph.c,v 1.5 2006-01-08 12:04:22 clib4devs Exp $ */ #ifndef _CTYPE_HEADERS_H @@ -12,28 +12,28 @@ int isgraph(int c) { DECLARE_LOCALEBASE(); int result; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); SHOWVALUE(c); - __locale_lock(__clib2); + __locale_lock(__clib4); - if (__clib2->__locale_table[LC_CTYPE] != NULL) { + if (__clib4->__locale_table[LC_CTYPE] != NULL) { assert(LocaleBase != NULL); /* The parameter must be either EOF or in the range of an 'unsigned char'. If it's not, then the behaviour is undefined. */ if (c != EOF && ((0 <= c && c <= UCHAR_MAX) || ((c + 256) <= UCHAR_MAX))) - result = IsGraph(__clib2->__locale_table[LC_CTYPE], (ULONG)(c & 255)); + result = IsGraph(__clib4->__locale_table[LC_CTYPE], (ULONG)(c & 255)); else result = FALSE; } else { result = (' ' < c && c < 127); } - __locale_unlock(__clib2); + __locale_unlock(__clib4); RETURN(result); return (result); diff --git a/library/ctype/islower.c b/library/ctype/islower.c index 2280a355..8791e860 100644 --- a/library/ctype/islower.c +++ b/library/ctype/islower.c @@ -1,5 +1,5 @@ /* - * $Id: ctype_islower.c,v 1.5 2006-01-08 12:04:22 clib2devs Exp $ + * $Id: ctype_islower.c,v 1.5 2006-01-08 12:04:22 clib4devs Exp $ */ #ifndef _CTYPE_HEADERS_H @@ -12,28 +12,28 @@ int islower(int c) { DECLARE_LOCALEBASE(); int result; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); SHOWVALUE(c); - __locale_lock(__clib2); + __locale_lock(__clib4); - if (__clib2->__locale_table[LC_CTYPE] != NULL) { + if (__clib4->__locale_table[LC_CTYPE] != NULL) { assert(LocaleBase != NULL); /* The parameter must be either EOF or in the range of an 'unsigned char'. If it's not, then the behaviour is undefined. */ if (c != EOF && ((0 <= c && c <= UCHAR_MAX) || ((c + 256) <= UCHAR_MAX))) - result = IsLower(__clib2->__locale_table[LC_CTYPE], (ULONG)(c & 255)); + result = IsLower(__clib4->__locale_table[LC_CTYPE], (ULONG)(c & 255)); else result = FALSE; } else { result = ('a' <= c && c <= 'z'); } - __locale_unlock(__clib2); + __locale_unlock(__clib4); RETURN(result); return (result); diff --git a/library/ctype/isprint.c b/library/ctype/isprint.c index 9e335716..7660e7d8 100644 --- a/library/ctype/isprint.c +++ b/library/ctype/isprint.c @@ -1,5 +1,5 @@ /* - * $Id: ctype_isprint.c,v 1.5 2006-01-08 12:04:22 clib2devs Exp $ + * $Id: ctype_isprint.c,v 1.5 2006-01-08 12:04:22 clib4devs Exp $ */ #ifndef _CTYPE_HEADERS_H @@ -12,28 +12,28 @@ int isprint(int c) { DECLARE_LOCALEBASE(); int result; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); SHOWVALUE(c); - __locale_lock(__clib2); + __locale_lock(__clib4); - if (__clib2->__locale_table[LC_CTYPE] != NULL) { + if (__clib4->__locale_table[LC_CTYPE] != NULL) { assert(LocaleBase != NULL); /* The parameter must be either EOF or in the range of an 'unsigned char'. If it's not, then the behaviour is undefined. */ if (c != EOF && ((0 <= c && c <= UCHAR_MAX) || ((c + 256) <= UCHAR_MAX))) - result = IsPrint(__clib2->__locale_table[LC_CTYPE], (ULONG)(c & 255)); + result = IsPrint(__clib4->__locale_table[LC_CTYPE], (ULONG)(c & 255)); else result = FALSE; } else { result = (' ' <= c && c <= '~'); } - __locale_unlock(__clib2); + __locale_unlock(__clib4); RETURN(result); return (result); diff --git a/library/ctype/ispunct.c b/library/ctype/ispunct.c index 269ce004..52321b62 100644 --- a/library/ctype/ispunct.c +++ b/library/ctype/ispunct.c @@ -1,5 +1,5 @@ /* - * $Id: ctype_ispunct.c,v 1.5 2006-01-08 12:04:22 clib2devs Exp $ + * $Id: ctype_ispunct.c,v 1.5 2006-01-08 12:04:22 clib4devs Exp $ */ #ifndef _CTYPE_HEADERS_H @@ -12,21 +12,21 @@ int ispunct(int c) { DECLARE_LOCALEBASE(); int result; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); SHOWVALUE(c); - __locale_lock(__clib2); + __locale_lock(__clib4); - if (__clib2->__locale_table[LC_CTYPE] != NULL) { + if (__clib4->__locale_table[LC_CTYPE] != NULL) { assert(LocaleBase != NULL); /* The parameter must be either EOF or in the range of an 'unsigned char'. If it's not, then the behaviour is undefined. */ if (c != EOF && ((0 <= c && c <= UCHAR_MAX) || ((c + 256) <= UCHAR_MAX))) - result = IsPunct(__clib2->__locale_table[LC_CTYPE], (ULONG)(c & 255)); + result = IsPunct(__clib4->__locale_table[LC_CTYPE], (ULONG)(c & 255)); else result = FALSE; } else { @@ -36,7 +36,7 @@ ispunct(int c) { ('{' <= c && c <= '~')); } - __locale_unlock(__clib2); + __locale_unlock(__clib4); RETURN(result); return (result); diff --git a/library/ctype/isspace.c b/library/ctype/isspace.c index afa29c2b..91257431 100644 --- a/library/ctype/isspace.c +++ b/library/ctype/isspace.c @@ -1,5 +1,5 @@ /* - * $Id: ctype_isspace.c,v 1.5 2006-01-08 12:04:22 clib2devs Exp $ + * $Id: ctype_isspace.c,v 1.5 2006-01-08 12:04:22 clib4devs Exp $ */ #ifndef _CTYPE_HEADERS_H @@ -12,21 +12,21 @@ int isspace(int c) { DECLARE_LOCALEBASE(); int result; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); SHOWVALUE(c); - __locale_lock(__clib2); + __locale_lock(__clib4); - if (__clib2->__locale_table[LC_CTYPE] != NULL) { + if (__clib4->__locale_table[LC_CTYPE] != NULL) { assert(LocaleBase != NULL); /* The parameter must be either EOF or in the range of an 'unsigned char'. If it's not, then the behaviour is undefined. */ if (c != EOF && ((0 <= c && c <= UCHAR_MAX) || ((c + 256) <= UCHAR_MAX))) - result = IsSpace(__clib2->__locale_table[LC_CTYPE], (ULONG)(c & 255)); + result = IsSpace(__clib4->__locale_table[LC_CTYPE], (ULONG)(c & 255)); else result = FALSE; } else { @@ -38,7 +38,7 @@ isspace(int c) { c == ' '); } - __locale_unlock(__clib2); + __locale_unlock(__clib4); RETURN(result); return (result); diff --git a/library/ctype/isupper.c b/library/ctype/isupper.c index f8049550..21d72470 100644 --- a/library/ctype/isupper.c +++ b/library/ctype/isupper.c @@ -1,5 +1,5 @@ /* - * $Id: ctype_isupper.c,v 1.5 2006-01-08 12:04:22 clib2devs Exp $ + * $Id: ctype_isupper.c,v 1.5 2006-01-08 12:04:22 clib4devs Exp $ */ #ifndef _CTYPE_HEADERS_H @@ -12,28 +12,28 @@ int isupper(int c) { DECLARE_LOCALEBASE(); int result; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); SHOWVALUE(c); - __locale_lock(__clib2); + __locale_lock(__clib4); - if (__clib2->__locale_table[LC_CTYPE] != NULL) { + if (__clib4->__locale_table[LC_CTYPE] != NULL) { assert(LocaleBase != NULL); /* The parameter must be either EOF or in the range of an 'unsigned char'. If it's not, then the behaviour is undefined. */ if (c != EOF && ((0 <= c && c <= UCHAR_MAX) || ((c + 256) <= UCHAR_MAX))) - result = IsUpper(__clib2->__locale_table[LC_CTYPE], (ULONG)(c & 255)); + result = IsUpper(__clib4->__locale_table[LC_CTYPE], (ULONG)(c & 255)); else result = FALSE; } else { result = ('A' <= c && c <= 'Z'); } - __locale_unlock(__clib2); + __locale_unlock(__clib4); RETURN(result); return (result); diff --git a/library/ctype/isxdigit.c b/library/ctype/isxdigit.c index d3ffeadb..80d66b74 100644 --- a/library/ctype/isxdigit.c +++ b/library/ctype/isxdigit.c @@ -1,5 +1,5 @@ /* - * $Id: ctype_isxdigit.c,v 1.5 2006-01-08 12:04:22 clib2devs Exp $ + * $Id: ctype_isxdigit.c,v 1.5 2006-01-08 12:04:22 clib4devs Exp $ */ #ifndef _CTYPE_HEADERS_H @@ -12,21 +12,21 @@ int isxdigit(int c) { DECLARE_LOCALEBASE(); int result; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); SHOWVALUE(c); - __locale_lock(__clib2); + __locale_lock(__clib4); - if (__clib2->__locale_table[LC_CTYPE] != NULL) { + if (__clib4->__locale_table[LC_CTYPE] != NULL) { assert(LocaleBase != NULL); /* The parameter must be either EOF or in the range of an 'unsigned char'. If it's not, then the behaviour is undefined. */ if (c != EOF && ((0 <= c && c <= UCHAR_MAX) || ((c + 256) <= UCHAR_MAX))) - result = IsXDigit(__clib2->__locale_table[LC_CTYPE], (ULONG)(c & 255)); + result = IsXDigit(__clib4->__locale_table[LC_CTYPE], (ULONG)(c & 255)); else result = FALSE; } else { @@ -35,7 +35,7 @@ isxdigit(int c) { ('A' <= c && c <= 'F')); } - __locale_unlock(__clib2); + __locale_unlock(__clib4); RETURN(result); return (result); diff --git a/library/ctype/toascii.c b/library/ctype/toascii.c index 85731ea9..c55d656b 100644 --- a/library/ctype/toascii.c +++ b/library/ctype/toascii.c @@ -1,5 +1,5 @@ /* - * $Id: ctype_toascii.c,v 1.0 2021-02-10 23:51:22 clib2devs Exp $ + * $Id: ctype_toascii.c,v 1.0 2021-02-10 23:51:22 clib4devs Exp $ */ #undef __STRICT_ANSI__ diff --git a/library/ctype/tolower.c b/library/ctype/tolower.c index 21dd9993..6518d11b 100644 --- a/library/ctype/tolower.c +++ b/library/ctype/tolower.c @@ -1,5 +1,5 @@ /* - * $Id: ctype_tolower.c,v 1.5 2006-01-08 12:04:22 clib2devs Exp $ + * $Id: ctype_tolower.c,v 1.5 2006-01-08 12:04:22 clib4devs Exp $ */ #ifndef _CTYPE_HEADERS_H @@ -10,25 +10,25 @@ int tolower(int c) { DECLARE_LOCALEBASE(); int result; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; - __locale_lock(__clib2); + __locale_lock(__clib4); - if (__clib2->__locale_table[LC_CTYPE] != NULL) { + if (__clib4->__locale_table[LC_CTYPE] != NULL) { assert(LocaleBase != NULL); /* The parameter must be either EOF or in the range of an 'unsigned char'. If it's not, then the behaviour is undefined. */ if (c != EOF && ((0 <= c && c <= UCHAR_MAX) || ((c + 256) <= UCHAR_MAX))) - result = ConvToLower(__clib2->__locale_table[LC_CTYPE], (ULONG)(c & 255)); + result = ConvToLower(__clib4->__locale_table[LC_CTYPE], (ULONG)(c & 255)); else result = c; } else { result = ('A' <= c && c <= 'Z') ? (c + ('a' - 'A')) : c; } - __locale_unlock(__clib2); + __locale_unlock(__clib4); return (result); } diff --git a/library/ctype/toupper.c b/library/ctype/toupper.c index dfe28add..7bbee230 100644 --- a/library/ctype/toupper.c +++ b/library/ctype/toupper.c @@ -1,5 +1,5 @@ /* - * $Id: ctype_toupper.c,v 1.5 2006-01-08 12:04:22 clib2devs Exp $ + * $Id: ctype_toupper.c,v 1.5 2006-01-08 12:04:22 clib4devs Exp $ */ #ifndef _CTYPE_HEADERS_H @@ -10,25 +10,25 @@ int toupper(int c) { DECLARE_LOCALEBASE(); int result; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; - __locale_lock(__clib2); + __locale_lock(__clib4); - if (__clib2->__locale_table[LC_CTYPE] != NULL) { + if (__clib4->__locale_table[LC_CTYPE] != NULL) { assert(LocaleBase != NULL); /* The parameter must be either EOF or in the range of an 'unsigned char'. If it's not, then the behaviour is undefined. */ if (c != EOF && ((0 <= c && c <= UCHAR_MAX) || ((c + 256) <= UCHAR_MAX))) - result = ConvToUpper(__clib2->__locale_table[LC_CTYPE], (ULONG)(c & 255)); + result = ConvToUpper(__clib4->__locale_table[LC_CTYPE], (ULONG)(c & 255)); else result = c; } else { result = ('a' <= c && c <= 'z') ? (c - ('a' - 'A')) : c; } - __locale_unlock(__clib2); + __locale_unlock(__clib4); return (result); } diff --git a/library/debug/cmpstrexec.c b/library/debug/cmpstrexec.c index 6d38624f..5494da3a 100644 --- a/library/debug/cmpstrexec.c +++ b/library/debug/cmpstrexec.c @@ -1,5 +1,5 @@ /* - * $Id: debug_cmpstrexec.c,v 1.3 2006-01-08 12:04:22 clib2devs Exp $ + * $Id: debug_cmpstrexec.c,v 1.3 2006-01-08 12:04:22 clib4devs Exp $ */ #include "debug_headers.h" diff --git a/library/debug/debug.c b/library/debug/debug.c index 621d006b..7cd7ca5a 100755 --- a/library/debug/debug.c +++ b/library/debug/debug.c @@ -1,5 +1,5 @@ /* - * $Id: debug.c,v 1.6 2006-09-25 14:51:15 clib2devs Exp $ + * $Id: debug.c,v 1.6 2006-09-25 14:51:15 clib4devs Exp $ * * :ts=8 * @@ -54,49 +54,49 @@ extern void KPutFmt(const char *format, va_list arg); int _SETDEBUGLEVEL(int level) { - struct _clib2 *__clib2 = __CLIB2; - if (__clib2 == NULL) + struct _clib4 *__clib4 = __CLIB4; + if (__clib4 == NULL) return DEBUGLEVEL_CallTracing; - int old_level = __clib2->__debug_level; + int old_level = __clib4->__debug_level; - __clib2->__debug_level = level; + __clib4->__debug_level = level; return (old_level); } int _GETDEBUGLEVEL(void) { - struct _clib2 *__clib2 = __CLIB2; - if (__clib2 == NULL) + struct _clib4 *__clib4 = __CLIB4; + if (__clib4 == NULL) return DEBUGLEVEL_CallTracing; - return (__clib2->__debug_level); + return (__clib4->__debug_level); } static void _INDENT(void) { - struct _clib2 *__clib2 = __CLIB2; - if (__clib2 == NULL) + struct _clib4 *__clib4 = __CLIB4; + if (__clib4 == NULL) return; - KPrintF("(%s) ", __clib2->__progname); + KPrintF("(%s) ", __clib4->__progname); - if (__clib2->__debug_level >= DEBUGLEVEL_CallTracing) { + if (__clib4->__debug_level >= DEBUGLEVEL_CallTracing) { int i; - for (i = 0; i < __clib2->indent_level; i++) + for (i = 0; i < __clib4->indent_level; i++) KPrintF(" "); } } void _SHOWVALUE(unsigned long value, int size, const char *name, const char *file, int line) { - struct _clib2 *__clib2 = __CLIB2; - if (__clib2 == NULL) + struct _clib4 *__clib4 = __CLIB4; + if (__clib4 == NULL) return; - if (__clib2->__debug_level >= DEBUGLEVEL_Reports) { + if (__clib4->__debug_level >= DEBUGLEVEL_Reports) { const char *fmt; switch (size) { @@ -133,11 +133,11 @@ _SHOWVALUE(unsigned long value, int size, const char *name, const char *file, in void _SHOWPOINTER(const void *pointer, const char *name, const char *file, int line) { - struct _clib2 *__clib2 = __CLIB2; - if (__clib2 == NULL) + struct _clib4 *__clib4 = __CLIB4; + if (__clib4 == NULL) return; - if (__clib2->__debug_level >= DEBUGLEVEL_Reports) { + if (__clib4->__debug_level >= DEBUGLEVEL_Reports) { const char *fmt; _INDENT(); @@ -153,11 +153,11 @@ _SHOWPOINTER(const void *pointer, const char *name, const char *file, int line) void _SHOWSTRING(const char *string, const char *name, const char *file, int line) { - struct _clib2 *__clib2 = __CLIB2; - if (__clib2 == NULL) + struct _clib4 *__clib4 = __CLIB4; + if (__clib4 == NULL) return; - if (__clib2->__debug_level >= DEBUGLEVEL_Reports) { + if (__clib4->__debug_level >= DEBUGLEVEL_Reports) { _INDENT(); KPrintF("%s:%ld:%s = 0x%08lx \"%s\"\n", file, line, name, string, string); } @@ -165,11 +165,11 @@ _SHOWSTRING(const char *string, const char *name, const char *file, int line) { void _SHOWWSTRING(const wchar_t *string, const char *name, const char *file, int line) { - struct _clib2 *__clib2 = __CLIB2; - if (__clib2 == NULL) + struct _clib4 *__clib4 = __CLIB4; + if (__clib4 == NULL) return; - if (__clib2->__debug_level >= DEBUGLEVEL_Reports) { + if (__clib4->__debug_level >= DEBUGLEVEL_Reports) { _INDENT(); char buf[BUFSIZ] = {0}; char *ptr = (char *) &buf; @@ -183,11 +183,11 @@ _SHOWWSTRING(const wchar_t *string, const char *name, const char *file, int line void _SHOWMSG(const char *string, const char *file, int line) { - struct _clib2 *__clib2 = __CLIB2; - if (__clib2 == NULL) + struct _clib4 *__clib4 = __CLIB4; + if (__clib4 == NULL) return; - if (__clib2->__debug_level >= DEBUGLEVEL_Reports) { + if (__clib4->__debug_level >= DEBUGLEVEL_Reports) { _INDENT(); KPrintF("%s:%ld:%s\n", file, line, string); } @@ -195,11 +195,11 @@ _SHOWMSG(const char *string, const char *file, int line) { void _DPRINTF_HEADER(const char *file, int line) { - struct _clib2 *__clib2 = __CLIB2; - if (__clib2 == NULL) + struct _clib4 *__clib4 = __CLIB4; + if (__clib4 == NULL) return; - if (__clib2->__debug_level >= DEBUGLEVEL_Reports) { + if (__clib4->__debug_level >= DEBUGLEVEL_Reports) { _INDENT(); KPrintF("%s:%ld:", file, line); } @@ -207,11 +207,11 @@ _DPRINTF_HEADER(const char *file, int line) { void _DPRINTF(const char *fmt, ...) { - struct _clib2 *__clib2 = __CLIB2; - if (__clib2 == NULL) + struct _clib4 *__clib4 = __CLIB4; + if (__clib4 == NULL) return; - if (__clib2->__debug_level >= DEBUGLEVEL_Reports) { + if (__clib4->__debug_level >= DEBUGLEVEL_Reports) { va_list args; va_start(args, fmt); @@ -224,11 +224,11 @@ _DPRINTF(const char *fmt, ...) { void _DLOG(const char *fmt, ...) { - struct _clib2 *__clib2 = __CLIB2; - if (__clib2 == NULL) + struct _clib4 *__clib4 = __CLIB4; + if (__clib4 == NULL) return; - if (__clib2->__debug_level >= DEBUGLEVEL_Reports) { + if (__clib4->__debug_level >= DEBUGLEVEL_Reports) { va_list args; va_start(args, fmt); @@ -239,27 +239,27 @@ _DLOG(const char *fmt, ...) { void _ENTER(const char *file, int line, const char *function) { - struct _clib2 *__clib2 = __CLIB2; - if (__clib2 == NULL) + struct _clib4 *__clib4 = __CLIB4; + if (__clib4 == NULL) return; - if (__clib2->__debug_level >= DEBUGLEVEL_CallTracing) { + if (__clib4->__debug_level >= DEBUGLEVEL_CallTracing) { _INDENT(); KPrintF("%s:%ld:Entering %s\n", file, line, function); } - __clib2->indent_level++; + __clib4->indent_level++; } void _LEAVE(const char *file, int line, const char *function) { - struct _clib2 *__clib2 = __CLIB2; - if (__clib2 == NULL) + struct _clib4 *__clib4 = __CLIB4; + if (__clib4 == NULL) return; - __clib2->indent_level--; + __clib4->indent_level--; - if (__clib2->__debug_level >= DEBUGLEVEL_CallTracing) { + if (__clib4->__debug_level >= DEBUGLEVEL_CallTracing) { _INDENT(); KPrintF("%s:%ld: Leaving %s\n", file, line, function); } @@ -267,13 +267,13 @@ _LEAVE(const char *file, int line, const char *function) { void _RETURN(const char *file, int line, const char *function, unsigned long result) { - struct _clib2 *__clib2 = __CLIB2; - if (__clib2 == NULL) + struct _clib4 *__clib4 = __CLIB4; + if (__clib4 == NULL) return; - __clib2->indent_level--; + __clib4->indent_level--; - if (__clib2->__debug_level >= DEBUGLEVEL_CallTracing) { + if (__clib4->__debug_level >= DEBUGLEVEL_CallTracing) { _INDENT(); KPrintF("%s:%ld: Leaving %s (result 0x%08lx, %ld)\n", file, line, function, result, result); } diff --git a/library/debug/debug.h b/library/debug/debug.h index 6ad0d7fe..17b7000a 100755 --- a/library/debug/debug.h +++ b/library/debug/debug.h @@ -1,5 +1,5 @@ /* - * $Id: debug.h,v 1.4 2006-01-08 12:04:22 clib2devs Exp $ + * $Id: debug.h,v 1.4 2006-01-08 12:04:22 clib4devs Exp $ * * :ts=8 * @@ -98,7 +98,7 @@ _SETDEBUGLEVEL(2), \ kprintf("[%s] " \ "%s:%ld: failed assertion '%s'\n", \ - __CLIB2->__progname, \ + __CLIB4->__progname, \ __FILE__, \ __LINE__, \ #expression), \ diff --git a/library/debug/debug.lib_rev.c b/library/debug/debug.lib_rev.c index 9d68f411..974537d6 100644 --- a/library/debug/debug.lib_rev.c +++ b/library/debug/debug.lib_rev.c @@ -1,5 +1,5 @@ /* - * $Id: debug.lib_rev.c,v 1.0 2022-03-14 11:59:23 clib2devs Exp $ + * $Id: debug.lib_rev.c,v 1.0 2022-03-14 11:59:23 clib4devs Exp $ */ #include "debug.lib_rev.h" diff --git a/library/debug/debug_headers.h b/library/debug/debug_headers.h index f47eeb70..fa414e38 100755 --- a/library/debug/debug_headers.h +++ b/library/debug/debug_headers.h @@ -1,5 +1,5 @@ /* - * $Id: debug_headers.h,v 1.4 2006-01-08 12:04:22 clib2devs Exp $ + * $Id: debug_headers.h,v 1.4 2006-01-08 12:04:22 clib4devs Exp $ */ #ifndef _DEBUG_HEADERS_H diff --git a/library/debug/kcmpstr.c b/library/debug/kcmpstr.c index 89d465a8..d7530d2d 100644 --- a/library/debug/kcmpstr.c +++ b/library/debug/kcmpstr.c @@ -1,5 +1,5 @@ /* - * $Id: debug_kcmpstr.c,v 1.3 2006-01-08 12:04:22 clib2devs Exp $ + * $Id: debug_kcmpstr.c,v 1.3 2006-01-08 12:04:22 clib4devs Exp $ */ #include "debug_headers.h" diff --git a/library/debug/kdofmt.c b/library/debug/kdofmt.c index 5eb598fc..36471135 100644 --- a/library/debug/kdofmt.c +++ b/library/debug/kdofmt.c @@ -1,5 +1,5 @@ /* - * $Id: debug_kdofmt.c,v 1.3 2006-01-08 12:04:22 clib2devs Exp $ + * $Id: debug_kdofmt.c,v 1.3 2006-01-08 12:04:22 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H diff --git a/library/debug/kgetc.c b/library/debug/kgetc.c index dc6cb9c8..321c1b9e 100644 --- a/library/debug/kgetc.c +++ b/library/debug/kgetc.c @@ -1,5 +1,5 @@ /* - * $Id: debug_kgetc.c,v 1.3 2006-01-08 12:04:22 clib2devs Exp $ + * $Id: debug_kgetc.c,v 1.3 2006-01-08 12:04:22 clib4devs Exp $ */ #include "debug_headers.h" diff --git a/library/debug/kgetch1.c b/library/debug/kgetch1.c index bd8da301..82bc73b3 100644 --- a/library/debug/kgetch1.c +++ b/library/debug/kgetch1.c @@ -1,5 +1,5 @@ /* - * $Id: debug_kgetch1.c,v 1.3 2006-01-08 12:04:22 clib2devs Exp $ + * $Id: debug_kgetch1.c,v 1.3 2006-01-08 12:04:22 clib4devs Exp $ */ #include "debug_headers.h" diff --git a/library/debug/kgetch2.c b/library/debug/kgetch2.c index 700db3a9..c7b8c2c1 100644 --- a/library/debug/kgetch2.c +++ b/library/debug/kgetch2.c @@ -1,5 +1,5 @@ /* - * $Id: debug_kgetch2.c,v 1.3 2006-01-08 12:04:22 clib2devs Exp $ + * $Id: debug_kgetch2.c,v 1.3 2006-01-08 12:04:22 clib4devs Exp $ */ #include "debug_headers.h" diff --git a/library/debug/kgetchar1.c b/library/debug/kgetchar1.c index 982d10f3..3172dd41 100644 --- a/library/debug/kgetchar1.c +++ b/library/debug/kgetchar1.c @@ -1,5 +1,5 @@ /* - * $Id: debug_kgetchar1.c,v 1.3 2006-01-08 12:04:22 clib2devs Exp $ + * $Id: debug_kgetchar1.c,v 1.3 2006-01-08 12:04:22 clib4devs Exp $ */ #include "debug_headers.h" diff --git a/library/debug/kgetchar2.c b/library/debug/kgetchar2.c index 601d0ea6..85a83d99 100644 --- a/library/debug/kgetchar2.c +++ b/library/debug/kgetchar2.c @@ -1,5 +1,5 @@ /* - * $Id: debug_kgetchar2.c,v 1.3 2006-01-08 12:04:22 clib2devs Exp $ + * $Id: debug_kgetchar2.c,v 1.3 2006-01-08 12:04:22 clib4devs Exp $ */ #include "debug_headers.h" diff --git a/library/debug/kgetnum1.c b/library/debug/kgetnum1.c index 9598edde..722f71b7 100644 --- a/library/debug/kgetnum1.c +++ b/library/debug/kgetnum1.c @@ -1,5 +1,5 @@ /* - * $Id: debug_kgetnum1.c,v 1.3 2006-01-08 12:04:22 clib2devs Exp $ + * $Id: debug_kgetnum1.c,v 1.3 2006-01-08 12:04:22 clib4devs Exp $ */ #include "debug_headers.h" diff --git a/library/debug/kgetnum2.c b/library/debug/kgetnum2.c index ac557c83..fd7447b7 100644 --- a/library/debug/kgetnum2.c +++ b/library/debug/kgetnum2.c @@ -1,5 +1,5 @@ /* - * $Id: debug_kgetnum2.c,v 1.3 2006-01-08 12:04:22 clib2devs Exp $ + * $Id: debug_kgetnum2.c,v 1.3 2006-01-08 12:04:22 clib4devs Exp $ */ #include "debug_headers.h" diff --git a/library/debug/kmaygetch.c b/library/debug/kmaygetch.c index 2078c619..3845048a 100644 --- a/library/debug/kmaygetch.c +++ b/library/debug/kmaygetch.c @@ -1,5 +1,5 @@ /* - * $Id: debug_kmaygetch.c,v 1.3 2006-01-08 12:04:22 clib2devs Exp $ + * $Id: debug_kmaygetch.c,v 1.3 2006-01-08 12:04:22 clib4devs Exp $ */ #include "debug_headers.h" diff --git a/library/debug/kmaygetchar.c b/library/debug/kmaygetchar.c index db6afc20..465a5114 100644 --- a/library/debug/kmaygetchar.c +++ b/library/debug/kmaygetchar.c @@ -1,5 +1,5 @@ /* - * $Id: debug_kmaygetchar.c,v 1.3 2006-01-08 12:04:22 clib2devs Exp $ + * $Id: debug_kmaygetchar.c,v 1.3 2006-01-08 12:04:22 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H diff --git a/library/debug/kprintf1.c b/library/debug/kprintf1.c index 490d7c57..f86319dd 100644 --- a/library/debug/kprintf1.c +++ b/library/debug/kprintf1.c @@ -1,5 +1,5 @@ /* - * $Id: debug_kprintf1.c,v 1.3 2006-01-08 12:04:22 clib2devs Exp $ + * $Id: debug_kprintf1.c,v 1.3 2006-01-08 12:04:22 clib4devs Exp $ */ #include "debug_headers.h" diff --git a/library/debug/kprintf2.c b/library/debug/kprintf2.c index 50c322d4..13c14864 100644 --- a/library/debug/kprintf2.c +++ b/library/debug/kprintf2.c @@ -1,5 +1,5 @@ /* - * $Id: debug_kprintf2.c,v 1.3 2006-01-08 12:04:22 clib2devs Exp $ + * $Id: debug_kprintf2.c,v 1.3 2006-01-08 12:04:22 clib4devs Exp $ */ #include "debug_headers.h" diff --git a/library/debug/kputc.c b/library/debug/kputc.c index b57e3e59..fa7e2234 100644 --- a/library/debug/kputc.c +++ b/library/debug/kputc.c @@ -1,5 +1,5 @@ /* - * $Id: debug_kputc.c,v 1.3 2006-01-08 12:04:22 clib2devs Exp $ + * $Id: debug_kputc.c,v 1.3 2006-01-08 12:04:22 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H diff --git a/library/debug/kputch1.c b/library/debug/kputch1.c index fd722871..8da017fb 100644 --- a/library/debug/kputch1.c +++ b/library/debug/kputch1.c @@ -1,5 +1,5 @@ /* - * $Id: debug_kputch1.c,v 1.3 2006-01-08 12:04:22 clib2devs Exp $ + * $Id: debug_kputch1.c,v 1.3 2006-01-08 12:04:22 clib4devs Exp $ */ #include "debug_headers.h" diff --git a/library/debug/kputch2.c b/library/debug/kputch2.c index 43adf27c..087a5a5c 100644 --- a/library/debug/kputch2.c +++ b/library/debug/kputch2.c @@ -1,5 +1,5 @@ /* - * $Id: debug_kputch2.c,v 1.3 2006-01-08 12:04:22 clib2devs Exp $ + * $Id: debug_kputch2.c,v 1.3 2006-01-08 12:04:22 clib4devs Exp $ */ #include "debug_headers.h" diff --git a/library/debug/kputchar1.c b/library/debug/kputchar1.c index ee45d737..9d698a5a 100644 --- a/library/debug/kputchar1.c +++ b/library/debug/kputchar1.c @@ -1,5 +1,5 @@ /* - * $Id: debug_kputchar1.c,v 1.3 2006-01-08 12:04:22 clib2devs Exp $ + * $Id: debug_kputchar1.c,v 1.3 2006-01-08 12:04:22 clib4devs Exp $ */ #include "debug_headers.h" diff --git a/library/debug/kputchar2.c b/library/debug/kputchar2.c index 9f9e1bc2..b8ac7575 100644 --- a/library/debug/kputchar2.c +++ b/library/debug/kputchar2.c @@ -1,5 +1,5 @@ /* - * $Id: debug_kputchar2.c,v 1.3 2006-01-08 12:04:22 clib2devs Exp $ + * $Id: debug_kputchar2.c,v 1.3 2006-01-08 12:04:22 clib4devs Exp $ */ #include "debug_headers.h" diff --git a/library/debug/kputfmt.c b/library/debug/kputfmt.c index 87af2c81..d896a0f3 100644 --- a/library/debug/kputfmt.c +++ b/library/debug/kputfmt.c @@ -1,5 +1,5 @@ /* - * $Id: debug_kputfmt.c,v 1.4 2006-01-08 12:04:22 clib2devs Exp $ + * $Id: debug_kputfmt.c,v 1.4 2006-01-08 12:04:22 clib4devs Exp $ */ #include "debug_headers.h" diff --git a/library/debug/kputs1.c b/library/debug/kputs1.c index 2d5b07ca..50d6dd6b 100644 --- a/library/debug/kputs1.c +++ b/library/debug/kputs1.c @@ -1,5 +1,5 @@ /* - * $Id: debug_kputs1.c,v 1.3 2006-01-08 12:04:22 clib2devs Exp $ + * $Id: debug_kputs1.c,v 1.3 2006-01-08 12:04:22 clib4devs Exp $ */ #include "debug_headers.h" diff --git a/library/debug/kputs2.c b/library/debug/kputs2.c index fabea632..eaa63e1b 100644 --- a/library/debug/kputs2.c +++ b/library/debug/kputs2.c @@ -1,5 +1,5 @@ /* - * $Id: debug_kputs2.c,v 1.3 2006-01-08 12:04:22 clib2devs Exp $ + * $Id: debug_kputs2.c,v 1.3 2006-01-08 12:04:22 clib4devs Exp $ */ #include "debug_headers.h" diff --git a/library/debug/kputstr1.c b/library/debug/kputstr1.c index c889f735..73643089 100644 --- a/library/debug/kputstr1.c +++ b/library/debug/kputstr1.c @@ -1,5 +1,5 @@ /* - * $Id: debug_kputstr1.c,v 1.3 2006-01-08 12:04:22 clib2devs Exp $ + * $Id: debug_kputstr1.c,v 1.3 2006-01-08 12:04:22 clib4devs Exp $ */ #include "debug_headers.h" diff --git a/library/debug/kputstr2.c b/library/debug/kputstr2.c index ec0d6a8f..277ef6cd 100644 --- a/library/debug/kputstr2.c +++ b/library/debug/kputstr2.c @@ -1,5 +1,5 @@ /* - * $Id: debug_kputstr2.c,v 1.3 2006-01-08 12:04:22 clib2devs Exp $ + * $Id: debug_kputstr2.c,v 1.3 2006-01-08 12:04:22 clib4devs Exp $ */ #include "debug_headers.h" diff --git a/library/debug/kvprintf1.c b/library/debug/kvprintf1.c index 004cf00e..8f5ada6a 100644 --- a/library/debug/kvprintf1.c +++ b/library/debug/kvprintf1.c @@ -1,5 +1,5 @@ /* - * $Id: debug_kvprintf1.c,v 1.3 2006-01-08 12:04:22 clib2devs Exp $ + * $Id: debug_kvprintf1.c,v 1.3 2006-01-08 12:04:22 clib4devs Exp $ */ #include "debug_headers.h" diff --git a/library/debug/kvprintf2.c b/library/debug/kvprintf2.c index b5b586bd..b0ae9c4b 100644 --- a/library/debug/kvprintf2.c +++ b/library/debug/kvprintf2.c @@ -1,5 +1,5 @@ /* - * $Id: debug_kvprintf2.c,v 1.3 2006-01-08 12:04:22 clib2devs Exp $ + * $Id: debug_kvprintf2.c,v 1.3 2006-01-08 12:04:22 clib4devs Exp $ */ #include "debug_headers.h" diff --git a/library/dirent/alphasort.c b/library/dirent/alphasort.c index f4816cf0..6cb7198f 100644 --- a/library/dirent/alphasort.c +++ b/library/dirent/alphasort.c @@ -1,5 +1,5 @@ /* - * $Id: dirent_alphasort.c,v 1.0 2019-03-10 10:59:00 clib2devs Exp $ + * $Id: dirent_alphasort.c,v 1.0 2019-03-10 10:59:00 clib4devs Exp $ */ #include diff --git a/library/dirent/closedir.c b/library/dirent/closedir.c index ed8a6088..800a52ef 100644 --- a/library/dirent/closedir.c +++ b/library/dirent/closedir.c @@ -1,5 +1,5 @@ /* - * $Id: dirent_closedir.c,v 2.0 2023-05-13 12:04:22 clib2devs Exp $ + * $Id: dirent_closedir.c,v 2.0 2023-05-13 12:04:22 clib4devs Exp $ */ #ifndef _DIRENT_HEADERS_H @@ -14,26 +14,26 @@ #include "stdlib_constructor.h" #endif /* _STDLIB_CONSTRUCTOR_H */ -void __dirent_lock(struct _clib2 *__clib2) { - if (__clib2->dirent_lock != NULL) - ObtainSemaphore(__clib2->dirent_lock); +void __dirent_lock(struct _clib4 *__clib4) { + if (__clib4->dirent_lock != NULL) + ObtainSemaphore(__clib4->dirent_lock); } -void __dirent_unlock(struct _clib2 *__clib2) { - if (__clib2->dirent_lock != NULL) - ReleaseSemaphore(__clib2->dirent_lock); +void __dirent_unlock(struct _clib4 *__clib4) { + if (__clib4->dirent_lock != NULL) + ReleaseSemaphore(__clib4->dirent_lock); } CLIB_CONSTRUCTOR(dirent_init) { BOOL success = FALSE; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); - NewList((struct List *)&__clib2->__directory_list); + NewList((struct List *)&__clib4->__directory_list); - __clib2->dirent_lock = __create_semaphore(); - if (__clib2->dirent_lock == NULL) + __clib4->dirent_lock = __create_semaphore(); + if (__clib4->dirent_lock == NULL) goto out; success = TRUE; @@ -51,15 +51,15 @@ CLIB_CONSTRUCTOR(dirent_init) { CLIB_DESTRUCTOR(dirent_exit) { ENTER(); - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; - if (__clib2->__directory_list.mlh_Head != NULL) { - while (NOT IsMinListEmpty(&__clib2->__directory_list)) - closedir((DIR *) __clib2->__directory_list.mlh_Head); + if (__clib4->__directory_list.mlh_Head != NULL) { + while (NOT IsMinListEmpty(&__clib4->__directory_list)) + closedir((DIR *) __clib4->__directory_list.mlh_Head); } - __delete_semaphore(__clib2->dirent_lock); - __clib2->dirent_lock = NULL; + __delete_semaphore(__clib4->dirent_lock); + __clib4->dirent_lock = NULL; LEAVE(); } @@ -68,7 +68,7 @@ int closedir(DIR *directory_pointer) { struct DirectoryHandle *dh; int result = ERROR; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); @@ -76,7 +76,7 @@ closedir(DIR *directory_pointer) { __check_abort(); - __dirent_lock(__clib2); + __dirent_lock(__clib4); if (directory_pointer == NULL) { __set_errno(EBADF); @@ -87,7 +87,7 @@ closedir(DIR *directory_pointer) { { BOOL directory_pointer_is_valid = FALSE; - for (dh = (struct DirectoryHandle *) __clib2->__directory_list.mlh_Head; + for (dh = (struct DirectoryHandle *) __clib4->__directory_list.mlh_Head; dh->dh_MinNode.mln_Succ != NULL; dh = (struct DirectoryHandle *) dh->dh_MinNode.mln_Succ) { if (dh == (struct DirectoryHandle *) directory_pointer) { @@ -107,7 +107,7 @@ closedir(DIR *directory_pointer) { Remove((struct Node *) dh); - if (__clib2->__unix_path_semantics) { + if (__clib4->__unix_path_semantics) { struct Node *node; while ((node = RemHead((struct List *) &dh->dh_VolumeList)) != NULL) @@ -132,7 +132,7 @@ closedir(DIR *directory_pointer) { out: - __dirent_unlock(__clib2); + __dirent_unlock(__clib4); RETURN(result); return result; diff --git a/library/dirent/dirent_headers.h b/library/dirent/dirent_headers.h index ce42626f..ac1c0bf1 100755 --- a/library/dirent/dirent_headers.h +++ b/library/dirent/dirent_headers.h @@ -1,5 +1,5 @@ /* - * $Id: dirent_headers.h,v 1.9 2006-01-08 12:04:22 clib2devs Exp $ + * $Id: dirent_headers.h,v 1.9 2006-01-08 12:04:22 clib4devs Exp $ */ #ifndef _DIRENT_HEADERS_H @@ -38,7 +38,7 @@ struct DirectoryHandle int dh_Fd; // For fdopendir() }; -extern void __dirent_lock(struct _clib2 *__clib2); -extern void __dirent_unlock(struct _clib2 *__clib2); +extern void __dirent_lock(struct _clib4 *__clib4); +extern void __dirent_unlock(struct _clib4 *__clib4); #endif /* _DIRENT_HEADERS_H */ diff --git a/library/dirent/dirfd.c b/library/dirent/dirfd.c index c802823d..2e5fc89e 100644 --- a/library/dirent/dirfd.c +++ b/library/dirent/dirfd.c @@ -1,5 +1,5 @@ /* - * $Id: dirent_dirfd.c,v 1.1 2022-08-12 19:30:22 clib2devs Exp $ + * $Id: dirent_dirfd.c,v 1.1 2022-08-12 19:30:22 clib4devs Exp $ */ #ifndef _DIRENT_HEADERS_H diff --git a/library/dirent/fdopendir.c b/library/dirent/fdopendir.c index cb296190..bfccac5b 100644 --- a/library/dirent/fdopendir.c +++ b/library/dirent/fdopendir.c @@ -1,5 +1,5 @@ /* - * $Id: dirent_fdopendir.c,v 1.0 2022-08-10 19:30:22 clib2devs Exp $ + * $Id: dirent_fdopendir.c,v 1.0 2022-08-10 19:30:22 clib4devs Exp $ */ #ifndef _DIRENT_HEADERS_H diff --git a/library/dirent/opendir.c b/library/dirent/opendir.c index 60aab52b..2efa4c03 100755 --- a/library/dirent/opendir.c +++ b/library/dirent/opendir.c @@ -1,5 +1,5 @@ /* - * $Id: dirent_opendir.c,v 1.11 2021-01-31 12:04:22 clib2devs Exp $ + * $Id: dirent_opendir.c,v 1.11 2021-01-31 12:04:22 clib4devs Exp $ */ #ifndef _DIRENT_HEADERS_H @@ -26,7 +26,7 @@ opendir(const char *path_name) { struct name_translation_info path_name_nti; struct DirectoryHandle *dh = NULL; DIR *result = NULL; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); @@ -51,7 +51,7 @@ opendir(const char *path_name) { memset(dh, 0, sizeof(*dh)); - if (__clib2->__unix_path_semantics) { + if (__clib4->__unix_path_semantics) { struct Node *node; NewList((struct List *) &dh->dh_VolumeList); @@ -164,13 +164,13 @@ opendir(const char *path_name) { SHOWMSG("OK, done"); - assert(__clib2->__directory_list.mlh_Head != NULL); + assert(__clib4->__directory_list.mlh_Head != NULL); - __dirent_lock(__clib2); + __dirent_lock(__clib4); - AddTail((struct List *) &__clib2->__directory_list, (struct Node *) dh); + AddTail((struct List *) &__clib4->__directory_list, (struct Node *) dh); - __dirent_unlock(__clib2); + __dirent_unlock(__clib4); result = (DIR *) dh; dh = NULL; @@ -181,7 +181,7 @@ opendir(const char *path_name) { SHOWMSG("ouch. cleaning up"); FreeDosObject(DOS_EXAMINEDATA, dh->dh_FileInfo); - if (__clib2->__unix_path_semantics) { + if (__clib4->__unix_path_semantics) { struct Node *node; while ((node = RemHead((struct List *) &dh->dh_VolumeList)) != NULL) diff --git a/library/dirent/readdir.c b/library/dirent/readdir.c index 3c3f3597..3bdc6c53 100644 --- a/library/dirent/readdir.c +++ b/library/dirent/readdir.c @@ -1,5 +1,5 @@ /* - * $Id: dirent_readdir.c,v 1.11 2021-01-18 10:32:15 clib2devs Exp $ + * $Id: dirent_readdir.c,v 1.11 2021-01-18 10:32:15 clib4devs Exp $ */ #ifndef _DIRENT_HEADERS_H @@ -15,7 +15,7 @@ readdir(DIR *directory_pointer) { struct dirent *result = NULL; struct DirectoryHandle *dh; BPTR parent_directory = BZERO; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); @@ -32,7 +32,7 @@ readdir(DIR *directory_pointer) { dh = (struct DirectoryHandle *) directory_pointer; - if (__clib2->__unix_path_semantics && dh->dh_ScanVolumeList) { + if (__clib4->__unix_path_semantics && dh->dh_ScanVolumeList) { SHOWMSG("we are scanning the volume list"); if (dh->dh_Position == 0) { @@ -93,7 +93,7 @@ readdir(DIR *directory_pointer) { } if (NOT dh->dh_ScanVolumeList) { - if (__clib2->__unix_path_semantics) { + if (__clib4->__unix_path_semantics) { if (dh->dh_Position == 0) { SHOWMSG("returning ."); diff --git a/library/dirent/readdir64_r.c b/library/dirent/readdir64_r.c index 922c3731..86a916c0 100644 --- a/library/dirent/readdir64_r.c +++ b/library/dirent/readdir64_r.c @@ -1,5 +1,5 @@ /* - * $Id: dirent_readdir64_r.c,v 1.10 2022-04-24 10:32:15 clib2devs Exp $ + * $Id: dirent_readdir64_r.c,v 1.10 2022-04-24 10:32:15 clib4devs Exp $ */ #ifndef _DIRENT_HEADERS_H diff --git a/library/dirent/readdir_r.c b/library/dirent/readdir_r.c index 28dff5e7..aac9ccf7 100644 --- a/library/dirent/readdir_r.c +++ b/library/dirent/readdir_r.c @@ -1,5 +1,5 @@ /* - * $Id: dirent_readdir_r.c,v 1.10 2022-04-24 10:32:15 clib2devs Exp $ + * $Id: dirent_readdir_r.c,v 1.10 2022-04-24 10:32:15 clib4devs Exp $ */ #ifndef _DIRENT_HEADERS_H diff --git a/library/dirent/rewinddir.c b/library/dirent/rewinddir.c index 8de8cbf0..498d979b 100644 --- a/library/dirent/rewinddir.c +++ b/library/dirent/rewinddir.c @@ -1,5 +1,5 @@ /* - * $Id: dirent_rewinddir.c,v 1.5 2006-01-08 12:04:22 clib2devs Exp $ + * $Id: dirent_rewinddir.c,v 1.5 2006-01-08 12:04:22 clib4devs Exp $ */ #ifndef _DIRENT_HEADERS_H diff --git a/library/dirent/scandir.c b/library/dirent/scandir.c index d30e3278..d163948b 100644 --- a/library/dirent/scandir.c +++ b/library/dirent/scandir.c @@ -1,5 +1,5 @@ /* - * $Id: dirent_scandir.c,v 1.0 2022-08-17 12:04:22 clib2devs Exp $ + * $Id: dirent_scandir.c,v 1.0 2022-08-17 12:04:22 clib4devs Exp $ */ #ifndef _DIRENT_HEADERS_H diff --git a/library/envz/buf_findstr.c b/library/envz/buf_findstr.c index 0a6bc18d..656460bf 100644 --- a/library/envz/buf_findstr.c +++ b/library/envz/buf_findstr.c @@ -1,5 +1,5 @@ /* - * $Id: envz__buf_findstr.c,v 1.0 2023-04-16 12:04:22 clib2devs Exp $ + * $Id: envz__buf_findstr.c,v 1.0 2023-04-16 12:04:22 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H diff --git a/library/envz/envz_add.c b/library/envz/envz_add.c index 1b015d74..cb29cfef 100644 --- a/library/envz/envz_add.c +++ b/library/envz/envz_add.c @@ -1,5 +1,5 @@ /* - * $Id: envz_envz_add.c,v 1.0 2023-04-16 12:04:22 clib2devs Exp $ + * $Id: envz_envz_add.c,v 1.0 2023-04-16 12:04:22 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H diff --git a/library/envz/envz_entry.c b/library/envz/envz_entry.c index fded69f1..942d6ec2 100644 --- a/library/envz/envz_entry.c +++ b/library/envz/envz_entry.c @@ -1,5 +1,5 @@ /* - * $Id: envz_envz_entry.c,v 1.0 2023-04-16 12:04:22 clib2devs Exp $ + * $Id: envz_envz_entry.c,v 1.0 2023-04-16 12:04:22 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H diff --git a/library/envz/envz_get.c b/library/envz/envz_get.c index 072ed15e..5e1f8ce3 100644 --- a/library/envz/envz_get.c +++ b/library/envz/envz_get.c @@ -1,5 +1,5 @@ /* - * $Id: envz_envz_get.c,v 1.0 2023-04-16 12:04:22 clib2devs Exp $ + * $Id: envz_envz_get.c,v 1.0 2023-04-16 12:04:22 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H diff --git a/library/envz/envz_merge.c b/library/envz/envz_merge.c index 1f0f298b..09b7ca11 100644 --- a/library/envz/envz_merge.c +++ b/library/envz/envz_merge.c @@ -1,5 +1,5 @@ /* - * $Id: envz_envz_merge.c,v 1.0 2023-04-16 12:04:22 clib2devs Exp $ + * $Id: envz_envz_merge.c,v 1.0 2023-04-16 12:04:22 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H diff --git a/library/envz/envz_remove.c b/library/envz/envz_remove.c index 594c103c..ba97716c 100644 --- a/library/envz/envz_remove.c +++ b/library/envz/envz_remove.c @@ -1,5 +1,5 @@ /* - * $Id: envz_envz_remove.c,v 1.0 2023-04-16 12:04:22 clib2devs Exp $ + * $Id: envz_envz_remove.c,v 1.0 2023-04-16 12:04:22 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H diff --git a/library/envz/envz_strip.c b/library/envz/envz_strip.c index 7f0b5c6e..7ab0ed77 100644 --- a/library/envz/envz_strip.c +++ b/library/envz/envz_strip.c @@ -1,5 +1,5 @@ /* - * $Id: envz_envz_strip.c,v 1.0 2023-04-16 12:04:22 clib2devs Exp $ + * $Id: envz_envz_strip.c,v 1.0 2023-04-16 12:04:22 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H diff --git a/library/errno_data.c b/library/errno_data.c index 2ab85742..2e35ca4c 100755 --- a/library/errno_data.c +++ b/library/errno_data.c @@ -1,5 +1,5 @@ /* - * $Id: errno_data.c,v 1.4 2023-04-27 12:04:22 clib2devs Exp $ + * $Id: errno_data.c,v 1.4 2023-04-27 12:04:22 clib4devs Exp $ */ #ifndef _ERRNO_H @@ -10,10 +10,10 @@ int * __errno () { - return &__CLIB2->_errno; + return &__CLIB4->_errno; } int * __h_errno () { - return &__CLIB2->_h_errno; + return &__CLIB4->_h_errno; } \ No newline at end of file diff --git a/library/fcntl/close.c b/library/fcntl/close.c index 66f43f8c..4d6eb7fa 100644 --- a/library/fcntl/close.c +++ b/library/fcntl/close.c @@ -1,5 +1,5 @@ /* - * $Id: fcntl_close.c,v 1.13 2006-01-08 12:04:22 clib2devs Exp $ + * $Id: fcntl_close.c,v 1.13 2006-01-08 12:04:22 clib4devs Exp $ */ #ifndef _FCNTL_HEADERS_H @@ -11,7 +11,7 @@ close(int file_descriptor) { struct file_action_message fam; struct fd *fd; int result = ERROR; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); @@ -31,7 +31,7 @@ close(int file_descriptor) { assert(fd->fd_Action != NULL); - if ((*fd->fd_Action)(__clib2, fd, &fam) < 0) { + if ((*fd->fd_Action)(__clib4, fd, &fam) < 0) { __set_errno(fam.fam_Error); goto out; } diff --git a/library/fcntl/creat.c b/library/fcntl/creat.c index 0b3d79cf..77a5b23e 100644 --- a/library/fcntl/creat.c +++ b/library/fcntl/creat.c @@ -1,5 +1,5 @@ /* - * $Id: fcntl_creat.c,v 1.6 2006-01-08 12:04:22 clib2devs Exp $ + * $Id: fcntl_creat.c,v 1.6 2006-01-08 12:04:22 clib4devs Exp $ */ #ifndef _FCNTL_HEADERS_H diff --git a/library/fcntl/fcntl.c b/library/fcntl/fcntl.c index 0deaf30d..07c5653d 100644 --- a/library/fcntl/fcntl.c +++ b/library/fcntl/fcntl.c @@ -1,5 +1,5 @@ /* - * $Id: fcntl_fcntl.c,v 1.20 2006-11-16 14:39:23 clib2devs Exp $ + * $Id: fcntl_fcntl.c,v 1.20 2006-11-16 14:39:23 clib4devs Exp $ */ #ifndef _FCNTL_HEADERS_H @@ -18,14 +18,14 @@ fcntl(int file_descriptor, int cmd, ... /* int arg */) { int flags; int fdbase; int i; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); SHOWVALUE(file_descriptor); SHOWVALUE(cmd); - if (__clib2->__fd[file_descriptor] == NULL || FLAG_IS_CLEAR(__clib2->__fd[file_descriptor]->fd_Flags, FDF_IN_USE) || file_descriptor < 0 || file_descriptor > __clib2->__num_fd) { + if (__clib4->__fd[file_descriptor] == NULL || FLAG_IS_CLEAR(__clib4->__fd[file_descriptor]->fd_Flags, FDF_IN_USE) || file_descriptor < 0 || file_descriptor > __clib4->__num_fd) { __set_errno(EINVAL); goto out; } @@ -38,7 +38,7 @@ fcntl(int file_descriptor, int cmd, ... /* int arg */) { the stdio lock needs to be obtained here, before the individual file descriptor lock is held. */ if (cmd == F_DUPFD) - __stdio_lock(__clib2); + __stdio_lock(__clib4); fd = __get_file_descriptor(file_descriptor); if (fd == NULL) { @@ -167,7 +167,7 @@ fcntl(int file_descriptor, int cmd, ... /* int arg */) { assert(fd->fd_Action != NULL); - if ((*fd->fd_Action)(__clib2, fd, &fam) < 0) { + if ((*fd->fd_Action)(__clib4, fd, &fam) < 0) { __set_errno(fam.fam_Error); goto out; @@ -186,7 +186,7 @@ fcntl(int file_descriptor, int cmd, ... /* int arg */) { assert(fd->fd_Action != NULL); - if ((*fd->fd_Action)(__clib2, fd, &fam) < 0) { + if ((*fd->fd_Action)(__clib4, fd, &fam) < 0) { __set_errno(fam.fam_Error); goto out; @@ -216,33 +216,33 @@ fcntl(int file_descriptor, int cmd, ... /* int arg */) { } /* Make sure that we have the required number of file descriptors available. */ - if (__grow_fd_table(__clib2, fdbase + 1) < 0) + if (__grow_fd_table(__clib4, fdbase + 1) < 0) goto out; vacant_slot = -1; /* Guaranteed to have enough here */ do { - __stdio_unlock(__clib2); + __stdio_unlock(__clib4); __check_abort(); - __stdio_lock(__clib2); + __stdio_lock(__clib4); - for (i = fdbase; i < __clib2->__num_fd; i++) { - if (FLAG_IS_CLEAR(__clib2->__fd[i]->fd_Flags, FDF_IN_USE)) { + for (i = fdbase; i < __clib4->__num_fd; i++) { + if (FLAG_IS_CLEAR(__clib4->__fd[i]->fd_Flags, FDF_IN_USE)) { vacant_slot = i; break; } } /* Didn't really find any, grow the table further */ - if (vacant_slot < 0 && __grow_fd_table(__clib2, 0) < 0) + if (vacant_slot < 0 && __grow_fd_table(__clib4, 0) < 0) goto out; } while (vacant_slot < 0); /* Got a file descriptor, duplicate it */ - __duplicate_fd(__clib2->__fd[vacant_slot], fd); + __duplicate_fd(__clib4->__fd[vacant_slot], fd); result = vacant_slot; @@ -261,7 +261,7 @@ fcntl(int file_descriptor, int cmd, ... /* int arg */) { __fd_unlock(fd); if (cmd == F_DUPFD) - __stdio_unlock(__clib2); + __stdio_unlock(__clib4); RETURN(result); return (result); diff --git a/library/fcntl/fcntl_headers.h b/library/fcntl/fcntl_headers.h index 7a55e345..c6fa4fa5 100644 --- a/library/fcntl/fcntl_headers.h +++ b/library/fcntl/fcntl_headers.h @@ -1,5 +1,5 @@ /* - * $Id: fcntl_headers.h,v 1.5 2006-01-08 12:04:22 clib2devs Exp $ + * $Id: fcntl_headers.h,v 1.5 2006-01-08 12:04:22 clib4devs Exp $ */ #ifndef _FCNTL_HEADERS_H diff --git a/library/fcntl/flock.c b/library/fcntl/flock.c index 239c4cab..410547a6 100644 --- a/library/fcntl/flock.c +++ b/library/fcntl/flock.c @@ -1,5 +1,5 @@ /* - * $Id: fcntl_flock.c,v 1.0 2022-08-21 12:04:22 clib2devs Exp $ + * $Id: fcntl_flock.c,v 1.0 2022-08-21 12:04:22 clib4devs Exp $ */ #ifndef _FCNTL_HEADERS_H diff --git a/library/fcntl/open.c b/library/fcntl/open.c index 573f5069..53a6082f 100755 --- a/library/fcntl/open.c +++ b/library/fcntl/open.c @@ -1,5 +1,5 @@ /* - * $Id: fcntl_open.c,v 1.19 2021-01-31 12:04:22 clib2devs Exp $ + * $Id: fcntl_open.c,v 1.19 2021-01-31 12:04:22 clib4devs Exp $ */ #ifndef _FCNTL_HEADERS_H @@ -28,7 +28,7 @@ open(const char *path_name, int open_flag, ... /* mode_t mode */) { int result = ERROR; int i; BOOL is_directory = FALSE; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); @@ -40,7 +40,7 @@ open(const char *path_name, int open_flag, ... /* mode_t mode */) { __check_abort(); - __stdio_lock(__clib2); + __stdio_lock(__clib4); if (path_name == NULL) { SHOWMSG("path name is invalid"); @@ -80,18 +80,18 @@ open(const char *path_name, int open_flag, ... /* mode_t mode */) { } } - fd_slot_number = __find_vacant_fd_entry(__clib2); + fd_slot_number = __find_vacant_fd_entry(__clib4); if (fd_slot_number < 0) { - if (__grow_fd_table(__clib2, 0) < 0) { + if (__grow_fd_table(__clib4, 0) < 0) { SHOWMSG("couldn't find a vacant file descriptor, and couldn't allocate one either"); goto out; } - fd_slot_number = __find_vacant_fd_entry(__clib2); + fd_slot_number = __find_vacant_fd_entry(__clib4); assert(fd_slot_number >= 0); } - if (__clib2->__unix_path_semantics) { + if (__clib4->__unix_path_semantics) { if (path_name[0] == '\0') { SHOWMSG("no name given"); @@ -257,7 +257,7 @@ open(const char *path_name, int open_flag, ... /* mode_t mode */) { goto out; } - fd = __clib2->__fd[fd_slot_number]; + fd = __clib4->__fd[fd_slot_number]; if (is_directory || FLAG_IS_SET(open_flag, O_PATH)) __initialize_fd(fd, __fd_hook_entry, dir_lock, 0, fd_lock); // TODO - Create a new dir hook @@ -370,7 +370,7 @@ open(const char *path_name, int open_flag, ... /* mode_t mode */) { FreeDosObject(DOS_EXAMINEDATA, fib); UnLock(lock); - __stdio_unlock(__clib2); + __stdio_unlock(__clib4); RETURN(result); return (result); diff --git a/library/fcntl/openat.c b/library/fcntl/openat.c index f0594798..b348c317 100644 --- a/library/fcntl/openat.c +++ b/library/fcntl/openat.c @@ -1,5 +1,5 @@ /* - * $Id: fcntl_openat.c,v 1.0 2022-08-10 12:04:22 clib2devs Exp $ + * $Id: fcntl_openat.c,v 1.0 2022-08-10 12:04:22 clib4devs Exp $ */ #ifndef _UNISTD_HEADERS_H @@ -20,7 +20,7 @@ openat(int fd, const char *filename, int flags, ...) { struct name_translation_info path_name_nti; BOOL absolute = FALSE; int result = -1; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; if (filename == NULL) { __set_errno (EINVAL); @@ -28,7 +28,7 @@ openat(int fd, const char *filename, int flags, ...) { } /* Check for relative path */ - if (__clib2->__unix_path_semantics) { + if (__clib4->__unix_path_semantics) { if (filename[0] == '/') absolute = TRUE; diff --git a/library/fcntl/read.c b/library/fcntl/read.c index dcdcd077..76a1e152 100644 --- a/library/fcntl/read.c +++ b/library/fcntl/read.c @@ -1,5 +1,5 @@ /* - * $Id: fcntl_read.c,v 1.11 2023-04-06 12:04:22 clib2devs Exp $ + * $Id: fcntl_read.c,v 1.11 2023-04-06 12:04:22 clib4devs Exp $ */ #ifndef _FCNTL_HEADERS_H @@ -16,7 +16,7 @@ read(int file_descriptor, void *buffer, size_t num_bytes) { struct fd *fd = NULL; ssize_t result = EOF; __set_errno(0); - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); @@ -29,7 +29,7 @@ read(int file_descriptor, void *buffer, size_t num_bytes) { __check_abort(); - __stdio_lock(__clib2); + __stdio_lock(__clib4); if (buffer == NULL) { SHOWMSG("invalid buffer"); @@ -37,8 +37,8 @@ read(int file_descriptor, void *buffer, size_t num_bytes) { goto out; } - assert(file_descriptor >= 0 && file_descriptor < __clib2->__num_fd); - assert(__clib2->__fd[file_descriptor] != NULL); + assert(file_descriptor >= 0 && file_descriptor < __clib4->__num_fd); + assert(__clib4->__fd[file_descriptor] != NULL); fd = __get_file_descriptor(file_descriptor); if (fd == NULL) { @@ -68,7 +68,7 @@ read(int file_descriptor, void *buffer, size_t num_bytes) { assert(fd->fd_Action != NULL); - num_bytes_read = (*fd->fd_Action)(__clib2, fd, &fam); + num_bytes_read = (*fd->fd_Action)(__clib4, fd, &fam); if (num_bytes_read == EOF) { __set_errno(fam.fam_Error); @@ -86,7 +86,7 @@ read(int file_descriptor, void *buffer, size_t num_bytes) { out: __fd_unlock(fd); - __stdio_unlock(__clib2); + __stdio_unlock(__clib4); RETURN(result); return (result); diff --git a/library/fcntl/write.c b/library/fcntl/write.c index 0d1e1fe5..5b670f34 100644 --- a/library/fcntl/write.c +++ b/library/fcntl/write.c @@ -1,5 +1,5 @@ /* - * $Id: fcntl_write.c,v 1.11 2023-04-06 12:04:22 clib2devs Exp $ + * $Id: fcntl_write.c,v 1.11 2023-04-06 12:04:22 clib4devs Exp $ */ #ifndef _FCNTL_HEADERS_H @@ -15,7 +15,7 @@ write(int file_descriptor, const void *buffer, size_t num_bytes) { ssize_t num_bytes_written; struct fd *fd = NULL; ssize_t result = EOF; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); @@ -28,7 +28,7 @@ write(int file_descriptor, const void *buffer, size_t num_bytes) { __check_abort(); - __stdio_lock(__clib2); + __stdio_lock(__clib4); if (buffer == NULL) { SHOWMSG("invalid buffer address"); @@ -37,9 +37,9 @@ write(int file_descriptor, const void *buffer, size_t num_bytes) { goto out; } - assert(file_descriptor >= 0 && file_descriptor < __clib2->__num_fd); - assert(__clib2->__fd[file_descriptor] != NULL); - assert(FLAG_IS_SET(__clib2->__fd[file_descriptor]->fd_Flags, FDF_IN_USE)); + assert(file_descriptor >= 0 && file_descriptor < __clib4->__num_fd); + assert(__clib4->__fd[file_descriptor] != NULL); + assert(FLAG_IS_SET(__clib4->__fd[file_descriptor]->fd_Flags, FDF_IN_USE)); fd = __get_file_descriptor(file_descriptor); if (fd == NULL) { @@ -69,7 +69,7 @@ write(int file_descriptor, const void *buffer, size_t num_bytes) { assert(fd->fd_Action != NULL); - num_bytes_written = (*fd->fd_Action)(__clib2, fd, &fam); + num_bytes_written = (*fd->fd_Action)(__clib4, fd, &fam); if (num_bytes_written == EOF) { __set_errno(fam.fam_Error); goto out; @@ -89,7 +89,7 @@ write(int file_descriptor, const void *buffer, size_t num_bytes) { out: __fd_unlock(fd); - __stdio_unlock(__clib2); + __stdio_unlock(__clib4); RETURN(result); return (result); diff --git a/library/fts/fts.c b/library/fts/fts.c index 4ceadf0a..6f01b498 100644 --- a/library/fts/fts.c +++ b/library/fts/fts.c @@ -1,5 +1,5 @@ /* - * $Id: fts.c,v 1.0 2023-09-10 12:04:22 clib2devs Exp $ + * $Id: fts.c,v 1.0 2023-09-10 12:04:22 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H @@ -76,8 +76,8 @@ static const char *parentdir(); static const char * currdir() { - struct _clib2 *__clib2 = __CLIB2; - if (__clib2->__unix_path_semantics) + struct _clib4 *__clib4 = __CLIB4; + if (__clib4->__unix_path_semantics) return "."; else return "CURRDIR:"; @@ -85,8 +85,8 @@ currdir() { static const char * parentdir() { - struct _clib2 *__clib2 = __CLIB2; - if (__clib2->__unix_path_semantics) + struct _clib4 *__clib4 = __CLIB4; + if (__clib4->__unix_path_semantics) return ".."; else return "/"; @@ -99,7 +99,7 @@ fts_open(char *const *argv, int options, int (*compar)(const FTSENT **, const FT size_t nitems; FTSENT *parent, *tmp = NULL; /* pacify gcc */ size_t len; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; assert(argv != NULL); @@ -149,7 +149,7 @@ fts_open(char *const *argv, int options, int (*compar)(const FTSENT **, const FT p->fts_info = fts_stat(sp, p, ISSET(FTS_COMFOLLOW)); /* Command-line "." and ".." are real directories. */ - if (__clib2->__unix_path_semantics) { + if (__clib4->__unix_path_semantics) { if (p->fts_info == FTS_DOT) p->fts_info = FTS_D; } @@ -216,7 +216,7 @@ static void fts_load(FTS *sp, FTSENT *p) { size_t len; char *cp; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; assert(sp != NULL); assert(p != NULL); @@ -230,7 +230,7 @@ fts_load(FTS *sp, FTSENT *p) { */ len = p->fts_pathlen = p->fts_namelen; memmove(sp->fts_path, p->fts_name, len + 1); - if (__clib2->__unix_path_semantics) { + if (__clib4->__unix_path_semantics) { if ((cp = strrchr(p->fts_name, '/')) && (cp != p->fts_name || cp[1])) { len = strlen(++cp); memmove(p->fts_name, cp, len + 1); diff --git a/library/getclib2.c b/library/getclib4.c similarity index 59% rename from library/getclib2.c rename to library/getclib4.c index 3adcc167..c1519a12 100644 --- a/library/getclib2.c +++ b/library/getclib4.c @@ -4,27 +4,27 @@ #include #include -#include "shared_library/clib2.h" +#include "shared_library/clib4.h" #include "map.h" -struct _clib2 * -__getClib2(void) { - struct _clib2 *r = NULL; +struct _clib4 * +__getClib4(void) { + struct _clib4 *r = NULL; struct Task *t = FindTask(NULL); if (NT_PROCESS == t->tc_Node.ln_Type) { #if 0 //This is too slow at moment.. uint32 value; - /* Get _clib2 address stored into process pr_UID field */ + /* Get _clib4 address stored into process pr_UID field */ GetOwnerInfoTags(OI_ProcessInput, 0, OI_OwnerUID, &value, TAG_END); - r = (struct _clib2 *) value; + r = (struct _clib4 *) value; #else - r = (struct _clib2 *) ((struct Process *)t)->pr_UID; + r = (struct _clib4 *) ((struct Process *)t)->pr_UID; #endif } if (!r) { - struct Clib2Resource *res = (APTR) OpenResource(RESOURCE_NAME); + struct Clib4Resource *res = (APTR) OpenResource(RESOURCE_NAME); if (res) { return res->fallbackClib; } diff --git a/library/iconv/iconv.c b/library/iconv/iconv.c index c286d7f7..3e4c5cb1 100755 --- a/library/iconv/iconv.c +++ b/library/iconv/iconv.c @@ -1,5 +1,5 @@ /* - * $Id: iconv.c,v 1.0 2021-03-09 12:04:25 clib2devs Exp $ + * $Id: iconv.c,v 1.0 2021-03-09 12:04:25 clib4devs Exp $ */ diff --git a/library/iconv/iconv_close.c b/library/iconv/iconv_close.c index 382f95fb..6d0458b0 100755 --- a/library/iconv/iconv_close.c +++ b/library/iconv/iconv_close.c @@ -1,5 +1,5 @@ /* - * $Id: iconv_close.c,v 1.0 2021-03-09 12:04:25 clib2devs Exp $ + * $Id: iconv_close.c,v 1.0 2021-03-09 12:04:25 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H diff --git a/library/iconv/iconv_open.c b/library/iconv/iconv_open.c index 89174308..d6099527 100755 --- a/library/iconv/iconv_open.c +++ b/library/iconv/iconv_open.c @@ -1,5 +1,5 @@ /* - * $Id: iconv_open.c,v 1.0 2021-03-09 12:04:25 clib2devs Exp $ + * $Id: iconv_open.c,v 1.0 2021-03-09 12:04:25 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H diff --git a/library/iconv/iconv_priv.c b/library/iconv/iconv_priv.c index a7a93319..2c53b2c9 100644 --- a/library/iconv/iconv_priv.c +++ b/library/iconv/iconv_priv.c @@ -1,5 +1,5 @@ /* - * $Id: iconv_priv.c,v 1.0 2022-08-08 12:04:25 clib2devs Exp $ + * $Id: iconv_priv.c,v 1.0 2022-08-08 12:04:25 clib4devs Exp $ */ #include "iconv_priv.h" diff --git a/library/include/argz.h b/library/include/argz.h index 20b6b60f..08522d14 100755 --- a/library/include/argz.h +++ b/library/include/argz.h @@ -1,5 +1,5 @@ /* - * $Id: argz.h,v 1.0 2021-01-21 10:03:49 clib2devs Exp $ + * $Id: argz.h,v 1.0 2021-01-21 10:03:49 clib4devs Exp $ */ #ifndef _ARGZ_H #define _ARGZ_H diff --git a/library/include/arpa/inet.h b/library/include/arpa/inet.h index 1cd5901d..77111827 100755 --- a/library/include/arpa/inet.h +++ b/library/include/arpa/inet.h @@ -1,5 +1,5 @@ /* - * $Id: inet.h,v 1.5 2022-09-15 12:06:14 clib2devs Exp $ + * $Id: inet.h,v 1.5 2022-09-15 12:06:14 clib4devs Exp $ */ #ifndef _ARPA_INET_H diff --git a/library/include/assert.h b/library/include/assert.h index 81718cc2..e8f23b37 100755 --- a/library/include/assert.h +++ b/library/include/assert.h @@ -1,5 +1,5 @@ /* - * $Id: assert.h,v 1.7 2023-06-03 12:06:14 clib2devs Exp $ + * $Id: assert.h,v 1.7 2023-06-03 12:06:14 clib4devs Exp $ */ #ifndef _ASSERT_H diff --git a/library/include/complex.h b/library/include/complex.h index a1cbfe8d..b96d02ea 100755 --- a/library/include/complex.h +++ b/library/include/complex.h @@ -1,5 +1,5 @@ /* - * $Id: complex.h,v 1.6 2006-01-08 12:06:14 clib2devs Exp $ + * $Id: complex.h,v 1.6 2006-01-08 12:06:14 clib4devs Exp $ */ #ifndef _COMPLEX_H diff --git a/library/include/ctype.h b/library/include/ctype.h index 4cde56f5..338ddfbb 100755 --- a/library/include/ctype.h +++ b/library/include/ctype.h @@ -1,5 +1,5 @@ /* - * $Id: ctype.h,v 1.10 2006-01-08 12:06:14 clib2devs Exp $ + * $Id: ctype.h,v 1.10 2006-01-08 12:06:14 clib4devs Exp $ */ #ifndef _CTYPE_H @@ -48,17 +48,17 @@ extern int toascii(int c); /****************************************************************************/ -#define isalnum(c) ((__CLIB2->__ctype_table[(c) & 255] & (__CTYPE_DIGIT|__CTYPE_LOWER_CASE|__CTYPE_UPPER_CASE)) != 0) -#define isalpha(c) ((__CLIB2->__ctype_table[(c) & 255] & (__CTYPE_LOWER_CASE|__CTYPE_UPPER_CASE)) != 0) -#define iscntrl(c) ((__CLIB2->__ctype_table[(c) & 255] & __CTYPE_CONTROL) != 0) -#define isdigit(c) ((__CLIB2->__ctype_table[(c) & 255] & __CTYPE_DIGIT) != 0) -#define isxdigit(c) ((__CLIB2->__ctype_table[(c) & 255] & __CTYPE_HEX_DIGIT) != 0) -#define isgraph(c) ((__CLIB2->__ctype_table[(c) & 255] & (__CTYPE_DIGIT|__CTYPE_PUNCTUATION|__CTYPE_LOWER_CASE|__CTYPE_UPPER_CASE)) != 0) -#define ispunct(c) ((__CLIB2->__ctype_table[(c) & 255] & __CTYPE_PUNCTUATION) != 0) -#define isprint(c) ((__CLIB2->__ctype_table[(c) & 255] & __CTYPE_PRINTABLE) != 0) -#define islower(c) ((__CLIB2->__ctype_table[(c) & 255] & __CTYPE_LOWER_CASE) != 0) -#define isupper(c) ((__CLIB2->__ctype_table[(c) & 255] & __CTYPE_UPPER_CASE) != 0) -#define isspace(c) ((__CLIB2->__ctype_table[(c) & 255] & __CTYPE_WHITE_SPACE) != 0) +#define isalnum(c) ((__CLIB4->__ctype_table[(c) & 255] & (__CTYPE_DIGIT|__CTYPE_LOWER_CASE|__CTYPE_UPPER_CASE)) != 0) +#define isalpha(c) ((__CLIB4->__ctype_table[(c) & 255] & (__CTYPE_LOWER_CASE|__CTYPE_UPPER_CASE)) != 0) +#define iscntrl(c) ((__CLIB4->__ctype_table[(c) & 255] & __CTYPE_CONTROL) != 0) +#define isdigit(c) ((__CLIB4->__ctype_table[(c) & 255] & __CTYPE_DIGIT) != 0) +#define isxdigit(c) ((__CLIB4->__ctype_table[(c) & 255] & __CTYPE_HEX_DIGIT) != 0) +#define isgraph(c) ((__CLIB4->__ctype_table[(c) & 255] & (__CTYPE_DIGIT|__CTYPE_PUNCTUATION|__CTYPE_LOWER_CASE|__CTYPE_UPPER_CASE)) != 0) +#define ispunct(c) ((__CLIB4->__ctype_table[(c) & 255] & __CTYPE_PUNCTUATION) != 0) +#define isprint(c) ((__CLIB4->__ctype_table[(c) & 255] & __CTYPE_PRINTABLE) != 0) +#define islower(c) ((__CLIB4->__ctype_table[(c) & 255] & __CTYPE_LOWER_CASE) != 0) +#define isupper(c) ((__CLIB4->__ctype_table[(c) & 255] & __CTYPE_UPPER_CASE) != 0) +#define isspace(c) ((__CLIB4->__ctype_table[(c) & 255] & __CTYPE_WHITE_SPACE) != 0) #define isblank(c) ((c) == ' ' || (c) == '\t') #endif /* __cplusplus */ diff --git a/library/include/dirent.h b/library/include/dirent.h index de82f3a7..2fb19efa 100755 --- a/library/include/dirent.h +++ b/library/include/dirent.h @@ -1,5 +1,5 @@ /* - * $Id: dirent.h,v 1.7 2006-01-08 12:06:14 clib2devs Exp $ + * $Id: dirent.h,v 1.7 2006-01-08 12:06:14 clib4devs Exp $ */ #ifndef _DIRENT_H diff --git a/library/include/dlfcn.h b/library/include/dlfcn.h index d343702c..cad4c87d 100755 --- a/library/include/dlfcn.h +++ b/library/include/dlfcn.h @@ -1,5 +1,5 @@ /* - * $Id: dlfcn.h,v 1.2 2010-08-21 11:37:03 clib2devs Exp $ + * $Id: dlfcn.h,v 1.2 2010-08-21 11:37:03 clib4devs Exp $ */ #ifndef _DLFCN_H diff --git a/library/include/dos.h b/library/include/dos.h index d4673f5f..01d14b6e 100644 --- a/library/include/dos.h +++ b/library/include/dos.h @@ -1,5 +1,5 @@ /* - * $Id: dos.h,v 2.0 2023-05-17 09:40:06 clib2devs Exp $ + * $Id: dos.h,v 2.0 2023-05-17 09:40:06 clib4devs Exp $ */ #ifndef _DOS_H @@ -124,10 +124,10 @@ struct _wchar { }; /* - * Initial _clib2 structure. This contains all fields used by current progream + * Initial _clib4 structure. This contains all fields used by current progream */ -struct _clib2 { +struct _clib4 { struct ExecIFace *IExec; /* Main IExec interface */ struct ElfIFace *IElf; @@ -399,7 +399,7 @@ struct _clib2 { * by the command to be executed. That function is called * __execve_environ_init(). Should program execution fail, you need to * clean up after what __execve_environ_init() set up. To do this, call - * __execve_environ_exit(). There are stubs in clib2 for these functions + * __execve_environ_exit(). There are stubs in clib4 for these functions * which essentially do nothing at all. You will have to implement these * yourself if you want to use them. */ @@ -504,12 +504,12 @@ struct _clib2 { char tgoto_buf[50]; }; -#ifndef __getClib2 -extern struct _clib2 *__getClib2(void); +#ifndef __getClib4 +extern struct _clib4 *__getClib4(void); #endif -#undef __CLIB2 -#define __CLIB2 __getClib2() +#undef __CLIB4 +#define __CLIB4 __getClib4() /* * Two functions control how this library uses the locale.library API to @@ -520,8 +520,8 @@ extern struct _clib2 *__getClib2(void); * * __locale_exit() releases the default locale and closes locale.library. */ -extern int __locale_init(struct _clib2 *__clib2); -extern void __locale_exit(struct _clib2 *__clib2); +extern int __locale_init(struct _clib4 *__clib4); +extern void __locale_exit(struct _clib4 *__clib4); __END_DECLS diff --git a/library/include/errno.h b/library/include/errno.h index edc1f45f..2a110403 100755 --- a/library/include/errno.h +++ b/library/include/errno.h @@ -1,5 +1,5 @@ /* - * $Id: errno.h,v 1.6 2022-01-15 12:06:14 clib2devs Exp $ + * $Id: errno.h,v 1.6 2022-01-15 12:06:14 clib4devs Exp $ */ #ifndef _ERRNO_H diff --git a/library/include/fcntl.h b/library/include/fcntl.h index c9fc49f0..28f9e170 100755 --- a/library/include/fcntl.h +++ b/library/include/fcntl.h @@ -1,5 +1,5 @@ /* - * $Id: fcntl.h,v 1.9 2022-08-11 12:06:14 clib2devs Exp $ + * $Id: fcntl.h,v 1.9 2022-08-11 12:06:14 clib4devs Exp $ */ #ifndef _FCNTL_H diff --git a/library/include/features.h b/library/include/features.h index b8ab31c9..539695f5 100755 --- a/library/include/features.h +++ b/library/include/features.h @@ -114,8 +114,8 @@ guard. Feature test macros that can be handled from the first system header included are handled here. */ -/* define CLIB2_SHAREDLIB symbol so we can use it in our native code */ -#define CLIB2_SHAREDLIB +/* define CLIB4_SHAREDLIB symbol so we can use it in our native code */ +#define CLIB4_SHAREDLIB #define __THREAD_SAFE #undef __BSD_VISIBLE #define __BSD_VISIBLE 0 diff --git a/library/include/fenv.h b/library/include/fenv.h index ac195710..1c692fe0 100755 --- a/library/include/fenv.h +++ b/library/include/fenv.h @@ -1,5 +1,5 @@ /* - * $Id: fenv.h,v 1.5 2022-03-09 19:09:00 clib2devs Exp $ + * $Id: fenv.h,v 1.5 2022-03-09 19:09:00 clib4devs Exp $ */ #ifndef _FENV_H diff --git a/library/include/float.h b/library/include/float.h index 54455b2e..e8e3ad75 100755 --- a/library/include/float.h +++ b/library/include/float.h @@ -1,5 +1,5 @@ /* - * $Id: float.h,v 1.5 2006-01-08 12:06:14 clib2devs Exp $ + * $Id: float.h,v 1.5 2006-01-08 12:06:14 clib4devs Exp $ */ #ifndef _FLOAT_H diff --git a/library/include/ftw.h b/library/include/ftw.h index 3ba44dab..44d56ab7 100755 --- a/library/include/ftw.h +++ b/library/include/ftw.h @@ -1,5 +1,5 @@ /* - * $Id: ftw.h,v 1.5 2006-01-08 12:06:14 clib2devs Exp $ + * $Id: ftw.h,v 1.5 2006-01-08 12:06:14 clib4devs Exp $ */ #ifndef _FTW_H diff --git a/library/include/getopt.h b/library/include/getopt.h index b3832b7e..6c8e2a28 100755 --- a/library/include/getopt.h +++ b/library/include/getopt.h @@ -1,5 +1,5 @@ /* - * $Id: getopt.h,v 1.6 2022-09-11 12:06:14 clib2devs Exp $ + * $Id: getopt.h,v 1.6 2022-09-11 12:06:14 clib4devs Exp $ * * :ts=4 * @@ -29,13 +29,6 @@ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. - * - ***************************************************************************** - * - * Documentation and source code for this library, and the most recent library - * build are available from . - * - ***************************************************************************** */ #ifndef _GETOPT_H diff --git a/library/include/grp.h b/library/include/grp.h index f7439690..fae17b42 100755 --- a/library/include/grp.h +++ b/library/include/grp.h @@ -1,5 +1,5 @@ /* - * $Id: grp.h,v 1.7 2006-01-08 12:06:14 clib2devs Exp $ + * $Id: grp.h,v 1.7 2006-01-08 12:06:14 clib4devs Exp $ */ #ifndef _GRP_H diff --git a/library/include/inttypes.h b/library/include/inttypes.h index cc215fed..4c9d89e6 100755 --- a/library/include/inttypes.h +++ b/library/include/inttypes.h @@ -1,5 +1,5 @@ /* - * $Id: inttypes.h,v 1.6 2006-01-08 12:06:14 clib2devs Exp $ + * $Id: inttypes.h,v 1.6 2006-01-08 12:06:14 clib4devs Exp $ */ #ifndef _INTTYPES_H diff --git a/library/include/iso646.h b/library/include/iso646.h index eb73afca..b4337b41 100755 --- a/library/include/iso646.h +++ b/library/include/iso646.h @@ -1,5 +1,5 @@ /* - * $Id: iso646.h,v 1.5 2006-01-08 12:06:14 clib2devs Exp $ + * $Id: iso646.h,v 1.5 2006-01-08 12:06:14 clib4devs Exp $ */ #ifndef _ISO646_H diff --git a/library/include/langinfo.h b/library/include/langinfo.h index 85ae0762..fc909521 100755 --- a/library/include/langinfo.h +++ b/library/include/langinfo.h @@ -1,5 +1,5 @@ /* - * $Id: langinfo.h,v 1.0 2021-01-15 22:32:14 clib2devs Exp $ + * $Id: langinfo.h,v 1.0 2021-01-15 22:32:14 clib4devs Exp $ */ #ifndef _LANGINFO_H diff --git a/library/include/libgen.h b/library/include/libgen.h index 6a9dc2fc..a99423de 100755 --- a/library/include/libgen.h +++ b/library/include/libgen.h @@ -1,5 +1,5 @@ /* - * $Id: libgen.h,v 1.7 2006-09-25 13:29:47 clib2devs Exp $ + * $Id: libgen.h,v 1.7 2006-09-25 13:29:47 clib4devs Exp $ */ #ifndef _LIBGEN_H diff --git a/library/include/limits.h b/library/include/limits.h index 31f2c109..c810fe75 100755 --- a/library/include/limits.h +++ b/library/include/limits.h @@ -1,5 +1,5 @@ /* - * $Id: limits.h,v 1.12 2010-08-20 15:33:36 clib2devs Exp $ + * $Id: limits.h,v 1.12 2010-08-20 15:33:36 clib4devs Exp $ */ #ifndef _LIMITS_H diff --git a/library/include/locale.h b/library/include/locale.h index efac4361..c34f5cae 100755 --- a/library/include/locale.h +++ b/library/include/locale.h @@ -1,5 +1,5 @@ /* - * $Id: locale.h,v 1.5 2006-01-08 12:06:14 clib2devs Exp $ + * $Id: locale.h,v 1.5 2006-01-08 12:06:14 clib4devs Exp $ */ #ifndef _LOCALE_H diff --git a/library/include/malloc.h b/library/include/malloc.h index 68a1b188..f6f3a079 100755 --- a/library/include/malloc.h +++ b/library/include/malloc.h @@ -1,5 +1,5 @@ /* - * $Id: malloc.h,v 1.0 2021-01-10 10:50:49 clib2devs Exp $ + * $Id: malloc.h,v 1.0 2021-01-10 10:50:49 clib4devs Exp $ */ #ifndef _MALLOC_H diff --git a/library/include/math.h b/library/include/math.h index b7628027..d148ac7c 100755 --- a/library/include/math.h +++ b/library/include/math.h @@ -1,5 +1,5 @@ /* - * $Id: math.h,v 1.22 2007-01-06 10:09:49 clib2devs Exp $ + * $Id: math.h,v 1.22 2007-01-06 10:09:49 clib4devs Exp $ */ #ifndef _MATH_H @@ -88,8 +88,8 @@ extern float ynf(int n, float x); /* HUGE_VALL is a 'long double' Infinity. */ #define HUGE_VALL (1.0L / 0.0L) -#define INFINITY ((const float) __CLIB2->__infinity) -#define NAN ((const float) __CLIB2->__nan) +#define INFINITY ((const float) __CLIB4->__infinity) +#define NAN ((const float) __CLIB4->__nan) #define FP_INFINITE 0x01 /* -/+ infinity */ #define FP_NAN 0x02 /* not a number */ diff --git a/library/include/netdb.h b/library/include/netdb.h index 731a968d..3f6a7142 100755 --- a/library/include/netdb.h +++ b/library/include/netdb.h @@ -1,5 +1,5 @@ /* - * $Id: netdb.h,v 1.4 2006-01-08 12:06:14 clib2devs Exp $ + * $Id: netdb.h,v 1.4 2006-01-08 12:06:14 clib4devs Exp $ */ #ifndef _NETDB_H diff --git a/library/include/nl_types.h b/library/include/nl_types.h index c3b0f51c..fb6ee949 100755 --- a/library/include/nl_types.h +++ b/library/include/nl_types.h @@ -1,5 +1,5 @@ /* - * $Id: nl_types.h,v 1.0 2021-01-15 22:35:54 clib2devs Exp $ + * $Id: nl_types.h,v 1.0 2021-01-15 22:35:54 clib4devs Exp $ */ #ifndef _NL_TYPES_H diff --git a/library/include/poll.h b/library/include/poll.h index 26544e15..bb6957a7 100755 --- a/library/include/poll.h +++ b/library/include/poll.h @@ -1,6 +1,6 @@ /* - * $Id: poll.h,v 1.0 2021-01-12 11:50:0 clib2devs Exp $ + * $Id: poll.h,v 1.0 2021-01-12 11:50:0 clib4devs Exp $ */ #ifndef _POLL_H diff --git a/library/include/pthread.h b/library/include/pthread.h index 58b82b32..0e697d0c 100644 --- a/library/include/pthread.h +++ b/library/include/pthread.h @@ -1,7 +1,7 @@ /* Copyright (C) 2014 Szilard Biro Copyright (C) 2018 Harry Sintonen - Copyright (C) 2023 clib2Devs + Copyright (C) 2023 clib4Devs This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/library/include/pwd.h b/library/include/pwd.h index 8fe7fdf2..d7b30c63 100755 --- a/library/include/pwd.h +++ b/library/include/pwd.h @@ -1,5 +1,5 @@ /* - * $Id: pwd.h,v 1.7 2006-01-08 12:06:14 clib2devs Exp $ + * $Id: pwd.h,v 1.7 2006-01-08 12:06:14 clib4devs Exp $ */ #ifndef _PWD_H diff --git a/library/include/sched.h b/library/include/sched.h index a5ceda7e..923bd95e 100755 --- a/library/include/sched.h +++ b/library/include/sched.h @@ -1,5 +1,5 @@ /* - $Id: sched.h,v 1.01 2022-07-18 12:09:49 clib2devs Exp $ + $Id: sched.h,v 1.01 2022-07-18 12:09:49 clib4devs Exp $ Copyright (C) 2014 Szilard Biro diff --git a/library/include/semaphore.h b/library/include/semaphore.h index 41c5b917..8ccbc43e 100755 --- a/library/include/semaphore.h +++ b/library/include/semaphore.h @@ -1,5 +1,5 @@ /* - $Id: semaphore.h,v 1.01 2022-07-18 12:09:49 clib2devs Exp $ + $Id: semaphore.h,v 1.01 2022-07-18 12:09:49 clib4devs Exp $ Copyright (C) 2015 Szilard Biro diff --git a/library/include/setjmp.h b/library/include/setjmp.h index eab23b8e..5c17def5 100755 --- a/library/include/setjmp.h +++ b/library/include/setjmp.h @@ -1,5 +1,5 @@ /* - * $Id: setjmp.h,v 1.5 2006-01-08 12:0__sigset_t6:14 clib2devs Exp $ + * $Id: setjmp.h,v 1.5 2006-01-08 12:0__sigset_t6:14 clib4devs Exp $ */ #ifndef _SETJMP_H diff --git a/library/include/signal.h b/library/include/signal.h index 9b0db099..d53999f3 100755 --- a/library/include/signal.h +++ b/library/include/signal.h @@ -1,5 +1,5 @@ /* - * $Id: signal.h,v 1.8 2006-01-08 12:06:14 clib2devs Exp $ + * $Id: signal.h,v 1.8 2006-01-08 12:06:14 clib4devs Exp $ */ #ifndef _SIGNAL_H diff --git a/library/include/stdalign.h b/library/include/stdalign.h index 91c26375..2b0c4354 100644 --- a/library/include/stdalign.h +++ b/library/include/stdalign.h @@ -1,5 +1,5 @@ /* - * $Id: stdalign.h ,v1.0 2022-03-22 13:12:59 clib2devs Exp $ + * $Id: stdalign.h ,v1.0 2022-03-22 13:12:59 clib4devs Exp $ */ #ifndef _STDALIGN_H diff --git a/library/include/stdarg.h b/library/include/stdarg.h index 45a921c9..5afaf7e6 100755 --- a/library/include/stdarg.h +++ b/library/include/stdarg.h @@ -1,5 +1,5 @@ /* - * $Id: stdarg.h,v 1.7 2006-01-08 12:06:14 clib2devs Exp $ + * $Id: stdarg.h,v 1.7 2006-01-08 12:06:14 clib4devs Exp $ */ #ifndef _STDARG_H diff --git a/library/include/stdatomic.h b/library/include/stdatomic.h index 3f5edf02..ef4d89c7 100644 --- a/library/include/stdatomic.h +++ b/library/include/stdatomic.h @@ -1,5 +1,5 @@ /* - * $Id: stdatomic.h, v1.0 2022-03-22 13:12:59 clib2devs Exp $ + * $Id: stdatomic.h, v1.0 2022-03-22 13:12:59 clib4devs Exp $ */ #if __STDC_VERSION__ >= 200112L && \ diff --git a/library/include/stdbool.h b/library/include/stdbool.h index a212454c..a0972876 100755 --- a/library/include/stdbool.h +++ b/library/include/stdbool.h @@ -1,5 +1,5 @@ /* - * $Id: stdbool.h,v 1.6 2006-01-08 12:06:14 clib2devs Exp $ + * $Id: stdbool.h,v 1.6 2006-01-08 12:06:14 clib4devs Exp $ */ #ifndef _STDBOOL_H diff --git a/library/include/stddef.h b/library/include/stddef.h index 0a9b753d..3e4a48c4 100755 --- a/library/include/stddef.h +++ b/library/include/stddef.h @@ -1,5 +1,5 @@ /* - * $Id: stddef.h,v 1.7 2006-01-08 12:06:14 clib2devs Exp $ + * $Id: stddef.h,v 1.7 2006-01-08 12:06:14 clib4devs Exp $ */ #ifndef _STDDEF_H diff --git a/library/include/stdint.h b/library/include/stdint.h index a5439ad3..65d3086c 100755 --- a/library/include/stdint.h +++ b/library/include/stdint.h @@ -1,5 +1,5 @@ /* - * $Id: stdint.h,v 1.5 2006-01-08 12:06:14 clib2devs Exp $ + * $Id: stdint.h,v 1.5 2006-01-08 12:06:14 clib4devs Exp $ */ #ifndef _STDINT_H diff --git a/library/include/stdio.h b/library/include/stdio.h index 0911c207..933715fa 100755 --- a/library/include/stdio.h +++ b/library/include/stdio.h @@ -1,5 +1,5 @@ /* - * $Id: stdio.h,v 1.24 2010-10-20 13:12:59 clib2devs Exp $ + * $Id: stdio.h,v 1.24 2010-10-20 13:12:59 clib4devs Exp $ */ #ifndef _STDIO_H @@ -116,9 +116,9 @@ typedef struct __sFILE FILE; /****************************************************************************/ /* The three standard I/O streams */ -#define stdin ((FILE *) __CLIB2->__iob[0]) -#define stdout ((FILE *) __CLIB2->__iob[1]) -#define stderr ((FILE *) __CLIB2->__iob[2]) +#define stdin ((FILE *) __CLIB4->__iob[0]) +#define stdout ((FILE *) __CLIB4->__iob[1]) +#define stderr ((FILE *) __CLIB4->__iob[2]) /****************************************************************************/ diff --git a/library/include/stdlib.h b/library/include/stdlib.h index 1de2ff76..d7aab4f5 100755 --- a/library/include/stdlib.h +++ b/library/include/stdlib.h @@ -1,5 +1,5 @@ /* - * $Id: stdlib.h,v 1.19 2008-04-30 14:34:03 clib2devs Exp $ + * $Id: stdlib.h,v 1.19 2008-04-30 14:34:03 clib4devs Exp $ */ #ifndef _STDLIB_H @@ -13,9 +13,9 @@ #include #include -#ifndef _SYS_CLIB2_STDC_H -#include -#endif /* _SYS_CLIB2_STDC_H */ +#ifndef _SYS_CLIB4_STDC_H +#include +#endif /* _SYS_CLIB4_STDC_H */ __BEGIN_DECLS @@ -187,32 +187,32 @@ extern void arc4random_addrandom(unsigned char *dat, int datlen); #ifdef __SPE__ extern int16_t atosfix16(const char *__str); -extern int16_t _atosfix16_r(struct _clib2 *, const char *__str); +extern int16_t _atosfix16_r(struct _clib4 *, const char *__str); extern int32_t atosfix32(const char *__str); -extern int32_t _atosfix32_r(struct _clib2 *, const char *__str); +extern int32_t _atosfix32_r(struct _clib4 *, const char *__str); extern int64_t atosfix64(const char *__str); -extern int64_t _atosfix64_r(struct _clib2 *, const char *__str); +extern int64_t _atosfix64_r(struct _clib4 *, const char *__str); extern uint16_t atoufix16(const char *__str); -extern uint16_t _atoufix16_r(struct _clib2 *, const char *__str); +extern uint16_t _atoufix16_r(struct _clib4 *, const char *__str); extern uint32_t atoufix32(const char *__str); -extern uint32_t _atoufix32_r(struct _clib2 *, const char *__str); +extern uint32_t _atoufix32_r(struct _clib4 *, const char *__str); extern uint64_t atoufix64(const char *__str); -extern uint64_t _atoufix64_r(struct _clib2 *, const char *__str); +extern uint64_t _atoufix64_r(struct _clib4 *, const char *__str); extern int16_t strtosfix16(const char *__str, char **__endptr); -extern int16_t _strtosfix16_r(struct _clib2 *, const char *__str, char **__endptr); +extern int16_t _strtosfix16_r(struct _clib4 *, const char *__str, char **__endptr); extern int32_t strtosfix32(const char *__str, char **__endptr); -extern int32_t _strtosfix32_r(struct _clib2 *, const char *__str, char **__endptr); +extern int32_t _strtosfix32_r(struct _clib4 *, const char *__str, char **__endptr); extern int64_t strtosfix64(const char *__str, char **__endptr); -extern int64_t _strtosfix64_r(struct _clib2 *, const char *__str, char **__endptr); +extern int64_t _strtosfix64_r(struct _clib4 *, const char *__str, char **__endptr); extern uint16_t strtoufix16(const char *__str, char **__endptr); -extern uint16_t _strtoufix16_r(struct _clib2 *, const char *__str, char **__endptr); +extern uint16_t _strtoufix16_r(struct _clib4 *, const char *__str, char **__endptr); extern uint32_t strtoufix32(const char *__str, char **__endptr); -extern uint32_t _strtoufix32_r(struct _clib2 *, const char *__str, char **__endptr); +extern uint32_t _strtoufix32_r(struct _clib4 *, const char *__str, char **__endptr); extern uint64_t strtoufix64(const char *__str, char **__endptr); -extern uint64_t _strtoufix64_r(struct _clib2 *, const char *__str, char **__endptr); +extern uint64_t _strtoufix64_r(struct _clib4 *, const char *__str, char **__endptr); #endif __END_DECLS diff --git a/library/include/stdnoreturn.h b/library/include/stdnoreturn.h index e79246e8..cbb72c4a 100644 --- a/library/include/stdnoreturn.h +++ b/library/include/stdnoreturn.h @@ -1,5 +1,5 @@ /* - * $Id: stdnoreturn.h,v 1.0 2022-03-22 13:12:59 clib2devs Exp $ + * $Id: stdnoreturn.h,v 1.0 2022-03-22 13:12:59 clib4devs Exp $ */ #ifndef _STDNORETURN_H diff --git a/library/include/string.h b/library/include/string.h index e6f573aa..ee868735 100755 --- a/library/include/string.h +++ b/library/include/string.h @@ -1,5 +1,5 @@ /* - * $Id: string.h,v 1.12 2006-09-17 17:36:42 clib2devs Exp $ + * $Id: string.h,v 1.12 2006-09-17 17:36:42 clib4devs Exp $ */ #ifndef _STRING_H diff --git a/library/include/strings.h b/library/include/strings.h index 9e880b0d..4457aa38 100755 --- a/library/include/strings.h +++ b/library/include/strings.h @@ -1,5 +1,5 @@ /* - * $Id: strings.h,v 1.8 2006-01-08 12:06:14 clib2devs Exp $ + * $Id: strings.h,v 1.8 2006-01-08 12:06:14 clib4devs Exp $ */ #ifndef _STRINGS_H diff --git a/library/include/sys/amigaos-va.h b/library/include/sys/amigaos-va.h index 35af2e02..7308656d 100755 --- a/library/include/sys/amigaos-va.h +++ b/library/include/sys/amigaos-va.h @@ -1,5 +1,5 @@ /* - * $Id: amigaos-va.h,v 1.7 2006-01-08 12:06:14 clib2devs Exp $ + * $Id: amigaos-va.h,v 1.7 2006-01-08 12:06:14 clib4devs Exp $ */ #ifndef _SYS_AMIGAOS_VA_H diff --git a/library/include/sys/cdefs.h b/library/include/sys/cdefs.h index be7a095e..d57d3f53 100755 --- a/library/include/sys/cdefs.h +++ b/library/include/sys/cdefs.h @@ -78,17 +78,17 @@ #endif /* __ELF__ */ #ifdef __has_builtin -# define __clib2_has_builtin(name) __has_builtin (name) +# define __clib4_has_builtin(name) __has_builtin (name) #else -# define __clib2_has_builtin(name) 0 +# define __clib4_has_builtin(name) 0 #endif -#if (__GNUC__ >= 3) || __clib2_has_builtin (__builtin_expect) -# define __clib2_unlikely(cond) __builtin_expect ((cond), 0) -# define __clib2_likely(cond) __builtin_expect ((cond), 1) +#if (__GNUC__ >= 3) || __clib4_has_builtin (__builtin_expect) +# define __clib4_unlikely(cond) __builtin_expect ((cond), 0) +# define __clib4_likely(cond) __builtin_expect ((cond), 1) #else -# define __clib2_unlikely(cond) (cond) -# define __clib2_likely(cond) (cond) +# define __clib4_unlikely(cond) (cond) +# define __clib4_likely(cond) (cond) #endif #endif /* __GNUC__ */ diff --git a/library/include/sys/clib2_io.h b/library/include/sys/clib4_io.h old mode 100755 new mode 100644 similarity index 97% rename from library/include/sys/clib2_io.h rename to library/include/sys/clib4_io.h index 2c6943fe..52b0c84e --- a/library/include/sys/clib2_io.h +++ b/library/include/sys/clib4_io.h @@ -1,9 +1,9 @@ /* - * $Id: clib2_io.h,v 1.4 2006-11-16 14:39:23 clib2devs Exp $ + * $Id: clib4_io.h,v 1.4 2006-11-16 14:39:23 clib4devs Exp $ */ -#ifndef _SYS_CLIB2_IO_H -#define _SYS_CLIB2_IO_H +#ifndef _SYS_CLIB4_IO_H +#define _SYS_CLIB4_IO_H #include @@ -146,4 +146,4 @@ extern int __change_fd_user_data(int file_descriptor,void * new_user_data,void * __END_DECLS -#endif /* _SYS_CLIB2_IO_H */ +#endif /* _SYS_CLIB4_IO_H */ diff --git a/library/include/sys/clib2_stdc.h b/library/include/sys/clib4_stdc.h old mode 100755 new mode 100644 similarity index 69% rename from library/include/sys/clib2_stdc.h rename to library/include/sys/clib4_stdc.h index 16450864..8ec6007d --- a/library/include/sys/clib2_stdc.h +++ b/library/include/sys/clib4_stdc.h @@ -1,9 +1,9 @@ /* - * $Id: clib2_stdc.h,v 1.4 2006-01-08 12:06:14 clib2devs Exp $ + * $Id: clib4_stdc.h,v 1.4 2006-01-08 12:06:14 clib4devs Exp $ */ -#ifndef _SYS_CLIB2_STDC_H -#define _SYS_CLIB2_STDC_H +#ifndef _SYS_CLIB4_STDC_H +#define _SYS_CLIB4_STDC_H #include @@ -17,4 +17,4 @@ __BEGIN_DECLS __END_DECLS -#endif /* _SYS_CLIB2_STDC_H */ +#endif /* _SYS_CLIB4_STDC_H */ diff --git a/library/include/sys/filio.h b/library/include/sys/filio.h index b681cf35..30d14736 100755 --- a/library/include/sys/filio.h +++ b/library/include/sys/filio.h @@ -1,5 +1,5 @@ /* - * $Id: filio.h,v 1.4 2006-01-08 12:06:14 clib2devs Exp $ + * $Id: filio.h,v 1.4 2006-01-08 12:06:14 clib4devs Exp $ */ #ifndef _SYS_FILIO_H diff --git a/library/include/sys/ioccom.h b/library/include/sys/ioccom.h index a381603c..25e21b0d 100755 --- a/library/include/sys/ioccom.h +++ b/library/include/sys/ioccom.h @@ -1,5 +1,5 @@ /* - * $Id: ioccom.h,v 1.4 2006-01-08 12:06:14 clib2devs Exp $ + * $Id: ioccom.h,v 1.4 2006-01-08 12:06:14 clib4devs Exp $ */ #ifndef _SYS_IOCCOM_H diff --git a/library/include/sys/ioctl.h b/library/include/sys/ioctl.h index 3b6ca7b2..9299125b 100755 --- a/library/include/sys/ioctl.h +++ b/library/include/sys/ioctl.h @@ -1,5 +1,5 @@ /* - * $Id: ioctl.h,v 1.5 2006-06-21 15:53:55 clib2devs Exp $ + * $Id: ioctl.h,v 1.5 2006-06-21 15:53:55 clib4devs Exp $ */ #ifndef _SYS_IOTCL_H diff --git a/library/include/sys/mman.h b/library/include/sys/mman.h index 0ecb5ea1..ae44ff6f 100755 --- a/library/include/sys/mman.h +++ b/library/include/sys/mman.h @@ -1,5 +1,5 @@ /* - * $Id: mman.h,v 1.0 2021-01-18 20:17:27 clib2devs Exp $ + * $Id: mman.h,v 1.0 2021-01-18 20:17:27 clib4devs Exp $ */ #ifndef _SYS_MMAN_H diff --git a/library/include/sys/mount.h b/library/include/sys/mount.h index f91ac5e6..ad93277a 100755 --- a/library/include/sys/mount.h +++ b/library/include/sys/mount.h @@ -1,5 +1,5 @@ /* - * $Id: mount.h,v 1.7 2006-01-08 12:06:14 clib2devs Exp $ + * $Id: mount.h,v 1.7 2006-01-08 12:06:14 clib4devs Exp $ */ #ifndef _SYS_MOUNT_H diff --git a/library/include/sys/param.h b/library/include/sys/param.h index 02e1f8ba..7ed2ca20 100755 --- a/library/include/sys/param.h +++ b/library/include/sys/param.h @@ -29,13 +29,6 @@ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. - * - ***************************************************************************** - * - * Documentation and source code for this library, and the most recent library - * build are available from . - * - ***************************************************************************** */ #ifndef _SYS_PARAM_H diff --git a/library/include/sys/resource.h b/library/include/sys/resource.h index f5b51138..34fa84fd 100755 --- a/library/include/sys/resource.h +++ b/library/include/sys/resource.h @@ -1,5 +1,5 @@ /* - * $Id: resource.h,v 1.2 2006-07-28 14:02:32 clib2devs Exp $ + * $Id: resource.h,v 1.2 2006-07-28 14:02:32 clib4devs Exp $ */ #ifndef _SYS_RESOURCE_H diff --git a/library/include/sys/select.h b/library/include/sys/select.h index a079236d..d5502023 100755 --- a/library/include/sys/select.h +++ b/library/include/sys/select.h @@ -1,5 +1,5 @@ /* - * $Id: select.h,v 1.9 2006-04-10 15:08:11 clib2devs Exp $ + * $Id: select.h,v 1.9 2006-04-10 15:08:11 clib4devs Exp $ */ #ifndef _SYS_SELECT_H diff --git a/library/include/sys/sem.h b/library/include/sys/sem.h index 371e6ce9..1eb50a82 100755 --- a/library/include/sys/sem.h +++ b/library/include/sys/sem.h @@ -1,5 +1,5 @@ /* - * $Id: sem.h,v 1.00 2021-02-02 17:03:49 clib2devs Exp $ + * $Id: sem.h,v 1.00 2021-02-02 17:03:49 clib4devs Exp $ */ #ifndef _SYS_SEM_H diff --git a/library/include/sys/stat.h b/library/include/sys/stat.h index d5b34a84..7904742c 100755 --- a/library/include/sys/stat.h +++ b/library/include/sys/stat.h @@ -1,5 +1,5 @@ /* - * $Id: stat.h,v 1.10 2006-07-28 13:19:12 clib2devs Exp $ + * $Id: stat.h,v 1.10 2006-07-28 13:19:12 clib4devs Exp $ */ #ifndef _SYS_STAT_H diff --git a/library/include/sys/syslog.h b/library/include/sys/syslog.h index 5f59cb81..bd5ba004 100755 --- a/library/include/sys/syslog.h +++ b/library/include/sys/syslog.h @@ -1,5 +1,5 @@ /* - * $Id: sys_syslog.h,v 1.0 2021-02-22 17:20:08 clib2devs Exp $ + * $Id: sys_syslog.h,v 1.0 2021-02-22 17:20:08 clib4devs Exp $ * * :ts=4 * diff --git a/library/include/sys/systeminfo.h b/library/include/sys/systeminfo.h index 32b86cdc..964a2d7b 100755 --- a/library/include/sys/systeminfo.h +++ b/library/include/sys/systeminfo.h @@ -1,5 +1,5 @@ /* - * $Id: systeminfo.h,v 1.1 2006-07-28 14:02:32 clib2devs Exp $ + * $Id: systeminfo.h,v 1.1 2006-07-28 14:02:32 clib4devs Exp $ */ #ifndef _SYS_SYSTEMINFO_H diff --git a/library/include/sys/timeb.h b/library/include/sys/timeb.h index aa5837f3..15eba6e0 100755 --- a/library/include/sys/timeb.h +++ b/library/include/sys/timeb.h @@ -1,5 +1,5 @@ /* - * $Id: timeb.h,v 1.4 2006-07-28 14:02:32 clib2devs Exp $ + * $Id: timeb.h,v 1.4 2006-07-28 14:02:32 clib4devs Exp $ */ #ifndef _SYS_TIMEB_H diff --git a/library/include/sys/types.h b/library/include/sys/types.h index 3b97ec65..b4e408e1 100755 --- a/library/include/sys/types.h +++ b/library/include/sys/types.h @@ -1,5 +1,5 @@ /* - * $Id: types.h,v 1.10 2023-06-03 12:06:14 clib2devs Exp $ + * $Id: types.h,v 1.10 2023-06-03 12:06:14 clib4devs Exp $ */ #ifndef _SYS_TYPES_H diff --git a/library/include/sys/uio.h b/library/include/sys/uio.h index c1b82a0a..9957cb34 100755 --- a/library/include/sys/uio.h +++ b/library/include/sys/uio.h @@ -1,5 +1,5 @@ /* - * $Id: uio.h,v 1.5 2006-01-08 12:06:14 clib2devs Exp $ + * $Id: uio.h,v 1.5 2006-01-08 12:06:14 clib4devs Exp $ */ #ifndef _SYS_UIO_H diff --git a/library/include/sys/utsname.h b/library/include/sys/utsname.h index eb4bc71e..f09b6209 100755 --- a/library/include/sys/utsname.h +++ b/library/include/sys/utsname.h @@ -1,5 +1,5 @@ /* - * $Id: utsname.h,v 1.5 2022-02-04 12:06:14 clib2devs Exp $ + * $Id: utsname.h,v 1.5 2022-02-04 12:06:14 clib4devs Exp $ */ #ifndef _SYS_UTSNAME_H diff --git a/library/include/termcap.h b/library/include/termcap.h index 15e03c90..c5d1bf32 100644 --- a/library/include/termcap.h +++ b/library/include/termcap.h @@ -23,10 +23,10 @@ __BEGIN_DECLS -#define PC __CLIB2->__PC -#define ospeed __CLIB2__ospeed -#define UP __CLIB2->__UP -#define BC __CLIB2->__BC +#define PC __CLIB4->__PC +#define ospeed __CLIB4__ospeed +#define UP __CLIB4->__UP +#define BC __CLIB4->__BC extern int tgetent (char *buffer, const char *termtype); extern int tgetnum (const char *name); diff --git a/library/include/termios.h b/library/include/termios.h index d97e8f92..5af2cfab 100755 --- a/library/include/termios.h +++ b/library/include/termios.h @@ -1,5 +1,5 @@ /* - * $Id: termios.h,v 1.6 2021-02-08 19:08:14 clib2devs Exp $ + * $Id: termios.h,v 1.6 2021-02-08 19:08:14 clib4devs Exp $ */ #ifndef _TERMIOS_H diff --git a/library/include/time.h b/library/include/time.h index 97c66ee8..762a89bc 100755 --- a/library/include/time.h +++ b/library/include/time.h @@ -1,5 +1,5 @@ /* - * $Id: time.h,v 1.8 2023-06-03 12:06:14 clib2devs Exp $ + * $Id: time.h,v 1.8 2023-06-03 12:06:14 clib4devs Exp $ */ #ifndef _TIME_H @@ -39,9 +39,9 @@ __BEGIN_DECLS #define __tm_zone tm_zone #endif -#define _timezone (__CLIB2->__timezone) -#define _daylight (__CLIB2->__daylight) -#define _tzname (__CLIB2->__tzname) +#define _timezone (__CLIB4->__timezone) +#define _daylight (__CLIB4->__daylight) +#define _tzname (__CLIB4->__tzname) /* POSIX defines the external tzname being defined in time.h */ #ifndef tzname diff --git a/library/include/ulimit.h b/library/include/ulimit.h index 217c00ab..a5a3b9a6 100755 --- a/library/include/ulimit.h +++ b/library/include/ulimit.h @@ -1,5 +1,5 @@ /* - * $Id: ulimit.h,v 1.2 2006-07-28 14:02:32 clib2devs Exp $ + * $Id: ulimit.h,v 1.2 2006-07-28 14:02:32 clib4devs Exp $ */ #ifndef _ULIMIT_H diff --git a/library/include/unistd.h b/library/include/unistd.h index 64fc044c..ea05c887 100755 --- a/library/include/unistd.h +++ b/library/include/unistd.h @@ -1,5 +1,5 @@ /* - * $Id: unistd.h,v 1.23 2007-01-06 10:09:49 clib2devs Exp $ + * $Id: unistd.h,v 1.23 2007-01-06 10:09:49 clib4devs Exp $ */ #ifndef _UNISTD_H diff --git a/library/include/utime.h b/library/include/utime.h index a371057b..7a7500b0 100755 --- a/library/include/utime.h +++ b/library/include/utime.h @@ -1,5 +1,5 @@ /* - * $Id: utime.h,v 1.7 2006-01-08 12:06:14 clib2devs Exp $ + * $Id: utime.h,v 1.7 2006-01-08 12:06:14 clib4devs Exp $ */ #ifndef _UTIME_H diff --git a/library/include/wchar.h b/library/include/wchar.h index 034d3e01..d5750335 100755 --- a/library/include/wchar.h +++ b/library/include/wchar.h @@ -1,13 +1,13 @@ /* - * $Id: wchar.h,v 1.8 2008-04-30 14:34:03 clib2devs Exp $ + * $Id: wchar.h,v 1.8 2008-04-30 14:34:03 clib4devs Exp $ */ #ifndef _WCHAR_H #define _WCHAR_H -#ifndef _SYS_CLIB2_STDC_H -#include -#endif /* _SYS_CLIB2_STDC_H */ +#ifndef _SYS_CLIB4_STDC_H +#include +#endif /* _SYS_CLIB4_STDC_H */ #include diff --git a/library/include/wctype.h b/library/include/wctype.h index c84d8600..656341ae 100755 --- a/library/include/wctype.h +++ b/library/include/wctype.h @@ -1,5 +1,5 @@ /* - * $Id: wctype.h,v 1.9 2022-04-20 14:41:28 clib2devs Exp $ + * $Id: wctype.h,v 1.9 2022-04-20 14:41:28 clib4devs Exp $ */ #ifndef _WCYTPE_H diff --git a/library/inttypes/imaxabs.c b/library/inttypes/imaxabs.c index 7840194f..b799526b 100644 --- a/library/inttypes/imaxabs.c +++ b/library/inttypes/imaxabs.c @@ -1,5 +1,5 @@ /* - * $Id: inttypes_imaxabs.c,v 1.2 2006-01-08 12:04:22 clib2devs Exp $ + * $Id: inttypes_imaxabs.c,v 1.2 2006-01-08 12:04:22 clib4devs Exp $ */ #ifndef _INTTYPES_HEADERS_H diff --git a/library/inttypes/imaxdiv.c b/library/inttypes/imaxdiv.c index 12f5bf94..732f36d3 100644 --- a/library/inttypes/imaxdiv.c +++ b/library/inttypes/imaxdiv.c @@ -1,5 +1,5 @@ /* - * $Id: inttypes_imaxdiv.c,v 1.2 2006-01-08 12:04:22 clib2devs Exp $ + * $Id: inttypes_imaxdiv.c,v 1.2 2006-01-08 12:04:22 clib4devs Exp $ */ #ifndef _INTTYPES_HEADERS_H diff --git a/library/inttypes/inttypes_headers.h b/library/inttypes/inttypes_headers.h index b33bf073..173424b9 100755 --- a/library/inttypes/inttypes_headers.h +++ b/library/inttypes/inttypes_headers.h @@ -1,5 +1,5 @@ /* - * $Id: inttypes_headers.h,v 1.2 2006-01-08 12:04:22 clib2devs Exp $ + * $Id: inttypes_headers.h,v 1.2 2006-01-08 12:04:22 clib4devs Exp $ */ #ifndef _INTTYPES_HEADERS_H diff --git a/library/inttypes/strtoimax.c b/library/inttypes/strtoimax.c index cb9fa7d0..1bffbb0e 100644 --- a/library/inttypes/strtoimax.c +++ b/library/inttypes/strtoimax.c @@ -1,5 +1,5 @@ /* - * $Id: inttypes_strtoimax.c,v 1.4 2006-01-08 12:04:22 clib2devs Exp $ + * $Id: inttypes_strtoimax.c,v 1.4 2006-01-08 12:04:22 clib4devs Exp $ */ #ifndef _INTTYPES_HEADERS_H diff --git a/library/inttypes/strtoumax.c b/library/inttypes/strtoumax.c index 45efc116..9b4d8739 100644 --- a/library/inttypes/strtoumax.c +++ b/library/inttypes/strtoumax.c @@ -1,5 +1,5 @@ /* - * $Id: inttypes_strtoumax.c,v 1.4 2006-01-08 12:04:22 clib2devs Exp $ + * $Id: inttypes_strtoumax.c,v 1.4 2006-01-08 12:04:22 clib4devs Exp $ */ #ifndef _INTTYPES_HEADERS_H diff --git a/library/inttypes/wcstoimax.c b/library/inttypes/wcstoimax.c index fe0e24a8..acb69612 100644 --- a/library/inttypes/wcstoimax.c +++ b/library/inttypes/wcstoimax.c @@ -1,5 +1,5 @@ /* - * $Id: inttypes_wcstoimax.c,v 1.3 2022-03-03 12:04:22 clib2devs Exp $ + * $Id: inttypes_wcstoimax.c,v 1.3 2022-03-03 12:04:22 clib4devs Exp $ */ #ifndef _INTTYPES_HEADERS_H diff --git a/library/inttypes/wcstoumax.c b/library/inttypes/wcstoumax.c index dad23282..1a0b0629 100644 --- a/library/inttypes/wcstoumax.c +++ b/library/inttypes/wcstoumax.c @@ -1,5 +1,5 @@ /* - * $Id: inttypes_wcstoumax.c,v 1.3 2022-03-03 20:02:22 clib2devs Exp $ + * $Id: inttypes_wcstoumax.c,v 1.3 2022-03-03 20:02:22 clib4devs Exp $ */ #ifndef _INTTYPES_HEADERS_H diff --git a/library/libc_init_global.c b/library/libc_init_global.c index 7ee50572..c9d4e8c2 100755 --- a/library/libc_init_global.c +++ b/library/libc_init_global.c @@ -1,5 +1,5 @@ /* - * $Id: libc_init_global.c,v 2.0 2023-05-17 17:01:06 clib2devs Exp $ + * $Id: libc_init_global.c,v 2.0 2023-05-17 17:01:06 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H @@ -64,7 +64,7 @@ static uint32_t _random_init[] = { }; void -reent_init(struct _clib2 *__clib2) { +reent_init(struct _clib4 *__clib4) { BOOL success = FALSE; ENTER(); @@ -72,7 +72,7 @@ reent_init(struct _clib2 *__clib2) { struct ElfIFace *IElf = __IElf; - *__clib2 = (struct _clib2) { + *__clib4 = (struct _clib4) { .__ctype_table = { /* 0 */ __CTYPE_CONTROL, /* 1 */ __CTYPE_CONTROL, @@ -290,51 +290,51 @@ reent_init(struct _clib2 *__clib2) { .syslog_mask = 0xff, }; - if (!__clib2->__random_lock) { + if (!__clib4->__random_lock) { goto out; } SHOWMSG("Allocating wide_status"); /* Initialize wchar stuff */ - __clib2->wide_status = AllocVecTags(sizeof(struct _wchar), AVT_Type, MEMF_SHARED, TAG_DONE); - if (!__clib2->wide_status) { + __clib4->wide_status = AllocVecTags(sizeof(struct _wchar), AVT_Type, MEMF_SHARED, TAG_DONE); + if (!__clib4->wide_status) { goto out; } - __clib2->wide_status->_strtok_last = NULL; - __clib2->wide_status->_mblen_state.__count = 0; - __clib2->wide_status->_mblen_state.__value.__wch = 0; - __clib2->wide_status->_wctomb_state.__count = 0; - __clib2->wide_status->_wctomb_state.__value.__wch = 0; - __clib2->wide_status->_mbtowc_state.__count = 0; - __clib2->wide_status->_mbtowc_state.__value.__wch = 0; - __clib2->wide_status->_mbrlen_state.__count = 0; - __clib2->wide_status->_mbrlen_state.__value.__wch = 0; - __clib2->wide_status->_mbrtowc_state.__count = 0; - __clib2->wide_status->_mbrtowc_state.__value.__wch = 0; - __clib2->wide_status->_mbsrtowcs_state.__count = 0; - __clib2->wide_status->_mbsrtowcs_state.__value.__wch = 0; - __clib2->wide_status->_wcrtomb_state.__count = 0; - __clib2->wide_status->_wcrtomb_state.__value.__wch = 0; - __clib2->wide_status->_wcsrtombs_state.__count = 0; - __clib2->wide_status->_wcsrtombs_state.__value.__wch = 0; - __clib2->wide_status->_l64a_buf[0] = '\0'; - __clib2->wide_status->_getdate_err = 0; + __clib4->wide_status->_strtok_last = NULL; + __clib4->wide_status->_mblen_state.__count = 0; + __clib4->wide_status->_mblen_state.__value.__wch = 0; + __clib4->wide_status->_wctomb_state.__count = 0; + __clib4->wide_status->_wctomb_state.__value.__wch = 0; + __clib4->wide_status->_mbtowc_state.__count = 0; + __clib4->wide_status->_mbtowc_state.__value.__wch = 0; + __clib4->wide_status->_mbrlen_state.__count = 0; + __clib4->wide_status->_mbrlen_state.__value.__wch = 0; + __clib4->wide_status->_mbrtowc_state.__count = 0; + __clib4->wide_status->_mbrtowc_state.__value.__wch = 0; + __clib4->wide_status->_mbsrtowcs_state.__count = 0; + __clib4->wide_status->_mbsrtowcs_state.__value.__wch = 0; + __clib4->wide_status->_wcrtomb_state.__count = 0; + __clib4->wide_status->_wcrtomb_state.__value.__wch = 0; + __clib4->wide_status->_wcsrtombs_state.__count = 0; + __clib4->wide_status->_wcsrtombs_state.__value.__wch = 0; + __clib4->wide_status->_l64a_buf[0] = '\0'; + __clib4->wide_status->_getdate_err = 0; /* Get cpu family used to choose functions at runtime */ D(("Setting cpu family")); - GetCPUInfoTags(GCIT_Family, &__clib2->cpufamily, TAG_DONE); + GetCPUInfoTags(GCIT_Family, &__clib4->cpufamily, TAG_DONE); /* Check if altivec is present */ #ifdef ENABLE_ALTIVEC_AT_START D(("Check if altivec is present")); - GetCPUInfoTags(GCIT_VectorUnit, &__clib2->hasAltivec, TAG_DONE); + GetCPUInfoTags(GCIT_VectorUnit, &__clib4->hasAltivec, TAG_DONE); #else D(("Set altivec to zero")); - __clib2->hasAltivec = 0; + __clib4->hasAltivec = 0; #endif /* Init memalign list */ SHOWMSG("Allocating __memalign_pool"); - __clib2->__memalign_pool = AllocSysObjectTags(ASOT_ITEMPOOL, + __clib4->__memalign_pool = AllocSysObjectTags(ASOT_ITEMPOOL, ASO_NoTrack, FALSE, ASO_MemoryOvr, MEMF_SHARED, ASOITEM_MFlags, MEMF_SHARED, @@ -343,7 +343,7 @@ reent_init(struct _clib2 *__clib2) { ASOITEM_GCPolicy, ITEMGC_AFTERCOUNT, ASOITEM_GCParameter, 1000, TAG_DONE); - if (!__clib2->__memalign_pool) { + if (!__clib4->__memalign_pool) { goto out; } @@ -354,7 +354,7 @@ reent_init(struct _clib2 *__clib2) { */ D(("Try to get elf handle for dl* operations")); - if (__clib2->IElf != NULL) { + if (__clib4->IElf != NULL) { D(("Calling GetProcSegList")); BPTR segment_list = GetProcSegList(NULL, GPSLF_RUN | GPSLF_SEG); if (segment_list != BZERO) { @@ -364,28 +364,28 @@ reent_init(struct _clib2 *__clib2) { if (GetSegListInfoTags(segment_list, GSLI_ElfHandle, &handle, TAG_DONE) == 1) { if (handle != NULL) { D(("Calling OpenElfTags")); - __clib2->__dl_root_handle = OpenElfTags(OET_ElfHandle, handle, TAG_DONE); - SHOWPOINTER(__clib2->__dl_root_handle); + __clib4->__dl_root_handle = OpenElfTags(OET_ElfHandle, handle, TAG_DONE); + SHOWPOINTER(__clib4->__dl_root_handle); } } } } - ClearMem(&__clib2->tmr_time, sizeof(struct itimerval)); + ClearMem(&__clib4->tmr_time, sizeof(struct itimerval)); /* Set ar4random stuff */ for (int i = 0; i <= 255; i++) { - __clib2->rs.s[i] = i; + __clib4->rs.s[i] = i; } /* Check if .unix file exists in the current dir. If the file exists enable unix path semantics */ D(("Check for .unix file")); - __clib2->__unix_path_semantics = FALSE; + __clib4->__unix_path_semantics = FALSE; struct ExamineData *exd = ExamineObjectTags(EX_StringNameInput, (CONST_STRPTR) ".unix", TAG_DONE); if (exd != NULL) { if (EXD_IS_FILE(exd)) { SHOWMSG("Enable unix paths"); - __clib2->__unix_path_semantics = TRUE; + __clib4->__unix_path_semantics = TRUE; } FreeDosObject(DOS_EXAMINEDATA, exd); } @@ -393,7 +393,7 @@ reent_init(struct _clib2 *__clib2) { /* This table holds pointers to all signal handlers configured at a time. */ SHOWMSG("Set signal table to SIG_DFL"); for (int i = 0; i < NSIG; i++) { - __clib2->__signal_handler_table[i] = SIG_DFL; + __clib4->__signal_handler_table[i] = SIG_DFL; } success = TRUE; @@ -401,44 +401,44 @@ reent_init(struct _clib2 *__clib2) { out: if (!success) { - reent_exit(__clib2, FALSE); + reent_exit(__clib4, FALSE); } } void -reent_exit(struct _clib2 *__clib2, BOOL fallback) { +reent_exit(struct _clib4 *__clib4, BOOL fallback) { /* Free global clib structure */ - if (__clib2) { + if (__clib4) { /* Check for getrandom fd */ if (!fallback) { /* We can't call close() in fallback reent, since destructors * are already called and function is no more available */ - if (__clib2->randfd[0] >= 0) { - close(__clib2->randfd[0]); + if (__clib4->randfd[0] >= 0) { + close(__clib4->randfd[0]); } - if (__clib2->randfd[1] >= 0) { - close(__clib2->randfd[1]); + if (__clib4->randfd[1] >= 0) { + close(__clib4->randfd[1]); } } /* Free wchar stuff */ - if (__clib2->wide_status != NULL) { - FreeVec(__clib2->wide_status); - __clib2->wide_status = NULL; + if (__clib4->wide_status != NULL) { + FreeVec(__clib4->wide_status); + __clib4->wide_status = NULL; } /* Remove random semaphore */ - __delete_semaphore(__clib2->__random_lock); + __delete_semaphore(__clib4->__random_lock); if (!fallback) { //TODO : Freeing memalign crash libExpunge and I don't know why /* Free memalign stuff */ - if (__clib2->__memalign_pool) { + if (__clib4->__memalign_pool) { /* Check if we have something created with posix_memalign and not freed yet. * But this is a good point also to free something allocated with memalign or * aligned_alloc and all other functions are using memalign_tree to allocate memory * This seems to cure also the memory leaks found sometimes (but not 100% sure..) */ - struct MemalignEntry *e = (struct MemalignEntry *) AVL_FindFirstNode(__clib2->__memalign_tree); + struct MemalignEntry *e = (struct MemalignEntry *) AVL_FindFirstNode(__clib4->__memalign_tree); while (e) { struct MemalignEntry *next = (struct MemalignEntry *) AVL_FindNextNodeByAddress(&e->me_AvlNode); @@ -447,34 +447,34 @@ reent_exit(struct _clib2 *__clib2, BOOL fallback) { FreeVec(e->me_Exact); } /* Remove the node */ - AVL_RemNodeByAddress(&__clib2->__memalign_tree, &e->me_AvlNode); - ItemPoolFree(__clib2->__memalign_pool, e); + AVL_RemNodeByAddress(&__clib4->__memalign_tree, &e->me_AvlNode); + ItemPoolFree(__clib4->__memalign_pool, e); e = next; } - FreeSysObject(ASOT_ITEMPOOL, __clib2->__memalign_pool); + FreeSysObject(ASOT_ITEMPOOL, __clib4->__memalign_pool); } } /* Free dl stuff */ struct ElfIFace *IElf = __IElf; - if (IElf && __clib2->__dl_root_handle != NULL) { - CloseElfTags(__clib2->__dl_root_handle, CET_ReClose, TRUE, TAG_DONE); - __clib2->__dl_root_handle = NULL; + if (IElf && __clib4->__dl_root_handle != NULL) { + CloseElfTags(__clib4->__dl_root_handle, CET_ReClose, TRUE, TAG_DONE); + __clib4->__dl_root_handle = NULL; } - FreeVec(__clib2); - __clib2 = NULL; + FreeVec(__clib4); + __clib4 = NULL; } } void enableUnixPaths(void) { - __CLIB2->__unix_path_semantics = TRUE; + __CLIB4->__unix_path_semantics = TRUE; } void disableUnixPaths(void) { - __CLIB2->__unix_path_semantics = FALSE; + __CLIB4->__unix_path_semantics = FALSE; } void enableAltivec(void) { @@ -482,24 +482,24 @@ void enableAltivec(void) { /* Check if altivec is present otherwise we can't enable it */ GetCPUInfoTags(GCIT_VectorUnit, &hasAltivec, TAG_DONE); if (hasAltivec) - __CLIB2->hasAltivec = 1; + __CLIB4->hasAltivec = 1; else - __CLIB2->hasAltivec = 0; + __CLIB4->hasAltivec = 0; } void disableAltivec(void) { - __CLIB2->hasAltivec = 0; + __CLIB4->hasAltivec = 0; } void enableOptimizedFunctions(void) { - __CLIB2->__optimizedCPUFunctions = TRUE; + __CLIB4->__optimizedCPUFunctions = TRUE; }; void disableOptimizedFunctions(void) { - __CLIB2->__optimizedCPUFunctions = FALSE; + __CLIB4->__optimizedCPUFunctions = FALSE; }; int *__mb_cur_max(void) { - return &__CLIB2->__mb_cur_max; + return &__CLIB4->__mb_cur_max; } diff --git a/library/locale/dcngettext.c b/library/locale/dcngettext.c index 158d9927..baf7e970 100644 --- a/library/locale/dcngettext.c +++ b/library/locale/dcngettext.c @@ -1,5 +1,5 @@ /* - * $Id: locale_dcngettext.c,v 1.0 2023-06-08 14:51:15 clib2devs Exp $ + * $Id: locale_dcngettext.c,v 1.0 2023-06-08 14:51:15 clib4devs Exp $ */ #ifndef _STDLIB_CONSTRUCTOR_H @@ -53,15 +53,15 @@ static const char *evalexpr(struct eval_s *ev, const char *s, int d); ****************************************************************************/ static char *gettextdomain(void) { - return __CLIB2->gettext_domain; + return __CLIB4->gettext_domain; } static char * gettextdir(const char *domainname, size_t *dirlen) { struct binding *p; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; - for (p = __clib2->bindings; p; p = p->next) { + for (p = __clib4->bindings; p; p = p->next) { if (!strcmp(p->domainname, domainname) && p->active) { *dirlen = p->dirlen; return (char *)p->dirname; @@ -459,7 +459,7 @@ char *dcngettext(const char *domainname, const char *msgid1, const char *msgid2, char *trans; const char *dirname; struct binding *q; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; notrans = (char *) (n == 1 ? msgid1 : msgid2); @@ -483,12 +483,12 @@ char *dcngettext(const char *domainname, const char *msgid1, const char *msgid2, } } - for (q = __clib2->bindings; q; q = q->next) + for (q = __clib4->bindings; q; q = q->next) if (!strcmp(q->domainname, domainname) && q->active) break; if (q) { dirname = q->dirname; - if (__clib2->__unix_path_semantics) { + if (__clib4->__unix_path_semantics) { snprintf(path, PATH_MAX, "%s/%s/%s/%s.mo", dirname, lang, g_catname[category], domainname); } else { @@ -501,15 +501,15 @@ char *dcngettext(const char *domainname, const char *msgid1, const char *msgid2, } } else { - if (__clib2->__unix_path_semantics) + if (__clib4->__unix_path_semantics) snprintf(path, PATH_MAX, "./%s/%s/%s.mo", lang, g_catname[category], domainname); else snprintf(path, PATH_MAX, "CURRDIR:%s/%s/%s.mo", lang, g_catname[category], domainname); } - ObtainSemaphore(__clib2->gettext_lock); + ObtainSemaphore(__clib4->gettext_lock); - for (mofile = __clib2->g_mofile; mofile; mofile = mofile->next) { + for (mofile = __clib4->g_mofile; mofile; mofile = mofile->next) { if (strcmp(mofile->path, path) == 0) { break; } @@ -520,14 +520,14 @@ char *dcngettext(const char *domainname, const char *msgid1, const char *msgid2, mofile = AllocVecTags(sizeof(*mofile), AVT_Type, MEMF_SHARED, AVT_ClearWithValue, 0, TAG_DONE); if (mofile == NULL) { - ReleaseSemaphore(__clib2->gettext_lock); + ReleaseSemaphore(__clib4->gettext_lock); return notrans; } strlcpy(mofile->path, path, PATH_MAX); mofile->map = momap(path, &mofile->size); if (mofile->map == MAP_FAILED) { - ReleaseSemaphore(__clib2->gettext_lock); + ReleaseSemaphore(__clib4->gettext_lock); FreeVec(mofile); return notrans; } @@ -562,11 +562,11 @@ char *dcngettext(const char *domainname, const char *msgid1, const char *msgid2, } } - mofile->next = __clib2->g_mofile; - __clib2->g_mofile = mofile; + mofile->next = __clib4->g_mofile; + __clib4->g_mofile = mofile; } - ReleaseSemaphore(__clib2->gettext_lock); /* Leave look before search */ + ReleaseSemaphore(__clib4->gettext_lock); /* Leave look before search */ trans = molookup(mofile->map, mofile->size, msgid1); if (trans == NULL) { @@ -685,7 +685,7 @@ char *textdomain(const char *domainname) { ****************************************************************************/ char *bindtextdomain(const char *domainname, const char *dirname) { - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; struct name_translation_info path_name_nti; struct binding *p, *q; @@ -704,8 +704,8 @@ char *bindtextdomain(const char *domainname, const char *dirname) { return NULL; } - ObtainSemaphore(__clib2->gettext_lock); - for (p = __clib2->bindings; p; p = p->next) { + ObtainSemaphore(__clib4->gettext_lock); + for (p = __clib4->bindings; p; p = p->next) { if (!strcmp(p->domainname, domainname) && !strcmp(p->dirname, dirname)) { break; } @@ -714,26 +714,26 @@ char *bindtextdomain(const char *domainname, const char *dirname) { if (!p) { p = AllocVecTags(sizeof *p + domlen + dirlen + 2, AVT_Type, MEMF_SHARED, AVT_ClearWithValue, 0, TAG_DONE); if (!p) { - ReleaseSemaphore(__clib2->gettext_lock); + ReleaseSemaphore(__clib4->gettext_lock); return NULL; } - p->next = __clib2->bindings; + p->next = __clib4->bindings; p->dirlen = dirlen; p->domainname = p->buf; p->dirname = p->buf + domlen + 1; memcpy(p->domainname, domainname, domlen+1); memcpy(p->dirname, dirname, dirlen+1); - a_cas_p(&__clib2->bindings, __clib2->bindings, p); + a_cas_p(&__clib4->bindings, __clib4->bindings, p); } a_store(&p->active, 1); - for (q = __clib2->bindings; q; q = q->next) { + for (q = __clib4->bindings; q; q = q->next) { if (!strcmp(q->domainname, domainname) && q != p) a_store(&q->active, 0); } - ReleaseSemaphore(__clib2->gettext_lock); + ReleaseSemaphore(__clib4->gettext_lock); return (char *) p->dirname; } @@ -774,10 +774,10 @@ char *bind_textdomain_codeset(const char *domainname, const char *codeset) { } CLIB_DESTRUCTOR(dcngettext_exit) { - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; /* Free binddtextdomain bindings */ - if (__clib2->g_mofile) { - struct mofile_s *mofile = __clib2->g_mofile; + if (__clib4->g_mofile) { + struct mofile_s *mofile = __clib4->g_mofile; while (mofile) { struct mofile_s *next = mofile->next; if (mofile) @@ -785,7 +785,7 @@ CLIB_DESTRUCTOR(dcngettext_exit) { mofile = next; } } - struct binding *p = __clib2->bindings; + struct binding *p = __clib4->bindings; while (p) { struct binding *q = p->next; FreeVec(p); diff --git a/library/locale/init_exit.c b/library/locale/init_exit.c index 5d6e9e5b..5705ba94 100644 --- a/library/locale/init_exit.c +++ b/library/locale/init_exit.c @@ -1,5 +1,5 @@ /* - * $Id: locale_init_exit.c,v 1.15 2006-01-08 12:04:23 clib2devs Exp $ + * $Id: locale_init_exit.c,v 1.15 2006-01-08 12:04:23 clib4devs Exp $ */ #ifndef _LOCALE_HEADERS_H @@ -12,10 +12,10 @@ #include -void __close_all_locales(struct _clib2 *__clib2) { - __locale_lock(__clib2); +void __close_all_locales(struct _clib4 *__clib4) { + __locale_lock(__clib4); - if (__clib2->__LocaleBase != NULL) { + if (__clib4->__LocaleBase != NULL) { DECLARE_LOCALEBASE(); int i; @@ -24,127 +24,127 @@ void __close_all_locales(struct _clib2 *__clib2) { if (i == LC_ALL) continue; - if (__clib2->__locale_table[i] != NULL) { - if (__clib2->__locale_table[i] != __clib2->__locale_table[LC_ALL]) - CloseLocale(__clib2->__locale_table[i]); + if (__clib4->__locale_table[i] != NULL) { + if (__clib4->__locale_table[i] != __clib4->__locale_table[LC_ALL]) + CloseLocale(__clib4->__locale_table[i]); - __clib2->__locale_table[i] = NULL; + __clib4->__locale_table[i] = NULL; } } - CloseLocale(__clib2->__locale_table[LC_ALL]); - __clib2->__locale_table[LC_ALL] = NULL; + CloseLocale(__clib4->__locale_table[LC_ALL]); + __clib4->__locale_table[LC_ALL] = NULL; } - __locale_unlock(__clib2); + __locale_unlock(__clib4); } -void __locale_exit(struct _clib2 *__clib2) { +void __locale_exit(struct _clib4 *__clib4) { ENTER(); - __locale_lock(__clib2); + __locale_lock(__clib4); - if (__clib2->__LocaleBase != NULL) { + if (__clib4->__LocaleBase != NULL) { DECLARE_LOCALEBASE(); - __close_all_locales(__clib2); + __close_all_locales(__clib4); - if (__clib2->__default_locale != NULL) { - CloseLocale(__clib2->__default_locale); - __clib2->__default_locale = NULL; + if (__clib4->__default_locale != NULL) { + CloseLocale(__clib4->__default_locale); + __clib4->__default_locale = NULL; } - if (__clib2->__ILocale != NULL) { - DropInterface((struct Interface *) __clib2->__ILocale); - __clib2->__ILocale = NULL; + if (__clib4->__ILocale != NULL) { + DropInterface((struct Interface *) __clib4->__ILocale); + __clib4->__ILocale = NULL; } - CloseLibrary(__clib2->__LocaleBase); - __clib2->__LocaleBase = NULL; + CloseLibrary(__clib4->__LocaleBase); + __clib4->__LocaleBase = NULL; } - if (__clib2->__IDiskfont != NULL) { - DropInterface((struct Interface *) __clib2->__IDiskfont); - __clib2->__IDiskfont = NULL; + if (__clib4->__IDiskfont != NULL) { + DropInterface((struct Interface *) __clib4->__IDiskfont); + __clib4->__IDiskfont = NULL; } - if (__clib2->__DiskfontBase != NULL) { - CloseLibrary(__clib2->__DiskfontBase); - __clib2->__DiskfontBase = NULL; + if (__clib4->__DiskfontBase != NULL) { + CloseLibrary(__clib4->__DiskfontBase); + __clib4->__DiskfontBase = NULL; } - __locale_unlock(__clib2); + __locale_unlock(__clib4); LEAVE(); } -int __locale_init(struct _clib2 *__clib2) { +int __locale_init(struct _clib4 *__clib4) { int result = ERROR; ENTER(); - __locale_lock(__clib2); + __locale_lock(__clib4); - if (__clib2->__LocaleBase == NULL) { - __clib2->__LocaleBase = OpenLibrary("locale.library", 52); - if (__clib2->__LocaleBase != NULL) { - __clib2->__ILocale = (struct LocaleIFace *)GetInterface(__clib2->__LocaleBase, "main", 1, 0); - if (__clib2->__ILocale == NULL) { - CloseLibrary(__clib2->__LocaleBase); - __clib2->__LocaleBase = NULL; + if (__clib4->__LocaleBase == NULL) { + __clib4->__LocaleBase = OpenLibrary("locale.library", 52); + if (__clib4->__LocaleBase != NULL) { + __clib4->__ILocale = (struct LocaleIFace *)GetInterface(__clib4->__LocaleBase, "main", 1, 0); + if (__clib4->__ILocale == NULL) { + CloseLibrary(__clib4->__LocaleBase); + __clib4->__LocaleBase = NULL; } - __clib2->__DiskfontBase = OpenLibrary("diskfont.library", 52); - if (__clib2->__DiskfontBase) { - __clib2->__IDiskfont = (struct DiskfontIFace *) GetInterface(__clib2->__DiskfontBase, "main", 1, NULL); - if (!__clib2->__IDiskfont) { - DropInterface((struct Interface *) __clib2->__ILocale); + __clib4->__DiskfontBase = OpenLibrary("diskfont.library", 52); + if (__clib4->__DiskfontBase) { + __clib4->__IDiskfont = (struct DiskfontIFace *) GetInterface(__clib4->__DiskfontBase, "main", 1, NULL); + if (!__clib4->__IDiskfont) { + DropInterface((struct Interface *) __clib4->__ILocale); - CloseLibrary(__clib2->__LocaleBase); - __clib2->__LocaleBase = NULL; + CloseLibrary(__clib4->__LocaleBase); + __clib4->__LocaleBase = NULL; - CloseLibrary(__clib2->__DiskfontBase); - __clib2->__DiskfontBase = NULL; + CloseLibrary(__clib4->__DiskfontBase); + __clib4->__DiskfontBase = NULL; } } } } - if (__clib2->__LocaleBase != NULL && __clib2->__default_locale == NULL) { + if (__clib4->__LocaleBase != NULL && __clib4->__default_locale == NULL) { DECLARE_LOCALEBASE(); - __clib2->__default_locale = OpenLocale(NULL); + __clib4->__default_locale = OpenLocale(NULL); } - if (__clib2->__default_locale != NULL) { + if (__clib4->__default_locale != NULL) { result = OK; } - __locale_unlock(__clib2); + __locale_unlock(__clib4); RETURN(result); return (result); } -void __locale_lock(struct _clib2 *__clib2) { - if (__clib2->locale_lock != NULL) - ObtainSemaphore(__clib2->locale_lock); +void __locale_lock(struct _clib4 *__clib4) { + if (__clib4->locale_lock != NULL) + ObtainSemaphore(__clib4->locale_lock); } -void __locale_unlock(struct _clib2 *__clib2) { - if (__clib2->locale_lock != NULL) - ReleaseSemaphore(__clib2->locale_lock); +void __locale_unlock(struct _clib4 *__clib4) { + if (__clib4->locale_lock != NULL) + ReleaseSemaphore(__clib4->locale_lock); } CLIB_DESTRUCTOR(locale_exit) { ENTER(); - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; - __locale_exit(__clib2); + __locale_exit(__clib4); - __delete_semaphore(__clib2->locale_lock); - __clib2->locale_lock = NULL; + __delete_semaphore(__clib4->locale_lock); + __clib4->locale_lock = NULL; - __delete_semaphore(__clib2->gettext_lock); - __clib2->gettext_lock = NULL; + __delete_semaphore(__clib4->gettext_lock); + __clib4->gettext_lock = NULL; LEAVE(); } @@ -152,27 +152,27 @@ CLIB_DESTRUCTOR(locale_exit) { CLIB_CONSTRUCTOR(locale_init) { BOOL success = FALSE; int i; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); - __clib2->locale_lock = __create_semaphore(); - if (__clib2->locale_lock == NULL) { + __clib4->locale_lock = __create_semaphore(); + if (__clib4->locale_lock == NULL) { goto out; } - __clib2->gettext_lock = __create_semaphore(); - if (__clib2->gettext_lock == NULL) { + __clib4->gettext_lock = __create_semaphore(); + if (__clib4->gettext_lock == NULL) { goto out; } for (i = 0; i < NUM_LOCALES; i++) { - strcpy(__clib2->__locale_name_table[i], "C-UTF-8"); + strcpy(__clib4->__locale_name_table[i], "C-UTF-8"); } - strncpy(__clib2->gettext_domain, "messages", NAME_MAX); + strncpy(__clib4->gettext_domain, "messages", NAME_MAX); - __locale_init(__clib2); + __locale_init(__clib4); success = TRUE; diff --git a/library/locale/langinfo.c b/library/locale/langinfo.c index e2ea6eb6..d51711ec 100644 --- a/library/locale/langinfo.c +++ b/library/locale/langinfo.c @@ -1,5 +1,5 @@ /* - * $Id: langinfo_langinfo.c,v 1.0 2021-01-15 22:47:14 clib2devs Exp $ + * $Id: langinfo_langinfo.c,v 1.0 2021-01-15 22:47:14 clib4devs Exp $ */ /****************************************************************************/ @@ -26,7 +26,7 @@ nl_langinfo(nl_item item) { ENTER(); DECLARE_LOCALEBASE(); DECLARE_FONTBASE(); - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; const char *ret = NULL; char *cs; @@ -35,7 +35,7 @@ nl_langinfo(nl_item item) { switch (item) { case CODESET: ret = ""; - const char *s = __clib2->_current_locale; + const char *s = __clib4->_current_locale; if (strstr(s, "C-")) { if ((cs = strchr(s, '-')) != NULL) { ret = cs + 1; @@ -68,22 +68,22 @@ nl_langinfo(nl_item item) { ret = "US-ASCII"; if (ret == NULL) { - uint32 default_charset = __clib2->__default_locale->loc_CodeSet; + uint32 default_charset = __clib4->__default_locale->loc_CodeSet; ret = (char *) ObtainCharsetInfo(DFCS_NUMBER, default_charset, DFCS_MIMENAME); } } else { - uint32 default_charset = __clib2->__default_locale->loc_CodeSet; + uint32 default_charset = __clib4->__default_locale->loc_CodeSet; ret = (char *) ObtainCharsetInfo(DFCS_NUMBER, default_charset, DFCS_MIMENAME); } break; case D_T_FMT: - ret = (char *) __clib2->__default_locale->loc_DateTimeFormat; + ret = (char *) __clib4->__default_locale->loc_DateTimeFormat; break; case D_FMT: - ret = (char *) __clib2->__default_locale->loc_DateFormat; + ret = (char *) __clib4->__default_locale->loc_DateFormat; break; case T_FMT: - ret = (char *) __clib2->__default_locale->loc_TimeFormat; + ret = (char *) __clib4->__default_locale->loc_TimeFormat; break; case AM_STR: ret = (char *) "AM"; // hardcoded @@ -92,10 +92,10 @@ nl_langinfo(nl_item item) { ret = (char *) "PM"; // hardcoded; break; case RADIXCHAR: - ret = (char *) __clib2->__default_locale->loc_DecimalPoint; + ret = (char *) __clib4->__default_locale->loc_DecimalPoint; break; case THOUSEP: - ret = (char *) __clib2->__default_locale->loc_GroupSeparator; + ret = (char *) __clib4->__default_locale->loc_GroupSeparator; break; default: ret = ""; diff --git a/library/locale/locale_headers.h b/library/locale/locale_headers.h index 8efadbeb..f5979245 100755 --- a/library/locale/locale_headers.h +++ b/library/locale/locale_headers.h @@ -1,5 +1,5 @@ /* - * $Id: locale_headers.h,v 2.0 2023-05-03 12:04:23 clib2devs Exp $ + * $Id: locale_headers.h,v 2.0 2023-05-03 12:04:23 clib4devs Exp $ */ #ifndef _LOCALE_HEADERS_H @@ -39,8 +39,8 @@ #include -extern void __locale_lock(struct _clib2 *__clib2); -extern void __locale_unlock(struct _clib2 *__clib2); -extern void __close_all_locales(struct _clib2 *__clib2); +extern void __locale_lock(struct _clib4 *__clib4); +extern void __locale_unlock(struct _clib4 *__clib4); +extern void __close_all_locales(struct _clib4 *__clib4); #endif /* _LOCALE_HEADERS_H */ diff --git a/library/locale/localeconv.c b/library/locale/localeconv.c index 601afde7..74df2433 100644 --- a/library/locale/localeconv.c +++ b/library/locale/localeconv.c @@ -1,5 +1,5 @@ /* - * $Id: locale_localeconv.c,v 1.7 2006-09-25 14:51:15 clib2devs Exp $ + * $Id: locale_localeconv.c,v 1.7 2006-09-25 14:51:15 clib4devs Exp $ */ #ifndef _LOCALE_HEADERS_H @@ -13,14 +13,14 @@ localeconv(void) { struct Locale *numeric_locale; struct Locale *monetary_locale; struct lconv *result; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); - __locale_lock(__clib2); + __locale_lock(__clib4); - numeric_locale = __clib2->__locale_table[LC_NUMERIC]; - monetary_locale = __clib2->__locale_table[LC_MONETARY]; + numeric_locale = __clib4->__locale_table[LC_NUMERIC]; + monetary_locale = __clib4->__locale_table[LC_MONETARY]; /* This makes up the current locale settings from the various components in use. */ @@ -47,7 +47,7 @@ localeconv(void) { result = &loc; - __locale_unlock(__clib2); + __locale_unlock(__clib4); RETURN(result); return (result); diff --git a/library/locale/setlocale.c b/library/locale/setlocale.c index 673384f1..47832c28 100644 --- a/library/locale/setlocale.c +++ b/library/locale/setlocale.c @@ -1,5 +1,5 @@ /* - * $Id: locale_setlocale.c,v 1.5 2006-01-08 12:04:23 clib2devs Exp $ + * $Id: locale_setlocale.c,v 1.5 2006-01-08 12:04:23 clib4devs Exp $ */ #ifndef _LOCALE_HEADERS_H @@ -10,7 +10,7 @@ char * setlocale(int category, const char *locale) { DECLARE_LOCALEBASE(); char *result = NULL; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); @@ -21,7 +21,7 @@ setlocale(int category, const char *locale) { else SHOWSTRING(locale); - __locale_lock(__clib2); + __locale_lock(__clib4); if (category < LC_ALL || category > LC_MAX) { SHOWMSG("invalid category"); @@ -136,17 +136,17 @@ setlocale(int category, const char *locale) { /* We have to replace all locales. We * start by closing them all. */ - __close_all_locales(__clib2); + __close_all_locales(__clib4); SHOWMSG("reinitializing all locales"); /* And this puts the new locale into all table entries. */ for (i = 0; i < NUM_LOCALES; i++) { - __clib2->__locale_table[i] = loc; + __clib4->__locale_table[i] = loc; if (locale[0] != '\0') - strcpy(__clib2->__locale_name_table[i], locale); + strcpy(__clib4->__locale_name_table[i], locale); else - strcpy(__clib2->__locale_name_table[i], "C-UTF-8"); + strcpy(__clib4->__locale_name_table[i], "C-UTF-8"); } if (strcmp(locale, "C") == SAME || strcmp(locale, "C-UTF-8") == SAME) { @@ -219,28 +219,28 @@ setlocale(int category, const char *locale) { /* Close this single locale unless it's actually just a * copy of the 'all' locale entry. */ - if (__clib2->__locale_table[category] != NULL && __clib2->__locale_table[category] != __clib2->__locale_table[LC_ALL]) { + if (__clib4->__locale_table[category] != NULL && __clib4->__locale_table[category] != __clib4->__locale_table[LC_ALL]) { assert(LocaleBase != NULL); - CloseLocale(__clib2->__locale_table[category]); + CloseLocale(__clib4->__locale_table[category]); } SHOWMSG("reinitializing the locale"); - __clib2->__locale_table[category] = loc; + __clib4->__locale_table[category] = loc; if (locale[0] != '\0') { - strcpy(__clib2->__locale_name_table[category], locale); + strcpy(__clib4->__locale_name_table[category], locale); } } } - result = __clib2->__locale_name_table[category]; + result = __clib4->__locale_name_table[category]; SHOWSTRING(result); out: - __clib2->_current_category = category; - __clib2->_current_locale = result; + __clib4->_current_category = category; + __clib4->_current_locale = result; - __locale_unlock(__clib2); + __locale_unlock(__clib4); RETURN(result); return result; diff --git a/library/macros.h b/library/macros.h index 85edcec5..e52b4740 100755 --- a/library/macros.h +++ b/library/macros.h @@ -1,5 +1,5 @@ /* - * $Id: macros.h,v 1.22 2006-01-08 12:04:23 clib2devs Exp $ + * $Id: macros.h,v 1.22 2006-01-08 12:04:23 clib4devs Exp $ */ #ifndef _MACROS_H diff --git a/library/math/b_tgamma.c b/library/math/b_tgamma.c index 9fd9cb3d..3018ee48 100644 --- a/library/math/b_tgamma.c +++ b/library/math/b_tgamma.c @@ -1,5 +1,5 @@ /* - * $Id: math_b_tgamma.c,v 1.4 2023-07-19 20:04:24 clib2devs Exp $ + * $Id: math_b_tgamma.c,v 1.4 2023-07-19 20:04:24 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/complex_headers.h b/library/math/complex_headers.h index 36a651fb..ceb66117 100755 --- a/library/math/complex_headers.h +++ b/library/math/complex_headers.h @@ -1,5 +1,5 @@ /* - * $Id: complex_headers.h,v 1.5 2006-01-30 12:04:22 clib2devs Exp $ + * $Id: complex_headers.h,v 1.5 2006-01-30 12:04:22 clib4devs Exp $ */ #ifndef _COMPLEX_HEADERS_H diff --git a/library/math/e_acos.c b/library/math/e_acos.c index 07d4e47c..c79fcfd1 100644 --- a/library/math/e_acos.c +++ b/library/math/e_acos.c @@ -1,5 +1,5 @@ /* - * $Id: math_e_acos.c,v 1.10 20213-07-19 12:04:23 clib2devs Exp $ + * $Id: math_e_acos.c,v 1.10 20213-07-19 12:04:23 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/e_acosf.c b/library/math/e_acosf.c index 0d0f7cab..cfbfc62c 100644 --- a/library/math/e_acosf.c +++ b/library/math/e_acosf.c @@ -1,5 +1,5 @@ /* - * $Id: math_e_acosf.c,v 1.4 2023-07-19 12:04:23 clib2devs Exp $ + * $Id: math_e_acosf.c,v 1.4 2023-07-19 12:04:23 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/e_acosh.c b/library/math/e_acosh.c index 7669bc31..bad0e2c9 100644 --- a/library/math/e_acosh.c +++ b/library/math/e_acosh.c @@ -1,5 +1,5 @@ /* - * $Id: math_e_acosh.c,v 1.4 2023-07-19 12:04:23 clib2devs Exp $ + * $Id: math_e_acosh.c,v 1.4 2023-07-19 12:04:23 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/e_acoshf.c b/library/math/e_acoshf.c index a2eb2aa1..a387f062 100644 --- a/library/math/e_acoshf.c +++ b/library/math/e_acoshf.c @@ -1,5 +1,5 @@ /* - * $Id: math_e_acoshf.c,v 1.5 2023-07-19 12:04:23 clib2devs Exp $ + * $Id: math_e_acoshf.c,v 1.5 2023-07-19 12:04:23 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/e_acoshl.c b/library/math/e_acoshl.c index e5d92729..f2c5f194 100644 --- a/library/math/e_acoshl.c +++ b/library/math/e_acoshl.c @@ -1,5 +1,5 @@ /* - * $Id: math_e_acoshl.c,v 1.1 2023-07-19 12:04:23 clib2devs Exp $ + * $Id: math_e_acoshl.c,v 1.1 2023-07-19 12:04:23 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/e_acosl.c b/library/math/e_acosl.c index d255eddb..0724bc35 100644 --- a/library/math/e_acosl.c +++ b/library/math/e_acosl.c @@ -1,5 +1,5 @@ /* - * $Id: math_e_acosl.c,v 1.1 2023-07-19 12:04:23 clib2devs Exp $ + * $Id: math_e_acosl.c,v 1.1 2023-07-19 12:04:23 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/e_asin.c b/library/math/e_asin.c index bb27abd6..5ba02d4a 100644 --- a/library/math/e_asin.c +++ b/library/math/e_asin.c @@ -1,5 +1,5 @@ /* - * $Id: math_e_asin.c,v 1.10 2023-07-19 12:04:23 clib2devs Exp $ + * $Id: math_e_asin.c,v 1.10 2023-07-19 12:04:23 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/e_asinf.c b/library/math/e_asinf.c index 4200b14c..e7344c3d 100644 --- a/library/math/e_asinf.c +++ b/library/math/e_asinf.c @@ -1,5 +1,5 @@ /* - * $Id: math_e_asinf.c,v 1.5 2023-07-19 12:04:23 clib2devs Exp $ + * $Id: math_e_asinf.c,v 1.5 2023-07-19 12:04:23 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/e_asinl.c b/library/math/e_asinl.c index fa6617c1..853eac7c 100644 --- a/library/math/e_asinl.c +++ b/library/math/e_asinl.c @@ -1,5 +1,5 @@ /* - * $Id: math_e_asinl.c,v 1.1 2023-07-19 12:04:23 clib2devs Exp $ + * $Id: math_e_asinl.c,v 1.1 2023-07-19 12:04:23 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/e_atan2.c b/library/math/e_atan2.c index 1bd51f8d..a00dd84a 100644 --- a/library/math/e_atan2.c +++ b/library/math/e_atan2.c @@ -1,5 +1,5 @@ /* - * $Id: math_e_atan2.c,v 1.10 2021-02-16 07:54:24 clib2devs Exp $ + * $Id: math_e_atan2.c,v 1.10 2021-02-16 07:54:24 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/e_atan2l.c b/library/math/e_atan2l.c index 97966fe2..09323526 100644 --- a/library/math/e_atan2l.c +++ b/library/math/e_atan2l.c @@ -1,5 +1,5 @@ /* - * $Id: math_e_atan2l.c,v 1.1 2023-07-19 12:04:23 clib2devs Exp $ + * $Id: math_e_atan2l.c,v 1.1 2023-07-19 12:04:23 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/e_atanh.c b/library/math/e_atanh.c index 7935cf45..612bcebd 100644 --- a/library/math/e_atanh.c +++ b/library/math/e_atanh.c @@ -1,5 +1,5 @@ /* - * $Id: math_e_atanh.c,v 1.5 2023-07-19 12:04:23 clib2devs Exp $ + * $Id: math_e_atanh.c,v 1.5 2023-07-19 12:04:23 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/e_atanhf.c b/library/math/e_atanhf.c index bfe000e7..545a6203 100644 --- a/library/math/e_atanhf.c +++ b/library/math/e_atanhf.c @@ -1,5 +1,5 @@ /* - * $Id: math_e_atanhf.c,v 1.4 2023-07-19 12:04:23 clib2devs Exp $ + * $Id: math_e_atanhf.c,v 1.4 2023-07-19 12:04:23 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/e_atanhl.c b/library/math/e_atanhl.c index 8e603faf..4ebce09f 100644 --- a/library/math/e_atanhl.c +++ b/library/math/e_atanhl.c @@ -1,5 +1,5 @@ /* - * $Id: math_e_atanhl.c,v 1.2 2022-03-10 19:28:23 clib2devs Exp $ + * $Id: math_e_atanhl.c,v 1.2 2022-03-10 19:28:23 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/e_cosh.c b/library/math/e_cosh.c index 4e57706a..3e612406 100644 --- a/library/math/e_cosh.c +++ b/library/math/e_cosh.c @@ -1,5 +1,5 @@ /* - * $Id: math_e_cosh.c,v 1.8 2023-07-19 12:04:23 clib2devs Exp $ + * $Id: math_e_cosh.c,v 1.8 2023-07-19 12:04:23 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/e_coshf.c b/library/math/e_coshf.c index 8c293d2d..87fb35fa 100644 --- a/library/math/e_coshf.c +++ b/library/math/e_coshf.c @@ -1,5 +1,5 @@ /* - * $Id: math_e_coshf.c,v 1.5 2023-07-19 12:04:23 clib2devs Exp $ + * $Id: math_e_coshf.c,v 1.5 2023-07-19 12:04:23 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/e_coshl.c b/library/math/e_coshl.c index 0ed2de6b..6cfb5deb 100644 --- a/library/math/e_coshl.c +++ b/library/math/e_coshl.c @@ -1,5 +1,5 @@ /* - * $Id: math_e_coshl.c,v 1.0 2023-07-19 12:04:23 clib2devs Exp $ + * $Id: math_e_coshl.c,v 1.0 2023-07-19 12:04:23 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/e_exp.c b/library/math/e_exp.c index 8d05869e..414379dd 100644 --- a/library/math/e_exp.c +++ b/library/math/e_exp.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_exp.c,v 1.9 2023-07-19 09:02:51 clib2devs Exp $ + * $Id: math_s_exp.c,v 1.9 2023-07-19 09:02:51 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/e_expf.c b/library/math/e_expf.c index ac508f3b..a77cb5e5 100644 --- a/library/math/e_expf.c +++ b/library/math/e_expf.c @@ -1,5 +1,5 @@ /* - * $Id: math_expf.c,v 1.3 2006-01-08 12:04:23 clib2devs Exp $ + * $Id: math_expf.c,v 1.3 2006-01-08 12:04:23 clib4devs Exp $ * * diff --git a/library/math/e_fmod.c b/library/math/e_fmod.c index e16958a5..420dc845 100644 --- a/library/math/e_fmod.c +++ b/library/math/e_fmod.c @@ -1,5 +1,5 @@ /* - * $Id: math_e_fmod.c,v 1.7 2023-07-19 12:04:23 clib2devs Exp $ + * $Id: math_e_fmod.c,v 1.7 2023-07-19 12:04:23 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/e_fmodf.c b/library/math/e_fmodf.c index 03a38802..0dd4ab51 100644 --- a/library/math/e_fmodf.c +++ b/library/math/e_fmodf.c @@ -1,5 +1,5 @@ /* - * $Id: math_e_fmodf.c,v 1.7 2023-07-19 12:04:23 clib2devs Exp $ + * $Id: math_e_fmodf.c,v 1.7 2023-07-19 12:04:23 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/e_fmodl.c b/library/math/e_fmodl.c index 0cb37ea7..8752c707 100644 --- a/library/math/e_fmodl.c +++ b/library/math/e_fmodl.c @@ -1,5 +1,5 @@ /* - * $Id: math_e_fmodl.c,v 1.0 2023-07-19 11:48:23 clib2devs Exp $ + * $Id: math_e_fmodl.c,v 1.0 2023-07-19 11:48:23 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/e_hypot.c b/library/math/e_hypot.c index dc726e61..533ce0b4 100644 --- a/library/math/e_hypot.c +++ b/library/math/e_hypot.c @@ -1,5 +1,5 @@ /* - * $Id: math_e_hypot.c,v 1.6 2023-07-19 12:04:23 clib2devs Exp $ + * $Id: math_e_hypot.c,v 1.6 2023-07-19 12:04:23 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/e_hypotf.c b/library/math/e_hypotf.c index 5fb17753..7d88a343 100644 --- a/library/math/e_hypotf.c +++ b/library/math/e_hypotf.c @@ -1,5 +1,5 @@ /* - * $Id: math_e_hypotf.c,v 1.4 2023-07-19 12:04:23 clib2devs Exp $ + * $Id: math_e_hypotf.c,v 1.4 2023-07-19 12:04:23 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/e_hypotl.c b/library/math/e_hypotl.c index 9019fc84..c60e53e1 100644 --- a/library/math/e_hypotl.c +++ b/library/math/e_hypotl.c @@ -1,5 +1,5 @@ /* - * $Id: math_e_hypotl.c,v 1.0 2023-07-19 11:48:23 clib2devs Exp $*/ + * $Id: math_e_hypotl.c,v 1.0 2023-07-19 11:48:23 clib4devs Exp $*/ #ifndef _MATH_HEADERS_H #include "math_headers.h" diff --git a/library/math/e_j0.c b/library/math/e_j0.c index 7f0279dc..f6128b02 100644 --- a/library/math/e_j0.c +++ b/library/math/e_j0.c @@ -1,5 +1,5 @@ /* - * $Id: math_j0.c,v 1.0 2023-07-19 11:18:23 clib2devs Exp $ + * $Id: math_j0.c,v 1.0 2023-07-19 11:18:23 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/e_j0f.c b/library/math/e_j0f.c index aab009ca..7d8dbf0b 100644 --- a/library/math/e_j0f.c +++ b/library/math/e_j0f.c @@ -1,5 +1,5 @@ /* - * $Id: math_e_j0f.c,v 1.0 2023-07-18 11:18:23 clib2devs Exp $ + * $Id: math_e_j0f.c,v 1.0 2023-07-18 11:18:23 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/e_j1.c b/library/math/e_j1.c index c45a5064..b64e5f3c 100644 --- a/library/math/e_j1.c +++ b/library/math/e_j1.c @@ -1,5 +1,5 @@ /* - * $Id: math_e_j1.c,v 1.0 2023-07-19 11:18:23 clib2devs Exp $ + * $Id: math_e_j1.c,v 1.0 2023-07-19 11:18:23 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/e_j1f.c b/library/math/e_j1f.c index a519e2b8..4c08229d 100644 --- a/library/math/e_j1f.c +++ b/library/math/e_j1f.c @@ -1,5 +1,5 @@ /* - * $Id: math_e_j1f.c,v 1.0 2023-07-19 11:18:23 clib2devs Exp $ + * $Id: math_e_j1f.c,v 1.0 2023-07-19 11:18:23 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/e_jn.c b/library/math/e_jn.c index 4b9529e3..dc830d2a 100644 --- a/library/math/e_jn.c +++ b/library/math/e_jn.c @@ -1,5 +1,5 @@ /* - * $Id: math_e_jn.c,v 1.0 2023-07-19 11:18:23 clib2devs Exp $ + * $Id: math_e_jn.c,v 1.0 2023-07-19 11:18:23 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/e_jnf.c b/library/math/e_jnf.c index 93ae22b1..8151874f 100644 --- a/library/math/e_jnf.c +++ b/library/math/e_jnf.c @@ -1,5 +1,5 @@ /* - * $Id: math_e_jnf.c,v 1.0 2023-07-19 11:18:23 clib2devs Exp $ + * $Id: math_e_jnf.c,v 1.0 2023-07-19 11:18:23 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/e_lgamma.c b/library/math/e_lgamma.c index fb1287db..61935854 100644 --- a/library/math/e_lgamma.c +++ b/library/math/e_lgamma.c @@ -1,5 +1,5 @@ /* - * $Id: math_e_lgamma.c,v 1.4 2023-07-19 12:04:23 clib2devs Exp $ + * $Id: math_e_lgamma.c,v 1.4 2023-07-19 12:04:23 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/e_lgammaf.c b/library/math/e_lgammaf.c index 5af09103..9bbf6d5f 100644 --- a/library/math/e_lgammaf.c +++ b/library/math/e_lgammaf.c @@ -1,5 +1,5 @@ /* - * $Id: math_e_lgammaf.c,v 1.5 2023-07-19 12:04:23 clib2devs Exp $ + * $Id: math_e_lgammaf.c,v 1.5 2023-07-19 12:04:23 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/e_lgammal.c b/library/math/e_lgammal.c index 36e877cd..6ee3fd6e 100644 --- a/library/math/e_lgammal.c +++ b/library/math/e_lgammal.c @@ -1,5 +1,5 @@ /* - * $Id: math_e_lgammal.c,v 1.0 2023-07-19 07:54:24 clib2devs Exp $ + * $Id: math_e_lgammal.c,v 1.0 2023-07-19 07:54:24 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H #include "math_headers.h" diff --git a/library/math/e_log10.c b/library/math/e_log10.c index 3c9c31b9..a8091173 100644 --- a/library/math/e_log10.c +++ b/library/math/e_log10.c @@ -1,5 +1,5 @@ /* - * $Id: math_e_log10.c,v 1.9 2023-07-19 11:23:53 clib2devs Exp $ + * $Id: math_e_log10.c,v 1.9 2023-07-19 11:23:53 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/e_log10f.c b/library/math/e_log10f.c index e776290c..99adf7ea 100644 --- a/library/math/e_log10f.c +++ b/library/math/e_log10f.c @@ -1,5 +1,5 @@ /* - * $Id: math_e_log10f.c,v 1.4 2023-07-19 12:04:23 clib2devs Exp $ + * $Id: math_e_log10f.c,v 1.4 2023-07-19 12:04:23 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/e_log10l.c b/library/math/e_log10l.c index 0b976388..d1346663 100644 --- a/library/math/e_log10l.c +++ b/library/math/e_log10l.c @@ -1,5 +1,5 @@ /* - * $Id: math_e_log10l.c,v 1.0 2023-07-19 12:04:23 clib2devs Exp $ + * $Id: math_e_log10l.c,v 1.0 2023-07-19 12:04:23 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/e_log2.c b/library/math/e_log2.c index 35c33aa2..f928fed7 100644 --- a/library/math/e_log2.c +++ b/library/math/e_log2.c @@ -1,5 +1,5 @@ /* - * $Id: math_e_log2.c,v 1.4 2023-07-19 12:04:23 clib2devs Exp $ + * $Id: math_e_log2.c,v 1.4 2023-07-19 12:04:23 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/e_log2f.c b/library/math/e_log2f.c index 4a8e6053..968d1da2 100644 --- a/library/math/e_log2f.c +++ b/library/math/e_log2f.c @@ -1,5 +1,5 @@ /* - * $Id: math_e_log2f.c,v 1.4 2023-07-19 12:04:23 clib2devs Exp $ + * $Id: math_e_log2f.c,v 1.4 2023-07-19 12:04:23 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/e_log2l.c b/library/math/e_log2l.c index 845ea1c0..2c2f25bb 100644 --- a/library/math/e_log2l.c +++ b/library/math/e_log2l.c @@ -1,5 +1,5 @@ /* - * $Id: math_e_log2l.c,v 1.0 2023-07-19 12:04:23 clib2devs Exp $ + * $Id: math_e_log2l.c,v 1.0 2023-07-19 12:04:23 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/e_logf.c b/library/math/e_logf.c index fd4040a1..1a568673 100644 --- a/library/math/e_logf.c +++ b/library/math/e_logf.c @@ -1,5 +1,5 @@ /* - * $Id: math_e_logf.c,v 1.4 2023-07-19 12:04:23 clib2devs Exp $ + * $Id: math_e_logf.c,v 1.4 2023-07-19 12:04:23 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/e_logl.c b/library/math/e_logl.c index 4c6fe023..b2cf65f6 100644 --- a/library/math/e_logl.c +++ b/library/math/e_logl.c @@ -1,5 +1,5 @@ /* - * $Id: math_e_logl.c,v 1.0 2023-07-19 07:54:24 clib2devs Exp $ + * $Id: math_e_logl.c,v 1.0 2023-07-19 07:54:24 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/e_pow.c b/library/math/e_pow.c index 8d37cb09..36c4659c 100644 --- a/library/math/e_pow.c +++ b/library/math/e_pow.c @@ -1,5 +1,5 @@ /* - * $Id: math_e_pow.c,v 1.11 2023-07-19 12:04:24 clib2devs Exp $ + * $Id: math_e_pow.c,v 1.11 2023-07-19 12:04:24 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/e_powf.c b/library/math/e_powf.c index e00c74a6..8ec81d53 100644 --- a/library/math/e_powf.c +++ b/library/math/e_powf.c @@ -1,5 +1,5 @@ /* - * $Id: math_powf.c,v 1.4 202-02-13 12:04:24 clib2devs Exp $ + * $Id: math_powf.c,v 1.4 202-02-13 12:04:24 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/e_powl.c b/library/math/e_powl.c index ad3391f1..3e357985 100644 --- a/library/math/e_powl.c +++ b/library/math/e_powl.c @@ -1,5 +1,5 @@ /* - * $Id: math_e_powl.c,v 1.0 2023-07-19 12:04:24 clib2devs Exp $ + * $Id: math_e_powl.c,v 1.0 2023-07-19 12:04:24 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/e_rem_pio2.c b/library/math/e_rem_pio2.c index d71d80b9..91b3e3f8 100644 --- a/library/math/e_rem_pio2.c +++ b/library/math/e_rem_pio2.c @@ -1,5 +1,5 @@ /* - * $Id: math_e_rem_pio2.c,v 1.8 2023-07-18 09:51:53 clib2devs Exp $ + * $Id: math_e_rem_pio2.c,v 1.8 2023-07-18 09:51:53 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/e_rem_pio2f.c b/library/math/e_rem_pio2f.c index 5a0bc1ec..0ce8bbfb 100644 --- a/library/math/e_rem_pio2f.c +++ b/library/math/e_rem_pio2f.c @@ -1,5 +1,5 @@ /* - * $Id: math_e_rem_pio2f.c,v 1.4 2023-07-15 12:18:24 clib2devs Exp $ + * $Id: math_e_rem_pio2f.c,v 1.4 2023-07-15 12:18:24 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/e_remainder.c b/library/math/e_remainder.c index 50d73bff..eef51b40 100644 --- a/library/math/e_remainder.c +++ b/library/math/e_remainder.c @@ -1,5 +1,5 @@ /* - * $Id: math_e_remainder.c,v 1.4 2023-07-19 12:04:24 clib2devs Exp $ + * $Id: math_e_remainder.c,v 1.4 2023-07-19 12:04:24 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/e_remainderf.c b/library/math/e_remainderf.c index 77b3ed4d..fd060942 100644 --- a/library/math/e_remainderf.c +++ b/library/math/e_remainderf.c @@ -1,5 +1,5 @@ /* - * $Id: math_e_remainderf.c,v 1.4 2023-07-19 12:04:24 clib2devs Exp $ + * $Id: math_e_remainderf.c,v 1.4 2023-07-19 12:04:24 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/e_remainderl.c b/library/math/e_remainderl.c index c47c1f2d..b30f8a41 100644 --- a/library/math/e_remainderl.c +++ b/library/math/e_remainderl.c @@ -1,5 +1,5 @@ /* - * $Id: math_e_remainderl.c,v 1.4 2023-07-19 12:04:24 clib2devs Exp $ + * $Id: math_e_remainderl.c,v 1.4 2023-07-19 12:04:24 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/e_sinh.c b/library/math/e_sinh.c index 77ae9bb4..54740bc7 100644 --- a/library/math/e_sinh.c +++ b/library/math/e_sinh.c @@ -1,5 +1,5 @@ /* - * $Id: math_e_sinh.c,v 1.6 2023-07-19 12:04:24 clib2devs Exp $ + * $Id: math_e_sinh.c,v 1.6 2023-07-19 12:04:24 clib4devs Exp $ */ #ifndef _COMPLEX_HEADERS_H diff --git a/library/math/e_sinhf.c b/library/math/e_sinhf.c index cb9c191a..5825f33b 100644 --- a/library/math/e_sinhf.c +++ b/library/math/e_sinhf.c @@ -1,5 +1,5 @@ /* - * $Id: math_e_sinhf.c,v 1.3 2023-07-19 12:04:24 clib2devs Exp $ + * $Id: math_e_sinhf.c,v 1.3 2023-07-19 12:04:24 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/e_sinhl.c b/library/math/e_sinhl.c index ac75dea8..c7141fe6 100644 --- a/library/math/e_sinhl.c +++ b/library/math/e_sinhl.c @@ -1,5 +1,5 @@ /* - * $Id: math_e_sinhl.c,v 1.0 2023-07-19 12:04:24 clib2devs Exp $ + * $Id: math_e_sinhl.c,v 1.0 2023-07-19 12:04:24 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/e_sqrt.c b/library/math/e_sqrt.c index ecf604ec..5a5d0a93 100644 --- a/library/math/e_sqrt.c +++ b/library/math/e_sqrt.c @@ -1,5 +1,5 @@ /* - * $Id: math_e_sqrt.c,v 1.12 2023-07-18 07:54:24 clib2devs Exp $ + * $Id: math_e_sqrt.c,v 1.12 2023-07-18 07:54:24 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/e_sqrtf.c b/library/math/e_sqrtf.c index acbea8d0..150b7f92 100644 --- a/library/math/e_sqrtf.c +++ b/library/math/e_sqrtf.c @@ -1,5 +1,5 @@ /* - * $Id: math_e_sqtf.c,v 1.4 2023-07-19 12:04:24 clib2devs Exp $ + * $Id: math_e_sqtf.c,v 1.4 2023-07-19 12:04:24 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/e_sqrtl.c b/library/math/e_sqrtl.c index 4edf55c4..1f2c9e48 100644 --- a/library/math/e_sqrtl.c +++ b/library/math/e_sqrtl.c @@ -1,5 +1,5 @@ /* - * $Id: math_e_sqrtl.c,v 1.0 2023-07-19 12:04:23 clib2devs Exp $ + * $Id: math_e_sqrtl.c,v 1.0 2023-07-19 12:04:23 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/fenv.c b/library/math/fenv.c index e066a7e1..24cecedd 100644 --- a/library/math/fenv.c +++ b/library/math/fenv.c @@ -1,5 +1,5 @@ /* - * $Id: fenv.c,v 1.1 2023-07-20 19:09:00 clib2devs Exp $ + * $Id: fenv.c,v 1.1 2023-07-20 19:09:00 clib4devs Exp $ */ #define __fenv_static #include diff --git a/library/math/finite.c b/library/math/finite.c index b669991e..c537d0e9 100644 --- a/library/math/finite.c +++ b/library/math/finite.c @@ -1,5 +1,5 @@ /* - * $Id: math_isfinite.c,v 1.0 2021-01-16 18:15:23 clib2devs Exp $ + * $Id: math_isfinite.c,v 1.0 2021-01-16 18:15:23 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/fpgetmask.c b/library/math/fpgetmask.c index 1a6bfdff..94d9dd4d 100644 --- a/library/math/fpgetmask.c +++ b/library/math/fpgetmask.c @@ -1,5 +1,5 @@ /* - * $Id: fpgetmask.c,v 1.0 2023-07-20 19:09:00 clib2devs Exp $ + * $Id: fpgetmask.c,v 1.0 2023-07-20 19:09:00 clib4devs Exp $ */ #include diff --git a/library/math/fpgetround.c b/library/math/fpgetround.c index 4402e4ad..84e63575 100644 --- a/library/math/fpgetround.c +++ b/library/math/fpgetround.c @@ -1,5 +1,5 @@ /* - * $Id: fpgetround.c,v 1.0 2023-07-20 19:09:00 clib2devs Exp $ + * $Id: fpgetround.c,v 1.0 2023-07-20 19:09:00 clib4devs Exp $ */ #include diff --git a/library/math/fpgetsticky.c b/library/math/fpgetsticky.c index 51923ee9..6cf3c237 100644 --- a/library/math/fpgetsticky.c +++ b/library/math/fpgetsticky.c @@ -1,5 +1,5 @@ /* - * $Id: fpgetsticky.c,v 1.0 2023-07-20 19:09:00 clib2devs Exp $ + * $Id: fpgetsticky.c,v 1.0 2023-07-20 19:09:00 clib4devs Exp $ */ #include diff --git a/library/math/fpsetmask.c b/library/math/fpsetmask.c index 85800b7e..12489934 100644 --- a/library/math/fpsetmask.c +++ b/library/math/fpsetmask.c @@ -1,5 +1,5 @@ /* - * $Id: fpsetmask.c,v 1.0 2023-07-20 19:09:00 clib2devs Exp $ + * $Id: fpsetmask.c,v 1.0 2023-07-20 19:09:00 clib4devs Exp $ */ #include diff --git a/library/math/fpsetround.c b/library/math/fpsetround.c index c1aa04a9..520f3f16 100644 --- a/library/math/fpsetround.c +++ b/library/math/fpsetround.c @@ -1,5 +1,5 @@ /* - * $Id: fpsetround.c,v 1.0 2023-07-20 19:09:00 clib2devs Exp $ + * $Id: fpsetround.c,v 1.0 2023-07-20 19:09:00 clib4devs Exp $ */ #include diff --git a/library/math/init_exit.c b/library/math/init_exit.c index ac2e0797..fccc5a1a 100644 --- a/library/math/init_exit.c +++ b/library/math/init_exit.c @@ -1,5 +1,5 @@ /* - * $Id: math_init_exit.c,v 1.19 2006-01-08 12:04:23 clib2devs Exp $ + * $Id: math_init_exit.c,v 1.19 2006-01-08 12:04:23 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H @@ -29,15 +29,15 @@ __setfpucw(fpu_control_t set) { MATH_CONSTRUCTOR(math_init) { union ieee_single *single_x; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); /* Finally, fill in the constants behind INFINITY and NAN. */ - single_x = (union ieee_single *) &__clib2->__infinity; + single_x = (union ieee_single *) &__clib4->__infinity; single_x->raw[0] = 0x7f800000; - single_x = (union ieee_single *) &__clib2->__nan; + single_x = (union ieee_single *) &__clib4->__nan; single_x->raw[0] = 0x7fc00001; SHOWVALUE(success); diff --git a/library/math/invtrig.c b/library/math/invtrig.c index 79e99f77..76c79f11 100644 --- a/library/math/invtrig.c +++ b/library/math/invtrig.c @@ -1,5 +1,5 @@ /* - * $Id: math_invtrig.c,v 1.0 2022-03-10 12:04:23 clib2devs Exp $ + * $Id: math_invtrig.c,v 1.0 2022-03-10 12:04:23 clib4devs Exp $ */ #include diff --git a/library/math/invtrig.h b/library/math/invtrig.h index c89e9e15..e6f0de19 100644 --- a/library/math/invtrig.h +++ b/library/math/invtrig.h @@ -1,5 +1,5 @@ /* - * $Id: math_invtrig.h,v 1.0 2022-03-10 12:04:23 clib2devs Exp $ + * $Id: math_invtrig.h,v 1.0 2022-03-10 12:04:23 clib4devs Exp $ */ #define BIAS (LDBL_MAX_EXP - 1) diff --git a/library/math/k_cos.c b/library/math/k_cos.c index b0c4a661..6582598c 100644 --- a/library/math/k_cos.c +++ b/library/math/k_cos.c @@ -1,5 +1,5 @@ /* - * $Id: math_k_cos.c,v 1.5 2023-07-19 12:04:23 clib2devs Exp $ + * $Id: math_k_cos.c,v 1.5 2023-07-19 12:04:23 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/k_cosf.c b/library/math/k_cosf.c index b8fc6bab..085223b4 100644 --- a/library/math/k_cosf.c +++ b/library/math/k_cosf.c @@ -1,5 +1,5 @@ /* - * $Id: math_k_cosf.c,v 1.8 2023-07-19 12:04:24 clib2devs Exp $ + * $Id: math_k_cosf.c,v 1.8 2023-07-19 12:04:24 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/k_exp.c b/library/math/k_exp.c index ea432e46..f7af549a 100644 --- a/library/math/k_exp.c +++ b/library/math/k_exp.c @@ -1,5 +1,5 @@ /* - * $Id: math_k_exp.c,v 1.0 2023-07-19 12:04:23 clib2devs Exp $ + * $Id: math_k_exp.c,v 1.0 2023-07-19 12:04:23 clib4devs Exp $ */ #ifndef _COMPLEX_HEADERS_H diff --git a/library/math/k_expf.c b/library/math/k_expf.c index 77aa5e7d..15a6b865 100644 --- a/library/math/k_expf.c +++ b/library/math/k_expf.c @@ -1,5 +1,5 @@ /* - * $Id: math_k_expf.c,v 1.0 2023-07-19 12:04:23 clib2devs Exp $ + * $Id: math_k_expf.c,v 1.0 2023-07-19 12:04:23 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/k_rem_pio2.c b/library/math/k_rem_pio2.c index 3cfab087..adec52f4 100644 --- a/library/math/k_rem_pio2.c +++ b/library/math/k_rem_pio2.c @@ -1,5 +1,5 @@ /* - * $Id: math_k_rem_pio2.c,v 1.0 2023-07-18 09:51:53 clib2devs Exp $ + * $Id: math_k_rem_pio2.c,v 1.0 2023-07-18 09:51:53 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/k_sin.c b/library/math/k_sin.c index 19a6eae5..adde5edd 100644 --- a/library/math/k_sin.c +++ b/library/math/k_sin.c @@ -1,5 +1,5 @@ /* - * $Id: math_k_sin.c,v 1.4 2023-07-19 12:04:23 clib2devs Exp $ + * $Id: math_k_sin.c,v 1.4 2023-07-19 12:04:23 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/k_sinf.c b/library/math/k_sinf.c index fd150826..cb122d8e 100644 --- a/library/math/k_sinf.c +++ b/library/math/k_sinf.c @@ -1,5 +1,5 @@ /* - * $Id: math_k_sinf.c,v 1.8 2023-07-19 12:04:24 clib2devs Exp $ + * $Id: math_k_sinf.c,v 1.8 2023-07-19 12:04:24 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/k_tan.c b/library/math/k_tan.c index 8522146a..4988ecde 100644 --- a/library/math/k_tan.c +++ b/library/math/k_tan.c @@ -1,5 +1,5 @@ /* - * $Id: math_k_tan.c,v 1.5 2023-07-19 12:04:23 clib2devs Exp $ + * $Id: math_k_tan.c,v 1.5 2023-07-19 12:04:23 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/k_tanf.c b/library/math/k_tanf.c index 9fa47f51..094d12f8 100644 --- a/library/math/k_tanf.c +++ b/library/math/k_tanf.c @@ -1,5 +1,5 @@ /* - * $Id: math_k_tanf.c,v 1.0 2023-07-19 12:04:23 clib2devs Exp $ + * $Id: math_k_tanf.c,v 1.0 2023-07-19 12:04:23 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/m.lib_rev.c b/library/math/m.lib_rev.c index c1ae4ef6..8699ca47 100644 --- a/library/math/m.lib_rev.c +++ b/library/math/m.lib_rev.c @@ -1,5 +1,5 @@ /* - * $Id: m.lib_rev.c,v 1.3 2006-01-08 12:04:23 clib2devs Exp $ + * $Id: m.lib_rev.c,v 1.3 2006-01-08 12:04:23 clib4devs Exp $ */ #include "m.lib_rev.h" diff --git a/library/math/math_fp_support.h b/library/math/math_fp_support.h index bf8ac5c8..19f8312a 100755 --- a/library/math/math_fp_support.h +++ b/library/math/math_fp_support.h @@ -1,5 +1,5 @@ /* - * $Id: math_fp_support.h,v 1.5 2006-01-08 12:04:23 clib2devs Exp $ + * $Id: math_fp_support.h,v 1.5 2006-01-08 12:04:23 clib4devs Exp $ */ #ifndef _MATH_FP_SUPPORT_H diff --git a/library/math/math_headers.h b/library/math/math_headers.h index a5abe60c..e23de783 100755 --- a/library/math/math_headers.h +++ b/library/math/math_headers.h @@ -1,5 +1,5 @@ /* - * $Id: math_headers.h,v 1.15 2006-11-13 09:51:53 clib2devs Exp $ + * $Id: math_headers.h,v 1.15 2006-11-13 09:51:53 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/s_asinh.c b/library/math/s_asinh.c index 6816cc4f..c8e2e5ea 100644 --- a/library/math/s_asinh.c +++ b/library/math/s_asinh.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_asinh.c,v 1.5 2023-07-19 12:04:23 clib2devs Exp $ + * $Id: math_s_asinh.c,v 1.5 2023-07-19 12:04:23 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/s_asinhf.c b/library/math/s_asinhf.c index 37b79d38..9e127180 100644 --- a/library/math/s_asinhf.c +++ b/library/math/s_asinhf.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_asinhf.c,v 1.5 2023-07-19 12:04:23 clib2devs Exp $ + * $Id: math_s_asinhf.c,v 1.5 2023-07-19 12:04:23 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/s_asinhl.c b/library/math/s_asinhl.c index 8911b942..a555360c 100644 --- a/library/math/s_asinhl.c +++ b/library/math/s_asinhl.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_asinhl.c,v 1.4 2022-03-13 12:04:23 clib2devs Exp $ + * $Id: math_s_asinhl.c,v 1.4 2022-03-13 12:04:23 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/s_atan.c b/library/math/s_atan.c index 3ffd721b..799c9b73 100644 --- a/library/math/s_atan.c +++ b/library/math/s_atan.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_atan.c,v 1.7 2021-02-16 12:04:23 clib2devs Exp $ + * $Id: math_s_atan.c,v 1.7 2021-02-16 12:04:23 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/s_atan2f.c b/library/math/s_atan2f.c index 2be1d93c..441119c9 100644 --- a/library/math/s_atan2f.c +++ b/library/math/s_atan2f.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_atan2f.c,v 1.5 2022-03-12 12:04:23 clib2devs Exp $ + * $Id: math_s_atan2f.c,v 1.5 2022-03-12 12:04:23 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/s_atanf.c b/library/math/s_atanf.c index 45759e13..75062e90 100644 --- a/library/math/s_atanf.c +++ b/library/math/s_atanf.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_atanf.c,v 1.4 2023-07-19 12:04:23 clib2devs Exp $ + * $Id: math_s_atanf.c,v 1.4 2023-07-19 12:04:23 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/s_atanl.c b/library/math/s_atanl.c index 6c756bbd..58c4245e 100644 --- a/library/math/s_atanl.c +++ b/library/math/s_atanl.c @@ -1,5 +1,5 @@ /* - * $Id: math_atanl.c,v 1.1 2023-07-19 19:28:23 clib2devs Exp $ + * $Id: math_atanl.c,v 1.1 2023-07-19 19:28:23 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/s_cabs.c b/library/math/s_cabs.c index 8550a386..8028e1a5 100644 --- a/library/math/s_cabs.c +++ b/library/math/s_cabs.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_cabs.c,v 1.0 2021-01-30 11:33:52 clib2devs Exp $ + * $Id: math_s_cabs.c,v 1.0 2021-01-30 11:33:52 clib4devs Exp $ */ #ifndef _COMPLEX_HEADERS_H diff --git a/library/math/s_cabsf.c b/library/math/s_cabsf.c index cb8fac65..afbf5070 100644 --- a/library/math/s_cabsf.c +++ b/library/math/s_cabsf.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_cabsf.c,v 1.0 2021-01-30 11:33:52 clib2devs Exp $ + * $Id: math_s_cabsf.c,v 1.0 2021-01-30 11:33:52 clib4devs Exp $ */ #ifndef _COMPLEX_HEADERS_H diff --git a/library/math/s_cabsl.c b/library/math/s_cabsl.c index 1639bda6..6c6f951a 100644 --- a/library/math/s_cabsl.c +++ b/library/math/s_cabsl.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_cabsl.c,v 1.0 2021-01-30 11:33:52 clib2devs Exp $ + * $Id: math_s_cabsl.c,v 1.0 2021-01-30 11:33:52 clib4devs Exp $ */ #ifndef _COMPLEX_HEADERS_H diff --git a/library/math/s_cacos.c b/library/math/s_cacos.c index 4dd0611b..868a8397 100644 --- a/library/math/s_cacos.c +++ b/library/math/s_cacos.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_cacos.c,v 1.1 2023-07-19 11:33:52 clib2devs Exp $ + * $Id: math_s_cacos.c,v 1.1 2023-07-19 11:33:52 clib4devs Exp $ */ #ifndef _COMPLEX_HEADERS_H diff --git a/library/math/s_cacosf.c b/library/math/s_cacosf.c index 3a90a7a1..cfda2804 100644 --- a/library/math/s_cacosf.c +++ b/library/math/s_cacosf.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_cacosf.c,v 1.1 2023-07-19 11:33:52 clib2devs Exp $ + * $Id: math_s_cacosf.c,v 1.1 2023-07-19 11:33:52 clib4devs Exp $ */ #ifndef _COMPLEX_HEADERS_H diff --git a/library/math/s_cacosh.c b/library/math/s_cacosh.c index f46590cc..19902f1b 100644 --- a/library/math/s_cacosh.c +++ b/library/math/s_cacosh.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_cacosh.c,v 1.1 2023-07-19 11:33:52 clib2devs Exp $ + * $Id: math_s_cacosh.c,v 1.1 2023-07-19 11:33:52 clib4devs Exp $ */ #ifndef _COMPLEX_HEADERS_H diff --git a/library/math/s_cacoshf.c b/library/math/s_cacoshf.c index d4425e93..dfec15bd 100644 --- a/library/math/s_cacoshf.c +++ b/library/math/s_cacoshf.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_cacoshf.c,v 1.1 2023-07-19 11:33:52 clib2devs Exp $ + * $Id: math_s_cacoshf.c,v 1.1 2023-07-19 11:33:52 clib4devs Exp $ */ #ifndef _COMPLEX_HEADERS_H #include "complex_headers.h" diff --git a/library/math/s_cacoshl.c b/library/math/s_cacoshl.c index 9ce9183b..65f17032 100644 --- a/library/math/s_cacoshl.c +++ b/library/math/s_cacoshl.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_cacoshl.c,v 1.1 2023-07-19 11:33:52 clib2devs Exp $ + * $Id: math_s_cacoshl.c,v 1.1 2023-07-19 11:33:52 clib4devs Exp $ */ #ifndef _COMPLEX_HEADERS_H diff --git a/library/math/s_cacosl.c b/library/math/s_cacosl.c index fe0b2d40..8e9c2de0 100644 --- a/library/math/s_cacosl.c +++ b/library/math/s_cacosl.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_cacosl.c,v 1.1 2023-07-19 11:33:52 clib2devs Exp $ + * $Id: math_s_cacosl.c,v 1.1 2023-07-19 11:33:52 clib4devs Exp $ */ #ifndef _COMPLEX_HEADERS_H diff --git a/library/math/s_carg.c b/library/math/s_carg.c index ff703282..0bb95a2d 100644 --- a/library/math/s_carg.c +++ b/library/math/s_carg.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_carg.c,v 1.2 2023-07-19 12:04:22 clib2devs Exp $ + * $Id: math_s_carg.c,v 1.2 2023-07-19 12:04:22 clib4devs Exp $ */ #ifndef _COMPLEX_HEADERS_H diff --git a/library/math/s_cargf.c b/library/math/s_cargf.c index a2bbe12c..566a81a6 100644 --- a/library/math/s_cargf.c +++ b/library/math/s_cargf.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_cargf.c,v 1.2 2023-07-19 12:04:22 clib2devs Exp $ + * $Id: math_s_cargf.c,v 1.2 2023-07-19 12:04:22 clib4devs Exp $ */ #ifndef _COMPLEX_HEADERS_H diff --git a/library/math/s_cargl.c b/library/math/s_cargl.c index 7c43888f..ed56a877 100644 --- a/library/math/s_cargl.c +++ b/library/math/s_cargl.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_cargl.c,v 1.2 2023-07-19 12:04:22 clib2devs Exp $ + * $Id: math_s_cargl.c,v 1.2 2023-07-19 12:04:22 clib4devs Exp $ */ #ifndef _COMPLEX_HEADERS_H diff --git a/library/math/s_casin.c b/library/math/s_casin.c index 2f032ac2..905126cf 100644 --- a/library/math/s_casin.c +++ b/library/math/s_casin.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_casin.c,v 1.1 2023-07-19 11:33:52 clib2devs Exp $ + * $Id: math_s_casin.c,v 1.1 2023-07-19 11:33:52 clib4devs Exp $ */ #ifndef _COMPLEX_HEADERS_H diff --git a/library/math/s_casinf.c b/library/math/s_casinf.c index bd786391..1edc7edb 100644 --- a/library/math/s_casinf.c +++ b/library/math/s_casinf.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_casinf.c,v 1.1 2023-07-19 11:33:52 clib2devs Exp $ + * $Id: math_s_casinf.c,v 1.1 2023-07-19 11:33:52 clib4devs Exp $ */ #ifndef _COMPLEX_HEADERS_H diff --git a/library/math/s_casinh.c b/library/math/s_casinh.c index 9df2fdb6..efcf0b4e 100644 --- a/library/math/s_casinh.c +++ b/library/math/s_casinh.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_casinh.c,v 1.1 2023-07-19 11:33:52 clib2devs Exp $ + * $Id: math_s_casinh.c,v 1.1 2023-07-19 11:33:52 clib4devs Exp $ */ #ifndef _COMPLEX_HEADERS_H diff --git a/library/math/s_casinhf.c b/library/math/s_casinhf.c index bf1cbf77..1d8016ff 100644 --- a/library/math/s_casinhf.c +++ b/library/math/s_casinhf.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_casinhf.c,v 1.1 2023-07-19 11:33:52 clib2devs Exp $ + * $Id: math_s_casinhf.c,v 1.1 2023-07-19 11:33:52 clib4devs Exp $ */ #ifndef _COMPLEX_HEADERS_H diff --git a/library/math/s_casinhl.c b/library/math/s_casinhl.c index d122913d..e1b300eb 100644 --- a/library/math/s_casinhl.c +++ b/library/math/s_casinhl.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_casinhl.c,v 1.1 2023-07-19 11:33:52 clib2devs Exp $ + * $Id: math_s_casinhl.c,v 1.1 2023-07-19 11:33:52 clib4devs Exp $ */ #ifndef _COMPLEX_HEADERS_H diff --git a/library/math/s_casinl.c b/library/math/s_casinl.c index 4726010e..b20fd8e0 100644 --- a/library/math/s_casinl.c +++ b/library/math/s_casinl.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_casinl.c,v 1.0 2021-01-30 11:33:52 clib2devs Exp $ + * $Id: math_s_casinl.c,v 1.0 2021-01-30 11:33:52 clib4devs Exp $ */ #ifndef _COMPLEX_HEADERS_H diff --git a/library/math/s_catan.c b/library/math/s_catan.c index cde6969c..49204c39 100644 --- a/library/math/s_catan.c +++ b/library/math/s_catan.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_catan.c,v 1.1 2023-07-19 11:33:52 clib2devs Exp $ + * $Id: math_s_catan.c,v 1.1 2023-07-19 11:33:52 clib4devs Exp $ */ #ifndef _COMPLEX_HEADERS_H diff --git a/library/math/s_catanf.c b/library/math/s_catanf.c index deeb23a3..68360e74 100644 --- a/library/math/s_catanf.c +++ b/library/math/s_catanf.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_catanf.c,v 1.1 2023-07-19 11:33:52 clib2devs Exp $ + * $Id: math_s_catanf.c,v 1.1 2023-07-19 11:33:52 clib4devs Exp $ */ #ifndef _COMPLEX_HEADERS_H diff --git a/library/math/s_catanh.c b/library/math/s_catanh.c index 1d4d6175..4ac6943c 100644 --- a/library/math/s_catanh.c +++ b/library/math/s_catanh.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_catanh.c,v 1.1 2023-07-19 11:33:52 clib2devs Exp $ + * $Id: math_s_catanh.c,v 1.1 2023-07-19 11:33:52 clib4devs Exp $ */ #ifndef _COMPLEX_HEADERS_H diff --git a/library/math/s_catanhf.c b/library/math/s_catanhf.c index 74518a2a..0e8c6fa8 100644 --- a/library/math/s_catanhf.c +++ b/library/math/s_catanhf.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_catabhf.c,v 1.1 2023-07-119 11:33:52 clib2devs Exp $ + * $Id: math_s_catabhf.c,v 1.1 2023-07-119 11:33:52 clib4devs Exp $ */ #ifndef _COMPLEX_HEADERS_H diff --git a/library/math/s_catanhl.c b/library/math/s_catanhl.c index 134d4c78..5901b1a5 100644 --- a/library/math/s_catanhl.c +++ b/library/math/s_catanhl.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_catanhl.c,v 1.1 2023-07-19 11:33:52 clib2devs Exp $ + * $Id: math_s_catanhl.c,v 1.1 2023-07-19 11:33:52 clib4devs Exp $ */ #ifndef _COMPLEX_HEADERS_H diff --git a/library/math/s_catanl.c b/library/math/s_catanl.c index f45a3cfd..3d03c456 100644 --- a/library/math/s_catanl.c +++ b/library/math/s_catanl.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_catanl.c,v 1.1 2023-07-19 11:33:52 clib2devs Exp $ + * $Id: math_s_catanl.c,v 1.1 2023-07-19 11:33:52 clib4devs Exp $ */ #ifndef _COMPLEX_HEADERS_H diff --git a/library/math/s_cbrt.c b/library/math/s_cbrt.c index 3e4381d6..2621f572 100644 --- a/library/math/s_cbrt.c +++ b/library/math/s_cbrt.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_cbrt.c,v 1.5 2023-07-19 12:04:23 clib2devs Exp $ + * $Id: math_s_cbrt.c,v 1.5 2023-07-19 12:04:23 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/s_cbrtf.c b/library/math/s_cbrtf.c index a38e69cc..f25fc0da 100644 --- a/library/math/s_cbrtf.c +++ b/library/math/s_cbrtf.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_cbrtf.c,v 1.4 2022-03-13 12:04:23 clib2devs Exp $ + * $Id: math_s_cbrtf.c,v 1.4 2022-03-13 12:04:23 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/s_cbrtl.c b/library/math/s_cbrtl.c index e0d264e6..52c10b12 100644 --- a/library/math/s_cbrtl.c +++ b/library/math/s_cbrtl.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_cbrtl.c,v 1.0 2022-03-11 11:42:23 clib2devs Exp $ + * $Id: math_s_cbrtl.c,v 1.0 2022-03-11 11:42:23 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/s_ccos.c b/library/math/s_ccos.c index a6a735ce..fb9ece9f 100644 --- a/library/math/s_ccos.c +++ b/library/math/s_ccos.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_ccos.c,v 1.1 2023-07-19 11:33:52 clib2devs Exp $ + * $Id: math_s_ccos.c,v 1.1 2023-07-19 11:33:52 clib4devs Exp $ */ #ifndef _COMPLEX_HEADERS_H diff --git a/library/math/s_ccosf.c b/library/math/s_ccosf.c index bc59d7d3..0da4e416 100644 --- a/library/math/s_ccosf.c +++ b/library/math/s_ccosf.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_ccosf.c,v 1.1 2023-07-19 11:33:52 clib2devs Exp $ + * $Id: math_s_ccosf.c,v 1.1 2023-07-19 11:33:52 clib4devs Exp $ */ #ifndef _COMPLEX_HEADERS_H diff --git a/library/math/s_ccosh.c b/library/math/s_ccosh.c index 91fc8831..70f1b8ec 100644 --- a/library/math/s_ccosh.c +++ b/library/math/s_ccosh.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_ccosh.c,v 1.1 2023-07-19 11:33:52 clib2devs Exp $ + * $Id: math_s_ccosh.c,v 1.1 2023-07-19 11:33:52 clib4devs Exp $ */ #ifndef _COMPLEX_HEADERS_H diff --git a/library/math/s_ccoshf.c b/library/math/s_ccoshf.c index 35fcae87..8c0ec04a 100644 --- a/library/math/s_ccoshf.c +++ b/library/math/s_ccoshf.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_cccoshf.c,v 1.1 2023-07-19 11:33:52 clib2devs Exp $ + * $Id: math_s_cccoshf.c,v 1.1 2023-07-19 11:33:52 clib4devs Exp $ */ #ifndef _COMPLEX_HEADERS_H diff --git a/library/math/s_ccoshl.c b/library/math/s_ccoshl.c index e88d4f26..8045c43a 100644 --- a/library/math/s_ccoshl.c +++ b/library/math/s_ccoshl.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_ccoshl.c,v 1.1 2023-07-19 11:33:52 clib2devs Exp $ + * $Id: math_s_ccoshl.c,v 1.1 2023-07-19 11:33:52 clib4devs Exp $ */ #ifndef _COMPLEX_HEADERS_H diff --git a/library/math/s_ccosl.c b/library/math/s_ccosl.c index f2745954..7fb6c843 100644 --- a/library/math/s_ccosl.c +++ b/library/math/s_ccosl.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_ccosl.c,v 1.1 2023-07-19 11:33:52 clib2devs Exp $ + * $Id: math_s_ccosl.c,v 1.1 2023-07-19 11:33:52 clib4devs Exp $ */ #ifndef _COMPLEX_HEADERS_H diff --git a/library/math/s_ceil.c b/library/math/s_ceil.c index 3c9266c9..931b7ffb 100644 --- a/library/math/s_ceil.c +++ b/library/math/s_ceil.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_ceil.c,v 1.10 2023-07-19 12:04:23 clib2devs Exp $ + * $Id: math_s_ceil.c,v 1.10 2023-07-19 12:04:23 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/s_ceilf.c b/library/math/s_ceilf.c index 58e7a338..69e54d86 100644 --- a/library/math/s_ceilf.c +++ b/library/math/s_ceilf.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_ceilf.c,v 1.5 2023-07-19 12:04:23 clib2devs Exp $ + * $Id: math_s_ceilf.c,v 1.5 2023-07-19 12:04:23 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/s_ceill.c b/library/math/s_ceill.c index 9fa4c927..eaa7343b 100644 --- a/library/math/s_ceill.c +++ b/library/math/s_ceill.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_ceill.c,v 1.0 2022-02-10 12:04:23 clib2devs Exp $ + * $Id: math_s_ceill.c,v 1.0 2022-02-10 12:04:23 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/s_cexp.c b/library/math/s_cexp.c index 66dcea2b..2336d64e 100644 --- a/library/math/s_cexp.c +++ b/library/math/s_cexp.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_cexp.c,v 1.1 2023-07-19 11:33:52 clib2devs Exp $ + * $Id: math_s_cexp.c,v 1.1 2023-07-19 11:33:52 clib4devs Exp $ */ #ifndef _COMPLEX_HEADERS_H diff --git a/library/math/s_cexpf.c b/library/math/s_cexpf.c index f34e9790..d02d6e34 100644 --- a/library/math/s_cexpf.c +++ b/library/math/s_cexpf.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_cexpf.c,v 1.1 2023-07-19 11:33:52 clib2devs Exp $ + * $Id: math_s_cexpf.c,v 1.1 2023-07-19 11:33:52 clib4devs Exp $ */ #ifndef _COMPLEX_HEADERS_H diff --git a/library/math/s_cexpl.c b/library/math/s_cexpl.c index 002d0c54..898d59c7 100644 --- a/library/math/s_cexpl.c +++ b/library/math/s_cexpl.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_cexpl.c,v 1.1 2023-07-19 11:33:52 clib2devs Exp $ + * $Id: math_s_cexpl.c,v 1.1 2023-07-19 11:33:52 clib4devs Exp $ */ #ifndef _COMPLEX_HEADERS_H diff --git a/library/math/s_cimag.c b/library/math/s_cimag.c index dc28e56c..a88ac856 100644 --- a/library/math/s_cimag.c +++ b/library/math/s_cimag.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_cimag.c,v 1.0 2021-01-30 11:33:52 clib2devs Exp $ + * $Id: math_s_cimag.c,v 1.0 2021-01-30 11:33:52 clib4devs Exp $ */ #ifndef _COMPLEX_HEADERS_H diff --git a/library/math/s_cimagf.c b/library/math/s_cimagf.c index d7d02207..b415de14 100644 --- a/library/math/s_cimagf.c +++ b/library/math/s_cimagf.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_cimagf.c,v 1.0 2021-01-30 11:33:52 clib2devs Exp $ + * $Id: math_s_cimagf.c,v 1.0 2021-01-30 11:33:52 clib4devs Exp $ */ #ifndef _COMPLEX_HEADERS_H diff --git a/library/math/s_cimagl.c b/library/math/s_cimagl.c index f55ca503..fb5142e4 100644 --- a/library/math/s_cimagl.c +++ b/library/math/s_cimagl.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_cimagl.c,v 1.0 2021-01-30 11:33:52 clib2devs Exp $ + * $Id: math_s_cimagl.c,v 1.0 2021-01-30 11:33:52 clib4devs Exp $ */ #ifndef _COMPLEX_HEADERS_H diff --git a/library/math/s_clog.c b/library/math/s_clog.c index 783e8f3d..28a4db41 100644 --- a/library/math/s_clog.c +++ b/library/math/s_clog.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_clog.c,v 1.1 2023-07-19 11:33:52 clib2devs Exp $ + * $Id: math_s_clog.c,v 1.1 2023-07-19 11:33:52 clib4devs Exp $ */ #ifndef _COMPLEX_HEADERS_H diff --git a/library/math/s_clogf.c b/library/math/s_clogf.c index 0dc36146..991fc919 100644 --- a/library/math/s_clogf.c +++ b/library/math/s_clogf.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_clogf.c,v 1.1 2023-07-19 11:33:52 clib2devs Exp $ + * $Id: math_s_clogf.c,v 1.1 2023-07-19 11:33:52 clib4devs Exp $ */ #ifndef _COMPLEX_HEADERS_H diff --git a/library/math/s_clogl.c b/library/math/s_clogl.c index 76fd79b8..482cf574 100644 --- a/library/math/s_clogl.c +++ b/library/math/s_clogl.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_clogl.c,v 1.1 2023-07-19 11:33:52 clib2devs Exp $ + * $Id: math_s_clogl.c,v 1.1 2023-07-19 11:33:52 clib4devs Exp $ */ #ifndef _COMPLEX_HEADERS_H diff --git a/library/math/s_conj.c b/library/math/s_conj.c index 17982dd7..42261aea 100644 --- a/library/math/s_conj.c +++ b/library/math/s_conj.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_conj.c,v 1.2 2023-07-19 12:04:22 clib2devs Exp $ + * $Id: math_s_conj.c,v 1.2 2023-07-19 12:04:22 clib4devs Exp $ */ #ifndef _COMPLEX_HEADERS_H diff --git a/library/math/s_conjf.c b/library/math/s_conjf.c index 5cffe937..02443f8a 100644 --- a/library/math/s_conjf.c +++ b/library/math/s_conjf.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_conjf.c,v 1.2 2023-07-19 12:04:22 clib2devs Exp $ + * $Id: math_s_conjf.c,v 1.2 2023-07-19 12:04:22 clib4devs Exp $ */ #ifndef _COMPLEX_HEADERS_H diff --git a/library/math/s_conjl.c b/library/math/s_conjl.c index b3d73435..2fed80b2 100644 --- a/library/math/s_conjl.c +++ b/library/math/s_conjl.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_conjl.c,v 1.2 2023-07-19 12:04:22 clib2devs Exp $ + * $Id: math_s_conjl.c,v 1.2 2023-07-19 12:04:22 clib4devs Exp $ */ #ifndef _COMPLEX_HEADERS_H diff --git a/library/math/s_copysign.c b/library/math/s_copysign.c index 5d7e431a..eb82265a 100644 --- a/library/math/s_copysign.c +++ b/library/math/s_copysign.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_copysign.c,v 1.2 2023-07-19 12:04:23 clib2devs Exp $ + * $Id: math_s_copysign.c,v 1.2 2023-07-19 12:04:23 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/s_copysignf.c b/library/math/s_copysignf.c index 1581e804..3bc3320a 100644 --- a/library/math/s_copysignf.c +++ b/library/math/s_copysignf.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_copysignf.c,v 1.2 2023-07-19 12:04:23 clib2devs Exp $ + * $Id: math_s_copysignf.c,v 1.2 2023-07-19 12:04:23 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/s_copysignl.c b/library/math/s_copysignl.c index 0ada1a08..4d7ecb48 100644 --- a/library/math/s_copysignl.c +++ b/library/math/s_copysignl.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_copysignl.c,v 1.2 2023-07-19 12:04:23 clib2devs Exp $ + * $Id: math_s_copysignl.c,v 1.2 2023-07-19 12:04:23 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/s_cos.c b/library/math/s_cos.c index bd38e52c..00b5d280 100644 --- a/library/math/s_cos.c +++ b/library/math/s_cos.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_cos.c,v 1.8 2023-07-19 12:04:23 clib2devs Exp $ + * $Id: math_s_cos.c,v 1.8 2023-07-19 12:04:23 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/s_cosf.c b/library/math/s_cosf.c index 4574479f..dc31ed2a 100644 --- a/library/math/s_cosf.c +++ b/library/math/s_cosf.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_cosf.c,v 1.4 2023-07-15 12:04:23 clib2devs Exp $ + * $Id: math_s_cosf.c,v 1.4 2023-07-15 12:04:23 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/s_cosl.c b/library/math/s_cosl.c index af02d4eb..da637c17 100644 --- a/library/math/s_cosl.c +++ b/library/math/s_cosl.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_cosl.c,v 1.0 2023-07-19 12:04:23 clib2devs Exp $ + * $Id: math_s_cosl.c,v 1.0 2023-07-19 12:04:23 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/s_cpow.c b/library/math/s_cpow.c index c624490a..27255f55 100644 --- a/library/math/s_cpow.c +++ b/library/math/s_cpow.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_cpow.c,v 1.0 2023-07-19 11:33:52 clib2devs Exp $ + * $Id: math_s_cpow.c,v 1.0 2023-07-19 11:33:52 clib4devs Exp $ */ #ifndef _COMPLEX_HEADERS_H diff --git a/library/math/s_cpowf.c b/library/math/s_cpowf.c index 1f7bc548..3a891bf7 100644 --- a/library/math/s_cpowf.c +++ b/library/math/s_cpowf.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_cpwf.c,v 1.1 2023-07-19 11:33:52 clib2devs Exp $ + * $Id: math_s_cpwf.c,v 1.1 2023-07-19 11:33:52 clib4devs Exp $ */ #ifndef _COMPLEX_HEADERS_H diff --git a/library/math/s_cpowl.c b/library/math/s_cpowl.c index 0fbe1d44..ebc87f0a 100644 --- a/library/math/s_cpowl.c +++ b/library/math/s_cpowl.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_cpowl.c,v 1.1 2023-07-19 11:33:52 clib2devs Exp $ + * $Id: math_s_cpowl.c,v 1.1 2023-07-19 11:33:52 clib4devs Exp $ */ #ifndef _COMPLEX_HEADERS_H diff --git a/library/math/s_cproj.c b/library/math/s_cproj.c index 048dbca9..19abe5a2 100644 --- a/library/math/s_cproj.c +++ b/library/math/s_cproj.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_cproj.c,v 1.1 2023-07-19 11:33:52 clib2devs Exp $ + * $Id: math_s_cproj.c,v 1.1 2023-07-19 11:33:52 clib4devs Exp $ */ #ifndef _COMPLEX_HEADERS_H diff --git a/library/math/s_cprojf.c b/library/math/s_cprojf.c index e6af3275..a8e452b9 100644 --- a/library/math/s_cprojf.c +++ b/library/math/s_cprojf.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_cprojf.c,v 1.1 2023-07-19 11:33:52 clib2devs Exp $ + * $Id: math_s_cprojf.c,v 1.1 2023-07-19 11:33:52 clib4devs Exp $ */ #ifndef _COMPLEX_HEADERS_H diff --git a/library/math/s_cprojl.c b/library/math/s_cprojl.c index d1978ea8..e810ff15 100644 --- a/library/math/s_cprojl.c +++ b/library/math/s_cprojl.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_cprojl.c,v 1.1 2023-07-19 11:33:52 clib2devs Exp $ + * $Id: math_s_cprojl.c,v 1.1 2023-07-19 11:33:52 clib4devs Exp $ */ #ifndef _COMPLEX_HEADERS_H diff --git a/library/math/s_creal.c b/library/math/s_creal.c index 8b048376..0a72eb75 100644 --- a/library/math/s_creal.c +++ b/library/math/s_creal.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_creal.c,v 1.0 2023-07-19 11:33:52 clib2devs Exp $ + * $Id: math_s_creal.c,v 1.0 2023-07-19 11:33:52 clib4devs Exp $ */ #ifndef _COMPLEX_HEADERS_H diff --git a/library/math/s_crealf.c b/library/math/s_crealf.c index 8411b0a1..76d629df 100644 --- a/library/math/s_crealf.c +++ b/library/math/s_crealf.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_crealf.c,v 1.0 2023-07-19 11:33:52 clib2devs Exp $ + * $Id: math_s_crealf.c,v 1.0 2023-07-19 11:33:52 clib4devs Exp $ */ #ifndef _COMPLEX_HEADERS_H diff --git a/library/math/s_creall.c b/library/math/s_creall.c index 9f87457f..043fdec9 100644 --- a/library/math/s_creall.c +++ b/library/math/s_creall.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_creall.c,v 1.0 2023-07-19 11:33:52 clib2devs Exp $ + * $Id: math_s_creall.c,v 1.0 2023-07-19 11:33:52 clib4devs Exp $ */ #ifndef _COMPLEX_HEADERS_H diff --git a/library/math/s_csin.c b/library/math/s_csin.c index 9ab3d446..551fccb5 100644 --- a/library/math/s_csin.c +++ b/library/math/s_csin.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_csin.c,v 1.1 2023-07-19 11:33:52 clib2devs Exp $ + * $Id: math_s_csin.c,v 1.1 2023-07-19 11:33:52 clib4devs Exp $ */ #ifndef _COMPLEX_HEADERS_H diff --git a/library/math/s_csinf.c b/library/math/s_csinf.c index 8d276837..0c120007 100644 --- a/library/math/s_csinf.c +++ b/library/math/s_csinf.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_csinf.c,v 1.1 2023-07-19 11:33:52 clib2devs Exp $ + * $Id: math_s_csinf.c,v 1.1 2023-07-19 11:33:52 clib4devs Exp $ */ #ifndef _COMPLEX_HEADERS_H diff --git a/library/math/s_csinh.c b/library/math/s_csinh.c index 2dcbcf73..7cab7bdd 100644 --- a/library/math/s_csinh.c +++ b/library/math/s_csinh.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_csinh.c,v 1.1 2023-07-19 11:33:52 clib2devs Exp $ + * $Id: math_s_csinh.c,v 1.1 2023-07-19 11:33:52 clib4devs Exp $ */ #ifndef _COMPLEX_HEADERS_H diff --git a/library/math/s_csinhf.c b/library/math/s_csinhf.c index 43e6aab5..f847311d 100644 --- a/library/math/s_csinhf.c +++ b/library/math/s_csinhf.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_csinhf.c,v 1.1 2023-07-19 11:33:52 clib2devs Exp $ + * $Id: math_s_csinhf.c,v 1.1 2023-07-19 11:33:52 clib4devs Exp $ */ #ifndef _COMPLEX_HEADERS_H diff --git a/library/math/s_csinhl.c b/library/math/s_csinhl.c index 9db48b93..b8454989 100644 --- a/library/math/s_csinhl.c +++ b/library/math/s_csinhl.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_csinhl.c,v 1.2 2023-07-19 11:33:52 clib2devs Exp $ + * $Id: math_s_csinhl.c,v 1.2 2023-07-19 11:33:52 clib4devs Exp $ */ #ifndef _COMPLEX_HEADERS_H diff --git a/library/math/s_csinl.c b/library/math/s_csinl.c index 31a8bf35..9b64063b 100644 --- a/library/math/s_csinl.c +++ b/library/math/s_csinl.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_csinl.c,v 1.0 2023-07-19 11:33:52 clib2devs Exp $ + * $Id: math_s_csinl.c,v 1.0 2023-07-19 11:33:52 clib4devs Exp $ */ #ifndef _COMPLEX_HEADERS_H diff --git a/library/math/s_csqrt.c b/library/math/s_csqrt.c index 7dd7a1ca..113de144 100644 --- a/library/math/s_csqrt.c +++ b/library/math/s_csqrt.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_csqrt.c,v 1.2 2023-07-19 11:33:52 clib2devs Exp $ + * $Id: math_s_csqrt.c,v 1.2 2023-07-19 11:33:52 clib4devs Exp $ */ #ifndef _COMPLEX_HEADERS_H diff --git a/library/math/s_csqrtf.c b/library/math/s_csqrtf.c index d9cb162a..b264cb7a 100644 --- a/library/math/s_csqrtf.c +++ b/library/math/s_csqrtf.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_csqrtf.c,v 1.1 2023-07-19 11:33:52 clib2devs Exp $ + * $Id: math_s_csqrtf.c,v 1.1 2023-07-19 11:33:52 clib4devs Exp $ */ #ifndef _COMPLEX_HEADERS_H diff --git a/library/math/s_csqrtl.c b/library/math/s_csqrtl.c index 256fd562..0063d291 100644 --- a/library/math/s_csqrtl.c +++ b/library/math/s_csqrtl.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_csqrtl.c,v 1.0 2023-07-19 11:33:52 clib2devs Exp $ + * $Id: math_s_csqrtl.c,v 1.0 2023-07-19 11:33:52 clib4devs Exp $ */ #ifndef _COMPLEX_HEADERS_H diff --git a/library/math/s_ctan.c b/library/math/s_ctan.c index a7ce7765..a8eb3ec3 100644 --- a/library/math/s_ctan.c +++ b/library/math/s_ctan.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_ctan.c,v 1.1 2023-07-19 11:33:52 clib2devs Exp $ + * $Id: math_s_ctan.c,v 1.1 2023-07-19 11:33:52 clib4devs Exp $ */ #ifndef _COMPLEX_HEADERS_H diff --git a/library/math/s_ctanf.c b/library/math/s_ctanf.c index 47f59784..af185209 100644 --- a/library/math/s_ctanf.c +++ b/library/math/s_ctanf.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_ctanf.c,v 1.1 2023-07-19 11:33:52 clib2devs Exp $ + * $Id: math_s_ctanf.c,v 1.1 2023-07-19 11:33:52 clib4devs Exp $ */ #ifndef _COMPLEX_HEADERS_H diff --git a/library/math/s_ctanh.c b/library/math/s_ctanh.c index dd016261..14a92e59 100644 --- a/library/math/s_ctanh.c +++ b/library/math/s_ctanh.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_ctanh.c,v 1.1 2023-07-19 11:33:52 clib2devs Exp $ + * $Id: math_s_ctanh.c,v 1.1 2023-07-19 11:33:52 clib4devs Exp $ */ #ifndef _COMPLEX_HEADERS_H diff --git a/library/math/s_ctanhf.c b/library/math/s_ctanhf.c index 8bbf9d3f..30141247 100644 --- a/library/math/s_ctanhf.c +++ b/library/math/s_ctanhf.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_ctanhf.c,v 1.1 2023-07-19 11:33:52 clib2devs Exp $ + * $Id: math_s_ctanhf.c,v 1.1 2023-07-19 11:33:52 clib4devs Exp $ */ #ifndef _COMPLEX_HEADERS_H diff --git a/library/math/s_ctanhl.c b/library/math/s_ctanhl.c index 4477cd9c..eb2b659e 100644 --- a/library/math/s_ctanhl.c +++ b/library/math/s_ctanhl.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_ctanhl.c,v 1.1 2023-07-19 11:33:52 clib2devs Exp $ + * $Id: math_s_ctanhl.c,v 1.1 2023-07-19 11:33:52 clib4devs Exp $ */ #ifndef _COMPLEX_HEADERS_H diff --git a/library/math/s_ctanl.c b/library/math/s_ctanl.c index 4fae52f6..f6c476fa 100644 --- a/library/math/s_ctanl.c +++ b/library/math/s_ctanl.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_ctanl.c,v 1.0 2023-07-19 11:33:52 clib2devs Exp $ + * $Id: math_s_ctanl.c,v 1.0 2023-07-19 11:33:52 clib4devs Exp $ */ #ifndef _COMPLEX_HEADERS_H diff --git a/library/math/s_erf.c b/library/math/s_erf.c index 9671decb..b5f88651 100644 --- a/library/math/s_erf.c +++ b/library/math/s_erf.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_erf.c,v 1.6 2023-07-19 12:04:23 clib2devs Exp $ + * $Id: math_s_erf.c,v 1.6 2023-07-19 12:04:23 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/s_erfc.c b/library/math/s_erfc.c index 54d267d7..c80c4adb 100644 --- a/library/math/s_erfc.c +++ b/library/math/s_erfc.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_erfc.c,v 1.5 2023-07-19 12:04:23 clib2devs Exp $ + * $Id: math_s_erfc.c,v 1.5 2023-07-19 12:04:23 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/s_erfcf.c b/library/math/s_erfcf.c index 0bc7e7bb..48166b34 100644 --- a/library/math/s_erfcf.c +++ b/library/math/s_erfcf.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_erfcf.c,v 1.5 2023-07-19 12:04:23 clib2devs Exp $ + * $Id: math_s_erfcf.c,v 1.5 2023-07-19 12:04:23 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/s_erfcl.c b/library/math/s_erfcl.c index 283fe5fe..33c1fcb3 100644 --- a/library/math/s_erfcl.c +++ b/library/math/s_erfcl.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_erfcl.c,v 1.0 2023-07-19 12:04:23 clib2devs Exp $ + * $Id: math_s_erfcl.c,v 1.0 2023-07-19 12:04:23 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/s_erff.c b/library/math/s_erff.c index e31cd1e1..fdc3b51d 100644 --- a/library/math/s_erff.c +++ b/library/math/s_erff.c @@ -1,5 +1,5 @@ /* - * $Id: math_erff.c,v 1.5 2023-07-19 12:04:23 clib2devs Exp $ + * $Id: math_erff.c,v 1.5 2023-07-19 12:04:23 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/s_erfl.c b/library/math/s_erfl.c index 4e395272..87ed48fe 100644 --- a/library/math/s_erfl.c +++ b/library/math/s_erfl.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_erfl.c,v 1.0 2023-07-19 12:04:23 clib2devs Exp $ + * $Id: math_s_erfl.c,v 1.0 2023-07-19 12:04:23 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/s_exp10.c b/library/math/s_exp10.c index 0cba0472..48c4772c 100644 --- a/library/math/s_exp10.c +++ b/library/math/s_exp10.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_exp10.c,v 1.0 2023-07-19 11:48:23 clib2devs Exp $ + * $Id: math_s_exp10.c,v 1.0 2023-07-19 11:48:23 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H #include "math_headers.h" diff --git a/library/math/s_exp10f.c b/library/math/s_exp10f.c index cd1bfab7..346496b8 100644 --- a/library/math/s_exp10f.c +++ b/library/math/s_exp10f.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_exp10f.c,v 1.0 2023-07-19 11:48:23 clib2devs Exp $ + * $Id: math_s_exp10f.c,v 1.0 2023-07-19 11:48:23 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H #include "math_headers.h" diff --git a/library/math/s_exp10l.c b/library/math/s_exp10l.c index 1be97f53..a6d97af0 100644 --- a/library/math/s_exp10l.c +++ b/library/math/s_exp10l.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_exp10l.c,v 1.0 2023-07-19 11:48:23 clib2devs Exp $ + * $Id: math_s_exp10l.c,v 1.0 2023-07-19 11:48:23 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H #include "math_headers.h" diff --git a/library/math/s_exp2.c b/library/math/s_exp2.c index e95de1c8..bc04515a 100644 --- a/library/math/s_exp2.c +++ b/library/math/s_exp2.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_exp2.c,v 1.4 2023-07-19 12:04:23 clib2devs Exp $ + * $Id: math_s_exp2.c,v 1.4 2023-07-19 12:04:23 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/s_exp2f.c b/library/math/s_exp2f.c index 34c2f9ef..5293a5a4 100644 --- a/library/math/s_exp2f.c +++ b/library/math/s_exp2f.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_exp2f.c,v 1.4 2023-07-19 12:04:23 clib2devs Exp $ + * $Id: math_s_exp2f.c,v 1.4 2023-07-19 12:04:23 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/s_exp2l.c b/library/math/s_exp2l.c index 78742286..865252c7 100644 --- a/library/math/s_exp2l.c +++ b/library/math/s_exp2l.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_exp2l.c,v 1.0 2023-07-19 11:48:23 clib2devs Exp $ + * $Id: math_s_exp2l.c,v 1.0 2023-07-19 11:48:23 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/s_expl.c b/library/math/s_expl.c index 9f718e7a..566cf608 100644 --- a/library/math/s_expl.c +++ b/library/math/s_expl.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_expl.c,v 1.0 2023-07-19 09:02:51 clib2devs Exp $ + * $Id: math_s_expl.c,v 1.0 2023-07-19 09:02:51 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/s_expm1.c b/library/math/s_expm1.c index 998aba32..29ffd81e 100644 --- a/library/math/s_expm1.c +++ b/library/math/s_expm1.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_expm1.c,v 1.4 2023-07-19 12:04:23 clib2devs Exp $ + * $Id: math_s_expm1.c,v 1.4 2023-07-19 12:04:23 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/s_expm1f.c b/library/math/s_expm1f.c index 6b816091..6f9c694b 100644 --- a/library/math/s_expm1f.c +++ b/library/math/s_expm1f.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_expm1f.c,v 1.4 2023-07-19 12:04:23 clib2devs Exp $ + * $Id: math_s_expm1f.c,v 1.4 2023-07-19 12:04:23 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/s_expm1l.c b/library/math/s_expm1l.c index 875d75cf..a7b17037 100644 --- a/library/math/s_expm1l.c +++ b/library/math/s_expm1l.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_expm1l.c,v 1.0 2023-07-19 12:04:23 clib2devs Exp $ + * $Id: math_s_expm1l.c,v 1.0 2023-07-19 12:04:23 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/s_fabs.c b/library/math/s_fabs.c index e5db8a5a..fd488049 100644 --- a/library/math/s_fabs.c +++ b/library/math/s_fabs.c @@ -1,5 +1,5 @@ /* - * $Id: math_fabs.c,v 1.10 2023-07-13 12:04:23 clib2devs Exp $ + * $Id: math_fabs.c,v 1.10 2023-07-13 12:04:23 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/s_fabs_spe.S b/library/math/s_fabs_spe.S index 218cb85b..3fdad82d 100644 --- a/library/math/s_fabs_spe.S +++ b/library/math/s_fabs_spe.S @@ -1,5 +1,5 @@ /* - * $Id: math_fabs_spe.S,v 1.00 2023-07-13 12:04:23 clib2devs Exp $ + * $Id: math_fabs_spe.S,v 1.00 2023-07-13 12:04:23 clib4devs Exp $ */ #include "ppc-asm.h" diff --git a/library/math/s_fabsf.c b/library/math/s_fabsf.c index 0dd16cd7..f29989a7 100644 --- a/library/math/s_fabsf.c +++ b/library/math/s_fabsf.c @@ -1,5 +1,5 @@ /* - * $Id: math_fabsf.c,v 1.4 2021-01-31 12:04:23 clib2devs Exp $ + * $Id: math_fabsf.c,v 1.4 2021-01-31 12:04:23 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/s_fabsf_spe.S b/library/math/s_fabsf_spe.S index 23ac951e..c93c3b36 100644 --- a/library/math/s_fabsf_spe.S +++ b/library/math/s_fabsf_spe.S @@ -1,5 +1,5 @@ /* - * $Id: math_fabsf_spe.S,v 1.00 2023-07-13 12:04:23 clib2devs Exp $ + * $Id: math_fabsf_spe.S,v 1.00 2023-07-13 12:04:23 clib4devs Exp $ */ #include "ppc-asm.h" diff --git a/library/math/s_fabsl.c b/library/math/s_fabsl.c index bb9061c9..b109beca 100644 --- a/library/math/s_fabsl.c +++ b/library/math/s_fabsl.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_fabsl.c,v 1.0 2023-07-19 12:04:23 clib2devs Exp $ + * $Id: math_s_fabsl.c,v 1.0 2023-07-19 12:04:23 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/s_fdim.c b/library/math/s_fdim.c index 6c5bf429..717e275b 100644 --- a/library/math/s_fdim.c +++ b/library/math/s_fdim.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_fdim.c,v 1.4 2023-07-19 12:04:23 clib2devs Exp $ + * $Id: math_s_fdim.c,v 1.4 2023-07-19 12:04:23 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/s_fdimf.c b/library/math/s_fdimf.c index d639a10f..b64087ff 100644 --- a/library/math/s_fdimf.c +++ b/library/math/s_fdimf.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_fdimf.c,v 1.4 2023-07-19 12:04:23 clib2devs Exp $ + * $Id: math_s_fdimf.c,v 1.4 2023-07-19 12:04:23 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/s_fdiml.c b/library/math/s_fdiml.c index 109666d8..ee3859a8 100644 --- a/library/math/s_fdiml.c +++ b/library/math/s_fdiml.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_fdiml.c,v 1.1 2023-07-19 12:04:23 clib2devs Exp $ + * $Id: math_s_fdiml.c,v 1.1 2023-07-19 12:04:23 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/s_floor.c b/library/math/s_floor.c index 502a2fc7..948e36ef 100644 --- a/library/math/s_floor.c +++ b/library/math/s_floor.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_floor.c,v 1.7 2023-07-19 12:04:23 clib2devs Exp $ + * $Id: math_s_floor.c,v 1.7 2023-07-19 12:04:23 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/s_floorf.c b/library/math/s_floorf.c index 3e927c16..fd08b4a3 100644 --- a/library/math/s_floorf.c +++ b/library/math/s_floorf.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_floorf.c,v 1.4 2023-07-19 12:04:23 clib2devs Exp $ + * $Id: math_s_floorf.c,v 1.4 2023-07-19 12:04:23 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/s_floorl.c b/library/math/s_floorl.c index b1c4143d..d81735fb 100644 --- a/library/math/s_floorl.c +++ b/library/math/s_floorl.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_floorl.c,v 1.0 2023-07-19 12:04:23 clib2devs Exp $ + * $Id: math_s_floorl.c,v 1.0 2023-07-19 12:04:23 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/s_fma.c b/library/math/s_fma.c index 9719a5d6..3143254e 100644 --- a/library/math/s_fma.c +++ b/library/math/s_fma.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_fma.c,v 1.4 2023-07-19 12:04:23 clib2devs Exp $ + * $Id: math_s_fma.c,v 1.4 2023-07-19 12:04:23 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/s_fmaf.c b/library/math/s_fmaf.c index b877aeef..5bee5317 100644 --- a/library/math/s_fmaf.c +++ b/library/math/s_fmaf.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_fmaf.c,v 1.4 2023-07-19 12:04:23 clib2devs Exp $ + * $Id: math_s_fmaf.c,v 1.4 2023-07-19 12:04:23 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/s_fmal.c b/library/math/s_fmal.c index 7f5e5f8f..2b8c58e9 100644 --- a/library/math/s_fmal.c +++ b/library/math/s_fmal.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_fmal.c,v 1.0 2023-07-19 12:04:23 clib2devs Exp $ + * $Id: math_s_fmal.c,v 1.0 2023-07-19 12:04:23 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/s_fmax.c b/library/math/s_fmax.c index bc870cb0..952baa7f 100644 --- a/library/math/s_fmax.c +++ b/library/math/s_fmax.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_fmax.c,v 1.4 2023-07-19 12:04:23 clib2devs Exp $ + * $Id: math_s_fmax.c,v 1.4 2023-07-19 12:04:23 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/s_fmaxf.c b/library/math/s_fmaxf.c index 1ce19497..f1d0622f 100644 --- a/library/math/s_fmaxf.c +++ b/library/math/s_fmaxf.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_fmaxf.c,v 1.4 2023-07-19 12:04:23 clib2devs Exp $ + * $Id: math_s_fmaxf.c,v 1.4 2023-07-19 12:04:23 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/s_fmaxl.c b/library/math/s_fmaxl.c index 25aa5e2f..111c483e 100644 --- a/library/math/s_fmaxl.c +++ b/library/math/s_fmaxl.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_fmaxl.c,v 1.1 2023-07-19 11:48:23 clib2devs Exp $ + * $Id: math_s_fmaxl.c,v 1.1 2023-07-19 11:48:23 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/s_fmin.c b/library/math/s_fmin.c index 70a66e0d..991e2107 100644 --- a/library/math/s_fmin.c +++ b/library/math/s_fmin.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_fmin.c,v 1.4 2023-07-19 12:04:23 clib2devs Exp $ + * $Id: math_s_fmin.c,v 1.4 2023-07-19 12:04:23 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/s_fminf.c b/library/math/s_fminf.c index c36f1321..ff7436ca 100644 --- a/library/math/s_fminf.c +++ b/library/math/s_fminf.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_fminf.c,v 1.4 2023-07-19 12:04:23 clib2devs Exp $ + * $Id: math_s_fminf.c,v 1.4 2023-07-19 12:04:23 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/s_fminl.c b/library/math/s_fminl.c index a3ce18a9..96fde90c 100644 --- a/library/math/s_fminl.c +++ b/library/math/s_fminl.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_fminl.c,v 1.1 2023-07-19 11:48:23 clib2devs Exp $ + * $Id: math_s_fminl.c,v 1.1 2023-07-19 11:48:23 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/s_fpclassify.c b/library/math/s_fpclassify.c index f4f5cc9e..906d43ee 100644 --- a/library/math/s_fpclassify.c +++ b/library/math/s_fpclassify.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_fpclassify.c,v 2.0 2023-07-19 12:04:23 clib2devs Exp $ + * $Id: math_s_fpclassify.c,v 2.0 2023-07-19 12:04:23 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/s_frexp.c b/library/math/s_frexp.c index 5ee62417..fad63ca4 100644 --- a/library/math/s_frexp.c +++ b/library/math/s_frexp.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_frexp.c,v 1.6 2023-07-19 12:04:23 clib2devs Exp $ + * $Id: math_s_frexp.c,v 1.6 2023-07-19 12:04:23 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/s_frexpf.c b/library/math/s_frexpf.c index 5d947165..d365a635 100644 --- a/library/math/s_frexpf.c +++ b/library/math/s_frexpf.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_frexpf.c,v 1.4 2023-07-19 12:04:23 clib2devs Exp $ + * $Id: math_s_frexpf.c,v 1.4 2023-07-19 12:04:23 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/s_frexpl.c b/library/math/s_frexpl.c index 65b559eb..4be94da9 100644 --- a/library/math/s_frexpl.c +++ b/library/math/s_frexpl.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_frexpl.c,v 1.0 2023-07-19 11:48:23 clib2devs Exp $ + * $Id: math_s_frexpl.c,v 1.0 2023-07-19 11:48:23 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/s_ilogb.c b/library/math/s_ilogb.c index 8c3310c4..1b3a03d8 100644 --- a/library/math/s_ilogb.c +++ b/library/math/s_ilogb.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_ilogb.c,v 1.3 2023-07-19 12:04:23 clib2devs Exp $ + * $Id: math_s_ilogb.c,v 1.3 2023-07-19 12:04:23 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/s_ilogbf.c b/library/math/s_ilogbf.c index 85c07184..f456d857 100644 --- a/library/math/s_ilogbf.c +++ b/library/math/s_ilogbf.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_ilogbf.c,v 1.3 2023-07-19 12:04:23 clib2devs Exp $ + * $Id: math_s_ilogbf.c,v 1.3 2023-07-19 12:04:23 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/s_ilogbl.c b/library/math/s_ilogbl.c index a7366bcf..9813ee93 100644 --- a/library/math/s_ilogbl.c +++ b/library/math/s_ilogbl.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_ilogbl.c,v 1.0 2023-07-19 11:48:23 clib2devs Exp $ + * $Id: math_s_ilogbl.c,v 1.0 2023-07-19 11:48:23 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/s_isfinite.c b/library/math/s_isfinite.c index af0be2b2..83743978 100644 --- a/library/math/s_isfinite.c +++ b/library/math/s_isfinite.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_isfinite.c,v 1.3 2023-07-19 12:04:23 clib2devs Exp $ + * $Id: math_s_isfinite.c,v 1.3 2023-07-19 12:04:23 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H diff --git a/library/math/s_isinf.c b/library/math/s_isinf.c index 6ee597e1..bacf228f 100644 --- a/library/math/s_isinf.c +++ b/library/math/s_isinf.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_isinf.c,v 1.1 2023-07-19 16:37:23 clib2devs Exp $ + * $Id: math_s_isinf.c,v 1.1 2023-07-19 16:37:23 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H diff --git a/library/math/s_isnan.c b/library/math/s_isnan.c index 8cf1b393..650be178 100644 --- a/library/math/s_isnan.c +++ b/library/math/s_isnan.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_isnan.c,v 1.1 2023-07-19 16:47:23 clib2devs Exp $ + * $Id: math_s_isnan.c,v 1.1 2023-07-19 16:47:23 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/s_isnormal.c b/library/math/s_isnormal.c index 9038fc4b..b18defb3 100644 --- a/library/math/s_isnormal.c +++ b/library/math/s_isnormal.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_isormal.c,v 1.1 2023-07-19 16:47:23 clib2devs Exp $ + * $Id: math_s_isormal.c,v 1.1 2023-07-19 16:47:23 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/s_ldexp.c b/library/math/s_ldexp.c index c1523aea..7723a9b1 100644 --- a/library/math/s_ldexp.c +++ b/library/math/s_ldexp.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_ldexp.c,v 1.7 2023-07-19 12:04:23 clib2devs Exp $ + * $Id: math_s_ldexp.c,v 1.7 2023-07-19 12:04:23 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/s_ldexpf.c b/library/math/s_ldexpf.c index 54913c00..c4f04725 100644 --- a/library/math/s_ldexpf.c +++ b/library/math/s_ldexpf.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_ldexpf.c,v 1.4 2023-07-19 12:04:23 clib2devs Exp $ + * $Id: math_s_ldexpf.c,v 1.4 2023-07-19 12:04:23 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/s_ldexpl.c b/library/math/s_ldexpl.c index 3c513452..d33e9129 100644 --- a/library/math/s_ldexpl.c +++ b/library/math/s_ldexpl.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_ldexpl.c,v 1.7 2023-07-19 12:04:23 clib2devs Exp $ + * $Id: math_s_ldexpl.c,v 1.7 2023-07-19 12:04:23 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/s_llrint.c b/library/math/s_llrint.c index fef2995f..9fc07237 100644 --- a/library/math/s_llrint.c +++ b/library/math/s_llrint.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_llrint.c,v 1.2 2023-07-19 10:09:48 clib2devs Exp $ + * $Id: math_s_llrint.c,v 1.2 2023-07-19 10:09:48 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/s_llrintf.c b/library/math/s_llrintf.c index b6014085..1f280d46 100644 --- a/library/math/s_llrintf.c +++ b/library/math/s_llrintf.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_llrintf.c,v 1.0 2022-07-19 12:04:23 clib2devs Exp $ + * $Id: math_s_llrintf.c,v 1.0 2022-07-19 12:04:23 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/s_llrintl.c b/library/math/s_llrintl.c index 38300ba4..3605be31 100644 --- a/library/math/s_llrintl.c +++ b/library/math/s_llrintl.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_llrintl.c,v 1.0 2027-03-19 07:54:24 clib2devs Exp $ + * $Id: math_s_llrintl.c,v 1.0 2027-03-19 07:54:24 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/s_llround.c b/library/math/s_llround.c index 0de82841..d405b824 100644 --- a/library/math/s_llround.c +++ b/library/math/s_llround.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_llround.c,v 1.7 2023-07-19 12:04:23 clib2devs Exp $ + * $Id: math_s_llround.c,v 1.7 2023-07-19 12:04:23 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/s_llroundf.c b/library/math/s_llroundf.c index 1aec8abb..49a4a216 100644 --- a/library/math/s_llroundf.c +++ b/library/math/s_llroundf.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_llroundf.c,v 1.1 2023-07-19 12:04:23 clib2devs Exp $ + * $Id: math_s_llroundf.c,v 1.1 2023-07-19 12:04:23 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/s_llroundl.c b/library/math/s_llroundl.c index 3c37930e..8eb48549 100644 --- a/library/math/s_llroundl.c +++ b/library/math/s_llroundl.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_llroundl.c,v 1.1 2023-07-19 12:04:23 clib2devs Exp $ + * $Id: math_s_llroundl.c,v 1.1 2023-07-19 12:04:23 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/s_log1p.c b/library/math/s_log1p.c index 49aa7c39..6730a24c 100644 --- a/library/math/s_log1p.c +++ b/library/math/s_log1p.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_log1p.c,v 1.4 2023-07-19 12:04:23 clib2devs Exp $ + * $Id: math_s_log1p.c,v 1.4 2023-07-19 12:04:23 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/s_log1pf.c b/library/math/s_log1pf.c index e58731fb..55c84d61 100644 --- a/library/math/s_log1pf.c +++ b/library/math/s_log1pf.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_log1pf.c,v 1.5 2023-07-19 12:04:23 clib2devs Exp $ + * $Id: math_s_log1pf.c,v 1.5 2023-07-19 12:04:23 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/s_log1pl.c b/library/math/s_log1pl.c index e666471f..82b97d31 100644 --- a/library/math/s_log1pl.c +++ b/library/math/s_log1pl.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_log1pl.c,v 1.0 2023-07-19 12:04:23 clib2devs Exp $ + * $Id: math_s_log1pl.c,v 1.0 2023-07-19 12:04:23 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/s_logb.c b/library/math/s_logb.c index 4493ec68..8ce91e12 100644 --- a/library/math/s_logb.c +++ b/library/math/s_logb.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_logb.c,v 1.9 2023-07-19 12:04:23 clib2devs Exp $ + * $Id: math_s_logb.c,v 1.9 2023-07-19 12:04:23 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/s_logbf.c b/library/math/s_logbf.c index 261b9b5a..b9278abe 100644 --- a/library/math/s_logbf.c +++ b/library/math/s_logbf.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_logbf.c,v 1.4 2023-07-19 12:04:23 clib2devs Exp $ + * $Id: math_s_logbf.c,v 1.4 2023-07-19 12:04:23 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/s_logbl.c b/library/math/s_logbl.c index a4a55e7f..db2c7c05 100644 --- a/library/math/s_logbl.c +++ b/library/math/s_logbl.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_logbl.c,v 1.0 2023-07-19 07:54:24 clib2devs Exp $ + * $Id: math_s_logbl.c,v 1.0 2023-07-19 07:54:24 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/s_lrint.c b/library/math/s_lrint.c index d6a57a54..1086fc29 100644 --- a/library/math/s_lrint.c +++ b/library/math/s_lrint.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_lrint.c,v 1.4 2023-07-19 10:09:48 clib2devs Exp $ + * $Id: math_s_lrint.c,v 1.4 2023-07-19 10:09:48 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/s_lrintf.c b/library/math/s_lrintf.c index e8299d5f..1dfb5285 100644 --- a/library/math/s_lrintf.c +++ b/library/math/s_lrintf.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_lrintf.c,v 1.4 2023-07-19 12:04:23 clib2devs Exp $ + * $Id: math_s_lrintf.c,v 1.4 2023-07-19 12:04:23 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/s_lrintf_spe.S b/library/math/s_lrintf_spe.S index 3de50c23..b4ba4f1a 100644 --- a/library/math/s_lrintf_spe.S +++ b/library/math/s_lrintf_spe.S @@ -1,5 +1,5 @@ /* - * $Id: math_s_lrintf_spe.S,v 1.00 2023-07-19 12:04:23 clib2devs Exp $ + * $Id: math_s_lrintf_spe.S,v 1.00 2023-07-19 12:04:23 clib4devs Exp $ */ #include "ppc-asm.h" diff --git a/library/math/s_lrintl.c b/library/math/s_lrintl.c index b5942275..80d0e518 100644 --- a/library/math/s_lrintl.c +++ b/library/math/s_lrintl.c @@ -1,5 +1,5 @@ /* - * $Id: math_lrintl.c,v 1.0 2023-07-19 07:54:24 clib2devs Exp $ + * $Id: math_lrintl.c,v 1.0 2023-07-19 07:54:24 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/s_lround.c b/library/math/s_lround.c index d8dcd92c..d3683350 100644 --- a/library/math/s_lround.c +++ b/library/math/s_lround.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_lround.c,v 1.6 2023-07-19 12:04:23 clib2devs Exp $ + * $Id: math_s_lround.c,v 1.6 2023-07-19 12:04:23 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/s_lroundf.c b/library/math/s_lroundf.c index 09e353bb..eb086de7 100644 --- a/library/math/s_lroundf.c +++ b/library/math/s_lroundf.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_lroundf.c,v 1.5 2022-03-13 12:04:23 clib2devs Exp $ + * $Id: math_s_lroundf.c,v 1.5 2022-03-13 12:04:23 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/s_lroundl.c b/library/math/s_lroundl.c index bb768091..db2e8702 100644 --- a/library/math/s_lroundl.c +++ b/library/math/s_lroundl.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_lroundl.c,v 1.1 2023-07-19 12:04:23 clib2devs Exp $ + * $Id: math_s_lroundl.c,v 1.1 2023-07-19 12:04:23 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/s_modf.c b/library/math/s_modf.c index 0b8565a7..68fbd39d 100644 --- a/library/math/s_modf.c +++ b/library/math/s_modf.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_modf.c,v 1.7 2023-07-19 12:04:23 clib2devs Exp $ + * $Id: math_s_modf.c,v 1.7 2023-07-19 12:04:23 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/s_modff.c b/library/math/s_modff.c index 53184a1b..bca8ae09 100644 --- a/library/math/s_modff.c +++ b/library/math/s_modff.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_modff.c,v 1.2 2023-07-19 12:04:23 clib2devs Exp $ + * $Id: math_s_modff.c,v 1.2 2023-07-19 12:04:23 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/s_modfl.c b/library/math/s_modfl.c index bd97bb07..e8edd827 100644 --- a/library/math/s_modfl.c +++ b/library/math/s_modfl.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_modfl.c,v 1.0 2023-07-19 12:04:23 clib2devs Exp $ + * $Id: math_s_modfl.c,v 1.0 2023-07-19 12:04:23 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/s_nan.c b/library/math/s_nan.c index 25baff53..62de51a7 100644 --- a/library/math/s_nan.c +++ b/library/math/s_nan.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_nan.c,v 1.5 2023-07-19 12:04:23 clib2devs Exp $ + * $Id: math_s_nan.c,v 1.5 2023-07-19 12:04:23 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H diff --git a/library/math/s_nanf.c b/library/math/s_nanf.c index b4b57a52..cec39db5 100644 --- a/library/math/s_nanf.c +++ b/library/math/s_nanf.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_nanf.c,v 1.5 2023-07-19 12:04:24 clib2devs Exp $ + * $Id: math_s_nanf.c,v 1.5 2023-07-19 12:04:24 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H diff --git a/library/math/s_nanl.c b/library/math/s_nanl.c index 499f95f2..ef83e148 100644 --- a/library/math/s_nanl.c +++ b/library/math/s_nanl.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_nanl.c,v 1.5 2023-07-19 12:04:24 clib2devs Exp $ + * $Id: math_s_nanl.c,v 1.5 2023-07-19 12:04:24 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/s_nearbyint.c b/library/math/s_nearbyint.c index 03c13b14..c5443ccd 100644 --- a/library/math/s_nearbyint.c +++ b/library/math/s_nearbyint.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_nearbyint.c,v 1.4 2023-07-19 12:04:24 clib2devs Exp $ + * $Id: math_s_nearbyint.c,v 1.4 2023-07-19 12:04:24 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/s_nearbyintf.c b/library/math/s_nearbyintf.c index ac2fd264..bf39a1c3 100644 --- a/library/math/s_nearbyintf.c +++ b/library/math/s_nearbyintf.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_nearbyintf.c,v 1.4 2023-07-19 12:04:24 clib2devs Exp $ + * $Id: math_s_nearbyintf.c,v 1.4 2023-07-19 12:04:24 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/s_nearbyintl.c b/library/math/s_nearbyintl.c index ab124999..93cde874 100644 --- a/library/math/s_nearbyintl.c +++ b/library/math/s_nearbyintl.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_nearbyintl.c,v 1.4 2023-07-19 12:04:24 clib2devs Exp $ + * $Id: math_s_nearbyintl.c,v 1.4 2023-07-19 12:04:24 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/s_nextafter.c b/library/math/s_nextafter.c index 8cd8a4e8..66959363 100644 --- a/library/math/s_nextafter.c +++ b/library/math/s_nextafter.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_nextafter.c,v 1.3 2023-07-19 12:04:24 clib2devs Exp $ + * $Id: math_s_nextafter.c,v 1.3 2023-07-19 12:04:24 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/s_nextafterf.c b/library/math/s_nextafterf.c index fb85de75..07556092 100644 --- a/library/math/s_nextafterf.c +++ b/library/math/s_nextafterf.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_nextafterf.c,v 1.4 2023-07-19 12:04:24 clib2devs Exp $ + * $Id: math_s_nextafterf.c,v 1.4 2023-07-19 12:04:24 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/s_nextafterl.c b/library/math/s_nextafterl.c index fbadb82d..e732b91b 100644 --- a/library/math/s_nextafterl.c +++ b/library/math/s_nextafterl.c @@ -1,5 +1,5 @@ /* - * $Id: math_lrintl.c,v 1.0 2023-07-19 12:04:24 clib2devs Exp $ + * $Id: math_lrintl.c,v 1.0 2023-07-19 12:04:24 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/s_nexttoward.c b/library/math/s_nexttoward.c index dd10e95d..9d0af100 100644 --- a/library/math/s_nexttoward.c +++ b/library/math/s_nexttoward.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_nexttoward.c,v 1.3 2023-07-19 12:04:24 clib2devs Exp $ + * $Id: math_s_nexttoward.c,v 1.3 2023-07-19 12:04:24 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/s_nexttowardf.c b/library/math/s_nexttowardf.c index 32e33698..bcad4030 100644 --- a/library/math/s_nexttowardf.c +++ b/library/math/s_nexttowardf.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_nexttowardf.c,v 1.3 2023-07-19 12:04:24 clib2devs Exp $ + * $Id: math_s_nexttowardf.c,v 1.3 2023-07-19 12:04:24 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/s_nexttowardl.c b/library/math/s_nexttowardl.c index 3db3cf7f..95d83307 100644 --- a/library/math/s_nexttowardl.c +++ b/library/math/s_nexttowardl.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_nexttowardl.c,v 1.3 2023-07-19 12:04:24 clib2devs Exp $ + * $Id: math_s_nexttowardl.c,v 1.3 2023-07-19 12:04:24 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/s_pow10.c b/library/math/s_pow10.c index 17df8a5e..09ea27e2 100644 --- a/library/math/s_pow10.c +++ b/library/math/s_pow10.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_pow10.c,v 1.0 2023-07-19 12:04:24 clib2devs Exp $ + * $Id: math_s_pow10.c,v 1.0 2023-07-19 12:04:24 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/s_pow10f.c b/library/math/s_pow10f.c index 40519a75..01acb1b5 100644 --- a/library/math/s_pow10f.c +++ b/library/math/s_pow10f.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_pow10f.c,v 1.0 2023-07-19 12:04:24 clib2devs Exp $ + * $Id: math_s_pow10f.c,v 1.0 2023-07-19 12:04:24 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/s_pow10l.c b/library/math/s_pow10l.c index fae79716..4d8d74aa 100644 --- a/library/math/s_pow10l.c +++ b/library/math/s_pow10l.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_pow10l.c,v 1.0 2023-07-19 12:04:24 clib2devs Exp $ + * $Id: math_s_pow10l.c,v 1.0 2023-07-19 12:04:24 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/s_remquo.c b/library/math/s_remquo.c index edc00bf6..2800df27 100644 --- a/library/math/s_remquo.c +++ b/library/math/s_remquo.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_remquo.c,v 1.4 2023-07-19 12:04:24 clib2devs Exp $ + * $Id: math_s_remquo.c,v 1.4 2023-07-19 12:04:24 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/s_remquof.c b/library/math/s_remquof.c index f68a4833..1a36915d 100644 --- a/library/math/s_remquof.c +++ b/library/math/s_remquof.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_remquof.c,v 1.4 2023-07-19 12:04:24 clib2devs Exp $ + * $Id: math_s_remquof.c,v 1.4 2023-07-19 12:04:24 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/s_remquol.c b/library/math/s_remquol.c index 6a5b17f5..bacf45b3 100644 --- a/library/math/s_remquol.c +++ b/library/math/s_remquol.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_remquol.c,v 1.0 2023-07-19 12:04:24 clib2devs Exp $ + * $Id: math_s_remquol.c,v 1.0 2023-07-19 12:04:24 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/s_rint.c b/library/math/s_rint.c index 6bdf7db0..5c28b210 100644 --- a/library/math/s_rint.c +++ b/library/math/s_rint.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_rint.c,v 1.5 2023-07-19 12:04:24 clib2devs Exp $ + * $Id: math_s_rint.c,v 1.5 2023-07-19 12:04:24 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/s_rintf.c b/library/math/s_rintf.c index a8aef05c..1e4b4d0f 100644 --- a/library/math/s_rintf.c +++ b/library/math/s_rintf.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_rintf.c,v 1.5 2023-07-19 12:04:24 clib2devs Exp $ + * $Id: math_s_rintf.c,v 1.5 2023-07-19 12:04:24 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/s_rintl.c b/library/math/s_rintl.c index fcbfe0ce..3c0f2ef0 100644 --- a/library/math/s_rintl.c +++ b/library/math/s_rintl.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_rintl.c,v 1.0 2023-07-19 18:06:24 clib2devs Exp $ + * $Id: math_s_rintl.c,v 1.0 2023-07-19 18:06:24 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/s_round.c b/library/math/s_round.c index 7f5b7071..5756278c 100644 --- a/library/math/s_round.c +++ b/library/math/s_round.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_round.c,v 1.4 2023-07-19 12:04:24 clib2devs Exp $ + * $Id: math_s_round.c,v 1.4 2023-07-19 12:04:24 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/s_roundf.c b/library/math/s_roundf.c index 8e6f5525..a2224e62 100644 --- a/library/math/s_roundf.c +++ b/library/math/s_roundf.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_roundf.c,v 1.4 2023-07-19 12:04:24 clib2devs Exp $ + * $Id: math_s_roundf.c,v 1.4 2023-07-19 12:04:24 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/s_roundl.c b/library/math/s_roundl.c index 980546ee..2047c401 100644 --- a/library/math/s_roundl.c +++ b/library/math/s_roundl.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_roundl.c,v 1.0 2023-07-19 11:42:24 clib2devs Exp $ + * $Id: math_s_roundl.c,v 1.0 2023-07-19 11:42:24 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/s_scalbln.c b/library/math/s_scalbln.c index 90ea2a2b..e3fdefd9 100644 --- a/library/math/s_scalbln.c +++ b/library/math/s_scalbln.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_scalbln.c,v 1.4 2023-07-19 12:04:24 clib2devs Exp $ + * $Id: math_s_scalbln.c,v 1.4 2023-07-19 12:04:24 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/s_scalblnf.c b/library/math/s_scalblnf.c index 0fd9c6d9..a31ea826 100644 --- a/library/math/s_scalblnf.c +++ b/library/math/s_scalblnf.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_scalblnf.c,v 1.4 2023-07-19 12:04:24 clib2devs Exp $ + * $Id: math_s_scalblnf.c,v 1.4 2023-07-19 12:04:24 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/s_scalblnl.c b/library/math/s_scalblnl.c index 88a1ef72..7b1a4aaa 100644 --- a/library/math/s_scalblnl.c +++ b/library/math/s_scalblnl.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_scalblnl.c,v 1.0 2023-07-19 12:04:24 clib2devs Exp $ + * $Id: math_s_scalblnl.c,v 1.0 2023-07-19 12:04:24 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/s_scalbn.c b/library/math/s_scalbn.c index e6e49abe..d3e1945c 100644 --- a/library/math/s_scalbn.c +++ b/library/math/s_scalbn.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_scalbn.c,v 1.4 2023-07-19 12:04:24 clib2devs Exp $ + * $Id: math_s_scalbn.c,v 1.4 2023-07-19 12:04:24 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/s_scalbnf.c b/library/math/s_scalbnf.c index 7274dae9..583a837d 100644 --- a/library/math/s_scalbnf.c +++ b/library/math/s_scalbnf.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_scalbnf.c,v 1.3 2023-07-19 12:04:24 clib2devs Exp $ + * $Id: math_s_scalbnf.c,v 1.3 2023-07-19 12:04:24 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/s_scalbnl.c b/library/math/s_scalbnl.c index 97d7edfa..f0e6b70a 100644 --- a/library/math/s_scalbnl.c +++ b/library/math/s_scalbnl.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_scalbnl.c,v 1.0 2023-07-19 12:04:24 clib2devs Exp $ + * $Id: math_s_scalbnl.c,v 1.0 2023-07-19 12:04:24 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/s_signbit.c b/library/math/s_signbit.c index cafcc1ab..48cada37 100644 --- a/library/math/s_signbit.c +++ b/library/math/s_signbit.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_signbit.c,v 2.0 2023-07-19 12:04:24 clib2devs Exp $ + * $Id: math_s_signbit.c,v 2.0 2023-07-19 12:04:24 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/s_signgam.c b/library/math/s_signgam.c index e533ff3e..8861eeaa 100644 --- a/library/math/s_signgam.c +++ b/library/math/s_signgam.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_signgam.c,v 2.0 2023-07-19 12:04:23 clib2devs Exp $ + * $Id: math_s_signgam.c,v 2.0 2023-07-19 12:04:23 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H @@ -10,7 +10,7 @@ int * __signgam(void) { - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; - return &__clib2->_gamma_signgam; + return &__clib4->_gamma_signgam; } \ No newline at end of file diff --git a/library/math/s_sin.c b/library/math/s_sin.c index 731da8c0..fbd89839 100644 --- a/library/math/s_sin.c +++ b/library/math/s_sin.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_sin.c,v 1.7 2023-07-19 12:04:24 clib2devs Exp $ + * $Id: math_s_sin.c,v 1.7 2023-07-19 12:04:24 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/s_sincos.c b/library/math/s_sincos.c index 3bc6f94e..70ef1762 100644 --- a/library/math/s_sincos.c +++ b/library/math/s_sincos.c @@ -1,5 +1,5 @@ /* - * $Id: math_sincos.c,v 1.0 2022-03-11 12:04:23 clib2devs Exp $ + * $Id: math_sincos.c,v 1.0 2022-03-11 12:04:23 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/s_sincosf.c b/library/math/s_sincosf.c index 1f084848..e3844f51 100644 --- a/library/math/s_sincosf.c +++ b/library/math/s_sincosf.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_sincosf.c,v 1.1 2023-07-15 12:04:23 clib2devs Exp $ + * $Id: math_s_sincosf.c,v 1.1 2023-07-15 12:04:23 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/s_sincosl.c b/library/math/s_sincosl.c index 37065944..b9724aaf 100644 --- a/library/math/s_sincosl.c +++ b/library/math/s_sincosl.c @@ -1,5 +1,5 @@ /* - * $Id: math_sincosl.c,v 1.0 2023-07-19 12:04:23 clib2devs Exp $ + * $Id: math_sincosl.c,v 1.0 2023-07-19 12:04:23 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/s_sinf.c b/library/math/s_sinf.c index 7caa2ec6..f5c12beb 100644 --- a/library/math/s_sinf.c +++ b/library/math/s_sinf.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_sinf.c,v 1.5 2023-07-19 12:04:24 clib2devs Exp $ + * $Id: math_s_sinf.c,v 1.5 2023-07-19 12:04:24 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/s_sinl.c b/library/math/s_sinl.c index c8b2dd92..46f7275c 100644 --- a/library/math/s_sinl.c +++ b/library/math/s_sinl.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_sinl.c,v 1.0 2023-07-19 12:04:24 clib2devs Exp $ + * $Id: math_s_sinl.c,v 1.0 2023-07-19 12:04:24 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/s_tan.c b/library/math/s_tan.c index af6dae88..d92ed2c4 100644 --- a/library/math/s_tan.c +++ b/library/math/s_tan.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_tan.c,v 1.8 2023-07-19 12:04:24 clib2devs Exp $ + * $Id: math_s_tan.c,v 1.8 2023-07-19 12:04:24 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/s_tanf.c b/library/math/s_tanf.c index 700ce080..daeeb1d6 100644 --- a/library/math/s_tanf.c +++ b/library/math/s_tanf.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_tanf.c,v 1.5 2023-08-18 12:04:24 clib2devs Exp $ + * $Id: math_s_tanf.c,v 1.5 2023-08-18 12:04:24 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/s_tanh.c b/library/math/s_tanh.c index d3886682..231cafc6 100644 --- a/library/math/s_tanh.c +++ b/library/math/s_tanh.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_tanh.c,v 1.6 2023-07-19 12:04:24 clib2devs Exp $ + * $Id: math_s_tanh.c,v 1.6 2023-07-19 12:04:24 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/s_tanhf.c b/library/math/s_tanhf.c index 0b0ed3fb..2ac476f2 100644 --- a/library/math/s_tanhf.c +++ b/library/math/s_tanhf.c @@ -1,5 +1,5 @@ /* - * $Id: math_tanhf.c,v 1.4 2023-07-19 12:04:24 clib2devs Exp $ + * $Id: math_tanhf.c,v 1.4 2023-07-19 12:04:24 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/s_tanhl.c b/library/math/s_tanhl.c index 604077ec..5a86f294 100644 --- a/library/math/s_tanhl.c +++ b/library/math/s_tanhl.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_tanhl.c,v 1.2 2023-07-19 19:28:23 clib2devs Exp $ + * $Id: math_s_tanhl.c,v 1.2 2023-07-19 19:28:23 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/s_tanl.c b/library/math/s_tanl.c index 4f441db8..efc709cb 100644 --- a/library/math/s_tanl.c +++ b/library/math/s_tanl.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_tanl.c,v 1.0 2023-07-19 12:04:24 clib2devs Exp $ + * $Id: math_s_tanl.c,v 1.0 2023-07-19 12:04:24 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/s_tgammaf.c b/library/math/s_tgammaf.c index e0fcf891..416063dc 100644 --- a/library/math/s_tgammaf.c +++ b/library/math/s_tgammaf.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_tgammaf.c,v 1.4 2023-07-19 12:04:24 clib2devs Exp $ + * $Id: math_s_tgammaf.c,v 1.4 2023-07-19 12:04:24 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/s_tgammal.c b/library/math/s_tgammal.c index 7e45cdb2..9ccb9c84 100644 --- a/library/math/s_tgammal.c +++ b/library/math/s_tgammal.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_tgammal.c,v 1.0 2023-07-19 20:04:24 clib2devs Exp $ + * $Id: math_s_tgammal.c,v 1.0 2023-07-19 20:04:24 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/s_trunc.c b/library/math/s_trunc.c index 5c6d0493..bdeb9a50 100644 --- a/library/math/s_trunc.c +++ b/library/math/s_trunc.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_trunc.c,v 1.4 2023-07-19 12:04:24 clib2devs Exp $ + * $Id: math_s_trunc.c,v 1.4 2023-07-19 12:04:24 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/s_truncf.c b/library/math/s_truncf.c index bf0a8bb7..76c06fa9 100644 --- a/library/math/s_truncf.c +++ b/library/math/s_truncf.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_truncf.c,v 1.4 2023-07-19 12:04:24 clib2devs Exp $ + * $Id: math_s_truncf.c,v 1.4 2023-07-19 12:04:24 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/math/s_truncl.c b/library/math/s_truncl.c index 8af5515c..5efd786b 100644 --- a/library/math/s_truncl.c +++ b/library/math/s_truncl.c @@ -1,5 +1,5 @@ /* - * $Id: math_s_truncl.c,v 1.0 2023-07-19 12:04:24 clib2devs Exp $ + * $Id: math_s_truncl.c,v 1.0 2023-07-19 12:04:24 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/misc/map.c b/library/misc/map.c index 48eb039d..73caebeb 100644 --- a/library/misc/map.c +++ b/library/misc/map.c @@ -1,5 +1,5 @@ /* - $Id: map.c,v 1.00 2022-07-18 12:09:49 clib2devs Exp $ + $Id: map.c,v 1.00 2022-07-18 12:09:49 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H diff --git a/library/misc/uuid.c b/library/misc/uuid.c index 90e25d75..4a963a64 100644 --- a/library/misc/uuid.c +++ b/library/misc/uuid.c @@ -1,5 +1,5 @@ /* - $Id: uuid.c,v 1.00 2023-07-01 12:09:49 clib2devs Exp $ + $Id: uuid.c,v 1.00 2023-07-01 12:09:49 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H diff --git a/library/mount/convertinfo.c b/library/mount/convertinfo.c index 82da29c9..009e4aa6 100644 --- a/library/mount/convertinfo.c +++ b/library/mount/convertinfo.c @@ -1,5 +1,5 @@ /* - * $Id: mount_convertinfo.c,v 1.7 2008-04-16 07:38:10 clib2devs Exp $ + * $Id: mount_convertinfo.c,v 1.7 2008-04-16 07:38:10 clib4devs Exp $ */ #ifndef _MOUNT_HEADERS_H diff --git a/library/mount/fstatfs.c b/library/mount/fstatfs.c index 37fb5ebb..9aef8ac7 100644 --- a/library/mount/fstatfs.c +++ b/library/mount/fstatfs.c @@ -1,5 +1,5 @@ /* - * $Id: mount_fstatfs.c,v 1.14 2006-11-16 14:39:23 clib2devs Exp $ + * $Id: mount_fstatfs.c,v 1.14 2006-11-16 14:39:23 clib4devs Exp $ */ #ifndef _MOUNT_HEADERS_H @@ -13,7 +13,7 @@ fstatfs(int file_descriptor, struct statfs *buf) { int result = ERROR; struct fd *fd = NULL; LONG success; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); @@ -24,7 +24,7 @@ fstatfs(int file_descriptor, struct statfs *buf) { __check_abort(); - __stdio_lock(__clib2); + __stdio_lock(__clib4); if (buf == NULL) { SHOWMSG("invalid buffer parameter"); @@ -33,9 +33,9 @@ fstatfs(int file_descriptor, struct statfs *buf) { goto out; } - assert(file_descriptor >= 0 && file_descriptor < __clib2->__num_fd); - assert(__clib2->__fd[file_descriptor] != NULL); - assert(FLAG_IS_SET(__clib2->__fd[file_descriptor]->fd_Flags, FDF_IN_USE)); + assert(file_descriptor >= 0 && file_descriptor < __clib4->__num_fd); + assert(__clib4->__fd[file_descriptor] != NULL); + assert(FLAG_IS_SET(__clib4->__fd[file_descriptor]->fd_Flags, FDF_IN_USE)); fd = __get_file_descriptor(file_descriptor); if (fd == NULL) { @@ -76,7 +76,7 @@ fstatfs(int file_descriptor, struct statfs *buf) { out: __fd_unlock(fd); - __stdio_unlock(__clib2); + __stdio_unlock(__clib4); UnLock(parent_dir); RETURN(result); diff --git a/library/mount/mount_headers.h b/library/mount/mount_headers.h index bf2dfd8f..75295df4 100755 --- a/library/mount/mount_headers.h +++ b/library/mount/mount_headers.h @@ -1,5 +1,5 @@ /* - * $Id: mount_headers.h,v 1.5 2006-01-08 12:04:24 clib2devs Exp $ + * $Id: mount_headers.h,v 1.5 2006-01-08 12:04:24 clib4devs Exp $ */ #ifndef _MOUNT_HEADERS_H diff --git a/library/mount/statfs.c b/library/mount/statfs.c index 0ea9b44d..d9ed50be 100644 --- a/library/mount/statfs.c +++ b/library/mount/statfs.c @@ -1,5 +1,5 @@ /* - * $Id: mount_statfs.c,v 1.7 2006-01-08 12:04:24 clib2devs Exp $ + * $Id: mount_statfs.c,v 1.7 2006-01-08 12:04:24 clib4devs Exp $ */ #ifndef _MOUNT_HEADERS_H @@ -12,7 +12,7 @@ int statfs(const char *path, struct statfs *buf) { LONG status; BPTR lock = BZERO; int result = ERROR; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); @@ -30,7 +30,7 @@ int statfs(const char *path, struct statfs *buf) { goto out; } - if (__clib2->__unix_path_semantics) { + if (__clib4->__unix_path_semantics) { if (path[0] == '\0') { SHOWMSG("no name given"); diff --git a/library/ndbm/db.c b/library/ndbm/db.c index 45446b5d..e72fa4b8 100644 --- a/library/ndbm/db.c +++ b/library/ndbm/db.c @@ -1,5 +1,5 @@ /* - * $Id: ndbm_db.c,v 1.0 2023-07-12 09:02:51 clib2devs Exp $ + * $Id: ndbm_db.c,v 1.0 2023-07-12 09:02:51 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H diff --git a/library/ndbm/dbm_clearerr.c b/library/ndbm/dbm_clearerr.c index 7b818720..c0a0d318 100644 --- a/library/ndbm/dbm_clearerr.c +++ b/library/ndbm/dbm_clearerr.c @@ -1,5 +1,5 @@ /* - * $Id: ndbm_dbm_clearerr.c,v 1.0 2023-07-12 12:04:26 clib2devs Exp $ + * $Id: ndbm_dbm_clearerr.c,v 1.0 2023-07-12 12:04:26 clib4devs Exp $ */ #ifndef _STRING_HEADERS_H diff --git a/library/ndbm/dbm_close.c b/library/ndbm/dbm_close.c index 767bda20..6d145b1c 100644 --- a/library/ndbm/dbm_close.c +++ b/library/ndbm/dbm_close.c @@ -1,5 +1,5 @@ /* - * $Id: ndbm_dbm_close.c,v 1.0 2023-07-12 12:04:26 clib2devs Exp $ + * $Id: ndbm_dbm_close.c,v 1.0 2023-07-12 12:04:26 clib4devs Exp $ */ #ifndef _STRING_HEADERS_H diff --git a/library/ndbm/dbm_delete.c b/library/ndbm/dbm_delete.c index 4781d57b..29b0a8e5 100644 --- a/library/ndbm/dbm_delete.c +++ b/library/ndbm/dbm_delete.c @@ -1,5 +1,5 @@ /* - * $Id: ndbm_dbm_delete.c,v 1.0 2023-07-12 12:04:26 clib2devs Exp $ + * $Id: ndbm_dbm_delete.c,v 1.0 2023-07-12 12:04:26 clib4devs Exp $ */ #ifndef _STRING_HEADERS_H diff --git a/library/ndbm/dbm_dirfno.c b/library/ndbm/dbm_dirfno.c index 999d33c6..7cb179ec 100644 --- a/library/ndbm/dbm_dirfno.c +++ b/library/ndbm/dbm_dirfno.c @@ -1,5 +1,5 @@ /* - * $Id: ndbm_dbm_dirfno.c,v 1.0 2023-07-12 12:04:26 clib2devs Exp $ + * $Id: ndbm_dbm_dirfno.c,v 1.0 2023-07-12 12:04:26 clib4devs Exp $ */ #ifndef _STRING_HEADERS_H diff --git a/library/ndbm/dbm_error.c b/library/ndbm/dbm_error.c index 74af53d2..aad7fed2 100644 --- a/library/ndbm/dbm_error.c +++ b/library/ndbm/dbm_error.c @@ -1,5 +1,5 @@ /* - * $Id: ndbm_dbm_error.c,v 1.0 2023-07-12 12:04:26 clib2devs Exp $ + * $Id: ndbm_dbm_error.c,v 1.0 2023-07-12 12:04:26 clib4devs Exp $ */ #ifndef _STRING_HEADERS_H diff --git a/library/ndbm/dbm_fetch.c b/library/ndbm/dbm_fetch.c index 15c39529..90b3bd1f 100644 --- a/library/ndbm/dbm_fetch.c +++ b/library/ndbm/dbm_fetch.c @@ -1,5 +1,5 @@ /* - * $Id: ndbm_dbm_fetch.c,v 1.0 2023-07-12 12:04:26 clib2devs Exp $ + * $Id: ndbm_dbm_fetch.c,v 1.0 2023-07-12 12:04:26 clib4devs Exp $ */ #ifndef _STRING_HEADERS_H diff --git a/library/ndbm/dbm_firstkey.c b/library/ndbm/dbm_firstkey.c index 0746fa12..3209d87b 100644 --- a/library/ndbm/dbm_firstkey.c +++ b/library/ndbm/dbm_firstkey.c @@ -1,5 +1,5 @@ /* - * $Id: ndbm_dbm_firstkey.c,v 1.0 2023-07-12 12:04:26 clib2devs Exp $ + * $Id: ndbm_dbm_firstkey.c,v 1.0 2023-07-12 12:04:26 clib4devs Exp $ */ #ifndef _STRING_HEADERS_H diff --git a/library/ndbm/dbm_nextkey.c b/library/ndbm/dbm_nextkey.c index 4dec711c..a62bdfd6 100644 --- a/library/ndbm/dbm_nextkey.c +++ b/library/ndbm/dbm_nextkey.c @@ -1,5 +1,5 @@ /* - * $Id: ndbm_dbm_nextkey.c,v 1.0 2023-07-12 12:04:26 clib2devs Exp $ + * $Id: ndbm_dbm_nextkey.c,v 1.0 2023-07-12 12:04:26 clib4devs Exp $ */ #ifndef _STRING_HEADERS_H diff --git a/library/ndbm/dbm_open.c b/library/ndbm/dbm_open.c index 6fb854b4..0b189d88 100644 --- a/library/ndbm/dbm_open.c +++ b/library/ndbm/dbm_open.c @@ -1,5 +1,5 @@ /* - * $Id: ndbm_dbm_open.c,v 1.0 2023-07-12 12:04:26 clib2devs Exp $ + * $Id: ndbm_dbm_open.c,v 1.0 2023-07-12 12:04:26 clib4devs Exp $ */ #ifndef _STRING_HEADERS_H diff --git a/library/ndbm/dbm_store.c b/library/ndbm/dbm_store.c index 8263c92e..30f5c547 100644 --- a/library/ndbm/dbm_store.c +++ b/library/ndbm/dbm_store.c @@ -1,5 +1,5 @@ /* - * $Id: ndbm_dbm_store.c,v 1.0 2023-07-12 12:04:26 clib2devs Exp $ + * $Id: ndbm_dbm_store.c,v 1.0 2023-07-12 12:04:26 clib4devs Exp $ */ #ifndef _STRING_HEADERS_H diff --git a/library/ndbm/hash.c b/library/ndbm/hash.c index 2bab0821..21838884 100644 --- a/library/ndbm/hash.c +++ b/library/ndbm/hash.c @@ -1,5 +1,5 @@ /* - * $Id: ndbm_hash.c,v 1.0 2023-07-12 09:02:51 clib2devs Exp $ + * $Id: ndbm_hash.c,v 1.0 2023-07-12 09:02:51 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H diff --git a/library/ndbm/hash_bigkey.c b/library/ndbm/hash_bigkey.c index 3f9ef7ec..13967b10 100644 --- a/library/ndbm/hash_bigkey.c +++ b/library/ndbm/hash_bigkey.c @@ -1,5 +1,5 @@ /* - * $Id: ndbm_hash_bigkey.c,v 1.0 2023-07-12 09:02:51 clib2devs Exp $ + * $Id: ndbm_hash_bigkey.c,v 1.0 2023-07-12 09:02:51 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H diff --git a/library/ndbm/hash_buf.c b/library/ndbm/hash_buf.c index 7bb3a780..fd2c7941 100644 --- a/library/ndbm/hash_buf.c +++ b/library/ndbm/hash_buf.c @@ -1,5 +1,5 @@ /* - * $Id: ndbm_hash_buf.c,v 1.0 2023-07-12 09:02:51 clib2devs Exp $ + * $Id: ndbm_hash_buf.c,v 1.0 2023-07-12 09:02:51 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H diff --git a/library/ndbm/hash_func.c b/library/ndbm/hash_func.c index 24ede051..122e198b 100644 --- a/library/ndbm/hash_func.c +++ b/library/ndbm/hash_func.c @@ -1,5 +1,5 @@ /* - * $Id: ndbm_hash_close.c,v 1.0 2023-07-12 09:02:51 clib2devs Exp $ + * $Id: ndbm_hash_close.c,v 1.0 2023-07-12 09:02:51 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H diff --git a/library/ndbm/hash_log2.c b/library/ndbm/hash_log2.c index 7e197c7a..0c03cb00 100644 --- a/library/ndbm/hash_log2.c +++ b/library/ndbm/hash_log2.c @@ -1,5 +1,5 @@ /* - * $Id: ndbm_hash_log2.c,v 1.0 2023-07-12 12:04:26 clib2devs Exp $ + * $Id: ndbm_hash_log2.c,v 1.0 2023-07-12 12:04:26 clib4devs Exp $ */ #ifndef _UNISTD_HEADERS_H diff --git a/library/ndbm/hash_page.c b/library/ndbm/hash_page.c index 8ecf9c27..8c95f95d 100644 --- a/library/ndbm/hash_page.c +++ b/library/ndbm/hash_page.c @@ -1,5 +1,5 @@ /* - * $Id: ndbm_hash_page.c,v 1.0 2023-07-12 09:02:51 clib2devs Exp $ + * $Id: ndbm_hash_page.c,v 1.0 2023-07-12 09:02:51 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H diff --git a/library/nltypes/catclose.c b/library/nltypes/catclose.c index b3cc5d6b..c709b62f 100644 --- a/library/nltypes/catclose.c +++ b/library/nltypes/catclose.c @@ -1,5 +1,5 @@ /* - * $Id: nltypes_catclose.c,v 1.0 2023-04-22 07:38:10 clib2devs Exp $ + * $Id: nltypes_catclose.c,v 1.0 2023-04-22 07:38:10 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H diff --git a/library/nltypes/catgets.c b/library/nltypes/catgets.c index 9140a210..4e64b32f 100644 --- a/library/nltypes/catgets.c +++ b/library/nltypes/catgets.c @@ -1,5 +1,5 @@ /* - * $Id: nltypes_catgets.c,v 1.0 2023-04-22 07:38:10 clib2devs Exp $ + * $Id: nltypes_catgets.c,v 1.0 2023-04-22 07:38:10 clib4devs Exp $ */ #include diff --git a/library/nltypes/catopen.c b/library/nltypes/catopen.c index 99f8fa08..2c2cc21b 100644 --- a/library/nltypes/catopen.c +++ b/library/nltypes/catopen.c @@ -1,5 +1,5 @@ /* - * $Id: nltypes_catopen.c,v 1.0 2023-04-22 07:38:10 clib2devs Exp $ + * $Id: nltypes_catopen.c,v 1.0 2023-04-22 07:38:10 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H diff --git a/library/posix/basename.c b/library/posix/basename.c index ca8ca0fb..b0d465d4 100644 --- a/library/posix/basename.c +++ b/library/posix/basename.c @@ -1,5 +1,5 @@ /* - * $Id: posix_basename.c,v 1.8 2006-10-02 07:15:37 clib2devs Exp $ + * $Id: posix_basename.c,v 1.8 2006-10-02 07:15:37 clib4devs Exp $ */ #include diff --git a/library/posix/checkabort.c b/library/posix/checkabort.c index d55b5b9c..89dff45e 100644 --- a/library/posix/checkabort.c +++ b/library/posix/checkabort.c @@ -1,5 +1,5 @@ /* - * $Id: signal_checkabort.c,v 1.4 2006-04-05 08:39:45 clib2devs Exp $ + * $Id: signal_checkabort.c,v 1.4 2006-04-05 08:39:45 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H @@ -12,9 +12,9 @@ void __check_abort(void) { - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; - if (__clib2->__check_abort_enabled && CheckSignal(__clib2->__break_signal_mask)) { + if (__clib4->__check_abort_enabled && CheckSignal(__clib4->__break_signal_mask)) { raise(SIGINT); } } diff --git a/library/posix/dirname.c b/library/posix/dirname.c index 5bef506a..3531badf 100644 --- a/library/posix/dirname.c +++ b/library/posix/dirname.c @@ -1,5 +1,5 @@ /* - * $Id: libgen_dirname.c,v 1.8 2006-10-02 07:15:37 clib2devs Exp $ + * $Id: libgen_dirname.c,v 1.8 2006-10-02 07:15:37 clib4devs Exp $ */ #include diff --git a/library/posix/fnmatch.c b/library/posix/fnmatch.c index a00081ed..746ffa54 100644 --- a/library/posix/fnmatch.c +++ b/library/posix/fnmatch.c @@ -1,5 +1,5 @@ /* - * $Id: fnmatch.c,v 1.0 2022-02-10 16:43:00 clib2devs Exp $ + * $Id: fnmatch.c,v 1.0 2022-02-10 16:43:00 clib4devs Exp $ */ /* diff --git a/library/posix/fstatvfs.c b/library/posix/fstatvfs.c index ee062ecb..0b70617c 100644 --- a/library/posix/fstatvfs.c +++ b/library/posix/fstatvfs.c @@ -1,5 +1,5 @@ /* - * $Id: posix_fstatvfs.c,v 1.0 2022-03-28 12:04:24 clib2devs Exp $ + * $Id: posix_fstatvfs.c,v 1.0 2022-03-28 12:04:24 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H diff --git a/library/posix/getrlimit.c b/library/posix/getrlimit.c index 2bdfb1f2..32160352 100644 --- a/library/posix/getrlimit.c +++ b/library/posix/getrlimit.c @@ -1,5 +1,5 @@ /* - * $Id: resource_getrlimit.c,v 1.2 2006-07-28 14:37:27 clib2devs Exp $ + * $Id: resource_getrlimit.c,v 1.2 2006-07-28 14:37:27 clib4devs Exp $ */ #include diff --git a/library/posix/getrusage.c b/library/posix/getrusage.c index e69474d2..2e8d53ba 100644 --- a/library/posix/getrusage.c +++ b/library/posix/getrusage.c @@ -1,5 +1,5 @@ /* - * $Id: resource_getrusage.c,v 1.0 2021-01-19 16:35:27 clib2devs Exp $ + * $Id: resource_getrusage.c,v 1.0 2021-01-19 16:35:27 clib4devs Exp $ */ #ifndef _TIME_HEADERS_H @@ -19,7 +19,7 @@ int getrusage(int who, struct rusage *rusage) { ENTER(); - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; if (rusage == NULL) { __set_errno(EINVAL); @@ -32,9 +32,9 @@ getrusage(int who, struct rusage *rusage) { long clock[2]; int status = 0; - struct TimerIFace *ITimer = __clib2->__ITimer; + struct TimerIFace *ITimer = __clib4->__ITimer; - if (__clib2 == NULL) { + if (__clib4 == NULL) { __set_errno(EINVAL); RETURN(-1); return -1; @@ -43,21 +43,21 @@ getrusage(int who, struct rusage *rusage) { switch (who) { case RUSAGE_SELF: { GetSysTime((struct TimeVal *) clock); - clock[0] -= __clib2->clock.tv_sec; - clock[1] -= __clib2->clock.tv_usec; + clock[0] -= __clib4->clock.tv_sec; + clock[1] -= __clib4->clock.tv_usec; if (clock[1] < 0) { clock[1] += 1000000; clock[0]--; } - memcpy(rusage, &__clib2->ru, sizeof(struct rusage)); + memcpy(rusage, &__clib4->ru, sizeof(struct rusage)); rusage->ru_utime.tv_sec = clock[0]; rusage->ru_utime.tv_usec = clock[1]; } break; case RUSAGE_CHILDREN: - memcpy(rusage, &__clib2->ru, sizeof(struct rusage)); + memcpy(rusage, &__clib4->ru, sizeof(struct rusage)); break; default: diff --git a/library/posix/glob.c b/library/posix/glob.c index 5565568b..188be96a 100644 --- a/library/posix/glob.c +++ b/library/posix/glob.c @@ -1,5 +1,5 @@ /* - * $Id: glob_glob.c,v 1.0 2021-01-22 11:56:47 clib2devs Exp $ + * $Id: glob_glob.c,v 1.0 2021-01-22 11:56:47 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H diff --git a/library/posix/globfree.c b/library/posix/globfree.c index dfb3bfbd..d85d0154 100644 --- a/library/posix/globfree.c +++ b/library/posix/globfree.c @@ -1,5 +1,5 @@ /* - * $Id: glob_globfree.c,v 1.0 2021-01-22 12:28:38 clib2devs Exp $ + * $Id: glob_globfree.c,v 1.0 2021-01-22 12:28:38 clib4devs Exp $ */ /**********************************************************************/ diff --git a/library/posix/ipc_headers.h b/library/posix/ipc_headers.h index b9732d15..98025cb0 100644 --- a/library/posix/ipc_headers.h +++ b/library/posix/ipc_headers.h @@ -69,9 +69,9 @@ struct WProc { struct Task *T; }; -struct Clib2Resource; +struct Clib4Resource; -extern struct UndoInfo *GetUndo(struct Clib2Resource *res, int id, int create); +extern struct UndoInfo *GetUndo(struct Clib4Resource *res, int id, int create); extern void WakeList(struct MinList *ml); extern struct WProc *RequestWakeup(struct MinList *ml); extern void WaitList(struct WProc *wp); diff --git a/library/posix/kill.c b/library/posix/kill.c index 84f31a70..08438409 100644 --- a/library/posix/kill.c +++ b/library/posix/kill.c @@ -1,5 +1,5 @@ /* - * $Id: signal_kill.c,v 1.8 2006-04-05 08:39:45 clib2devs Exp $ + * $Id: signal_kill.c,v 1.8 2006-04-05 08:39:45 clib4devs Exp $ */ #ifndef _SIGNAL_HEADERS_H diff --git a/library/posix/memalign.c b/library/posix/memalign.c index fa378fdc..39cd76f0 100644 --- a/library/posix/memalign.c +++ b/library/posix/memalign.c @@ -1,5 +1,5 @@ /* - * $Id: malloc_memalign.c,v 1.0 2021-01-10 10:52:18 clib2devs Exp $ + * $Id: malloc_memalign.c,v 1.0 2021-01-10 10:52:18 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H @@ -38,7 +38,7 @@ isPowerOfTwo(size_t alignment) { void * memalign(size_t alignment, size_t size) { void *result = NULL; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); @@ -50,7 +50,7 @@ memalign(size_t alignment, size_t size) { goto out; } - if (__clib2->__memalign_pool == NULL) { + if (__clib4->__memalign_pool == NULL) { __set_errno(ENOSYS); goto out; } @@ -62,7 +62,7 @@ memalign(size_t alignment, size_t size) { goto out; } - struct MemalignEntry *l = ItemPoolAlloc(__clib2->__memalign_pool); + struct MemalignEntry *l = ItemPoolAlloc(__clib4->__memalign_pool); if (l == NULL) { FreeVec(result); __set_errno(ENOMEM); @@ -72,9 +72,9 @@ memalign(size_t alignment, size_t size) { /* Set MemalignEntry node stuff */ l->me_Exact = result; - if (NULL != AVL_AddNode(&__clib2->__memalign_tree, &l->me_AvlNode, MemalignAVLNodeComp)) { + if (NULL != AVL_AddNode(&__clib4->__memalign_tree, &l->me_AvlNode, MemalignAVLNodeComp)) { FreeVec(result); - ItemPoolFree(__clib2->__memalign_pool, l); + ItemPoolFree(__clib4->__memalign_pool, l); __set_errno(ENOMEM); result = NULL; goto out; diff --git a/library/posix/mmap.c b/library/posix/mmap.c index 07e3b62e..01e046f1 100644 --- a/library/posix/mmap.c +++ b/library/posix/mmap.c @@ -1,5 +1,5 @@ /* - * $Id: mman_mmap.c,v 1.0 2021-01-18 20:17:27 clib2devs Exp $ + * $Id: mman_mmap.c,v 1.0 2021-01-18 20:17:27 clib4devs Exp $ */ #ifndef _UNISTD_HEADERS_H diff --git a/library/posix/msync.c b/library/posix/msync.c index 432a942b..2625e3ef 100644 --- a/library/posix/msync.c +++ b/library/posix/msync.c @@ -1,5 +1,5 @@ /* - * $Id: mman_mmap.c,v 1.0 2021-01-18 20:17:27 clib2devs Exp $ + * $Id: mman_mmap.c,v 1.0 2021-01-18 20:17:27 clib4devs Exp $ */ #ifndef _UNISTD_HEADERS_H diff --git a/library/posix/munmap.c b/library/posix/munmap.c index 92cb806f..947aa501 100644 --- a/library/posix/munmap.c +++ b/library/posix/munmap.c @@ -1,5 +1,5 @@ /* - * $Id: mman_munmap.c,v 1.0 2021-01-18 20:17:27 clib2devs Exp $ + * $Id: mman_munmap.c,v 1.0 2021-01-18 20:17:27 clib4devs Exp $ */ #ifndef _UNISTD_HEADERS_H diff --git a/library/posix/poll.c b/library/posix/poll.c index a224f066..8590eb64 100644 --- a/library/posix/poll.c +++ b/library/posix/poll.c @@ -1,5 +1,5 @@ /* - * $Id: poll.c,v 1.0 2022-08-22 11:50:0 clib2devs Exp $ + * $Id: poll.c,v 1.0 2022-08-22 11:50:0 clib4devs Exp $ */ #ifndef _UNISTD_HEADERS_H diff --git a/library/posix/posix_headers.h b/library/posix/posix_headers.h index 4c1baaf2..95475fcc 100644 --- a/library/posix/posix_headers.h +++ b/library/posix/posix_headers.h @@ -1,5 +1,5 @@ /* - * $Id: posix_headers.h,v 1.5 2006-01-08 12:04:24 clib2devs Exp $ + * $Id: posix_headers.h,v 1.5 2006-01-08 12:04:24 clib4devs Exp $ */ #ifndef _POSIX_HEADERS_H diff --git a/library/posix/raise.c b/library/posix/raise.c index 284beaf6..7a3a6373 100644 --- a/library/posix/raise.c +++ b/library/posix/raise.c @@ -1,5 +1,5 @@ /* - * $Id: signal_raise.c,v 1.11 2023-09-12 12:04:24 clib2devs Exp $ + * $Id: signal_raise.c,v 1.11 2023-09-12 12:04:24 clib4devs Exp $ */ #ifndef _SIGNAL_HEADERS_H @@ -28,7 +28,7 @@ int raise(int sig) { ENTER(); - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; int result = ERROR; SHOWVALUE(sig); @@ -47,18 +47,18 @@ raise(int sig) { } /* Can we deliver the signal? */ - if ((FLAG_IS_CLEAR(__clib2->__signals_blocked, (1 << sig)) && FLAG_IS_CLEAR(__clib2->local_signals_blocked, (1 << sig))) || sig == SIGKILL) { + if ((FLAG_IS_CLEAR(__clib4->__signals_blocked, (1 << sig)) && FLAG_IS_CLEAR(__clib4->local_signals_blocked, (1 << sig))) || sig == SIGKILL) { signal_handler_t handler; /* Which handler is installed for this signal? */ - handler = __clib2->__signal_handler_table[sig - SIGHUP]; + handler = __clib4->__signal_handler_table[sig - SIGHUP]; /* Should we ignore this signal? */ if (handler != SIG_IGN) { /* Block delivery of this signal to prevent recursion. */ SHOWMSG("Blocking signal if it isn't a kill signal"); if (sig != SIGINT && sig != SIGTERM && sig != SIGKILL) - SET_FLAG(__clib2->local_signals_blocked, (1 << sig)); + SET_FLAG(__clib4->local_signals_blocked, (1 << sig)); /* The default behaviour is to drop into abort(), or do something very much like it. */ @@ -67,14 +67,14 @@ raise(int sig) { if (sig == SIGINT || sig == SIGTERM || sig == SIGKILL) { /* Check ig we have timer terminal running. If so let's kill it */ - if (__clib2->tmr_real_task != NULL) { + if (__clib4->tmr_real_task != NULL) { struct Hook h = {{NULL, NULL}, (HOOKFUNC) hook_function, NULL, NULL}; int32 pid, process; /* Block SIGALRM signal from raise */ sigblock(SIGALRM); /* Get itimer process ID */ - pid = __clib2->tmr_real_task->pr_ProcessID; + pid = __clib4->tmr_real_task->pr_ProcessID; Forbid(); /* Scan for process */ @@ -83,19 +83,19 @@ raise(int sig) { while (process > 0) { /* Send a SIGBREAKF_CTRL_F signal until the timer task return to Wait state * and can get the signal */ - Signal((struct Task *) __clib2->tmr_real_task, SIGBREAKF_CTRL_F); + Signal((struct Task *) __clib4->tmr_real_task, SIGBREAKF_CTRL_F); process = ProcessScan(&h, (CONST_APTR) pid, 0); usleep(100); } Permit(); WaitForChildExit(pid); - __clib2->tmr_real_task = NULL; + __clib4->tmr_real_task = NULL; } char break_string[80]; /* Turn off ^C checking for good. */ - __clib2->__check_abort_enabled = FALSE; + __clib4->__check_abort_enabled = FALSE; Fault(ERROR_BREAK, NULL, break_string, (LONG) sizeof(break_string)); @@ -116,7 +116,7 @@ raise(int sig) { sigblock(SIGALRM); /* Since we got a signal we interrrupt every sleep function like nanosleep */ - Signal((struct Task *) __clib2->self, SIGBREAKF_CTRL_E); + Signal((struct Task *) __clib4->self, SIGBREAKF_CTRL_E); } } else if (handler == SIG_ERR) { @@ -136,7 +136,7 @@ raise(int sig) { /* Unblock signal delivery again. */ SHOWMSG("Unblocking signal"); - CLEAR_FLAG(__clib2->local_signals_blocked, (1 << sig)); + CLEAR_FLAG(__clib4->local_signals_blocked, (1 << sig)); } else { if (sig == SIGINT || sig == SIGTERM || sig == SIGKILL) { diff --git a/library/posix/readv.c b/library/posix/readv.c index a7be09d2..64c6e2e6 100644 --- a/library/posix/readv.c +++ b/library/posix/readv.c @@ -1,5 +1,5 @@ /* - * $Id: uio_readv.c,v 1.6 2006-01-08 12:04:27 clib2devs Exp $ + * $Id: uio_readv.c,v 1.6 2006-01-08 12:04:27 clib4devs Exp $ */ #ifndef _UIO_HEADERS_H @@ -15,7 +15,7 @@ readv(int file_descriptor, const struct iovec *iov, int vec_count) { ssize_t num_bytes_read; struct fd *fd = NULL; int i; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); @@ -23,7 +23,7 @@ readv(int file_descriptor, const struct iovec *iov, int vec_count) { SHOWPOINTER(iov); SHOWVALUE(vec_count); - __stdio_lock(__clib2); + __stdio_lock(__clib4); if (iov == NULL) { __set_errno(EFAULT); @@ -67,7 +67,7 @@ readv(int file_descriptor, const struct iovec *iov, int vec_count) { msg.fam_Data = (char *) iov[i].iov_base + part_num_bytes_read; msg.fam_Size = iov[i].iov_len - part_num_bytes_read; - num_bytes_read = (*fd->fd_Action)(__clib2, fd, &msg); + num_bytes_read = (*fd->fd_Action)(__clib4, fd, &msg); if (num_bytes_read == EOF) { __set_errno(msg.fam_Error); goto out; @@ -96,7 +96,7 @@ readv(int file_descriptor, const struct iovec *iov, int vec_count) { out: __fd_unlock(fd); - __stdio_unlock(__clib2); + __stdio_unlock(__clib4); RETURN(result); return (result); diff --git a/library/posix/setrlimit.c b/library/posix/setrlimit.c index 21ae2c12..0fd42344 100644 --- a/library/posix/setrlimit.c +++ b/library/posix/setrlimit.c @@ -1,5 +1,5 @@ /* - * $Id: resource_setrlimit.c,v 1.2 2006-07-28 14:37:27 clib2devs Exp $ + * $Id: resource_setrlimit.c,v 1.2 2006-07-28 14:37:27 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H diff --git a/library/posix/shm_headers.h b/library/posix/shm_headers.h index 34df5ee2..08b5faa0 100755 --- a/library/posix/shm_headers.h +++ b/library/posix/shm_headers.h @@ -1,5 +1,5 @@ /* - * $Id: shm_headers.h,v 1.1 2023-06-03 12:06:14 clib2devs Exp $ + * $Id: shm_headers.h,v 1.1 2023-06-03 12:06:14 clib4devs Exp $ */ #ifndef _SHM_HEADERS_H diff --git a/library/posix/sigaction.c b/library/posix/sigaction.c index 4f83420e..d092a1f6 100644 --- a/library/posix/sigaction.c +++ b/library/posix/sigaction.c @@ -1,5 +1,5 @@ /* - * $Id: signal_sigaction.c,v 1.0 2022-02-16 20:25:00 clib2devs Exp $ + * $Id: signal_sigaction.c,v 1.0 2022-02-16 20:25:00 clib4devs Exp $ */ #ifndef _SIGNAL_HEADERS_H diff --git a/library/posix/sigaddset.c b/library/posix/sigaddset.c index 65f55aa4..5f900899 100644 --- a/library/posix/sigaddset.c +++ b/library/posix/sigaddset.c @@ -1,5 +1,5 @@ /* - * $Id: signal_sigaddset.c,v 1.6 2006-01-08 12:04:24 clib2devs Exp $ + * $Id: signal_sigaddset.c,v 1.6 2006-01-08 12:04:24 clib4devs Exp $ */ diff --git a/library/posix/sigblock.c b/library/posix/sigblock.c index f7640ab4..8bc1ab25 100644 --- a/library/posix/sigblock.c +++ b/library/posix/sigblock.c @@ -1,5 +1,5 @@ /* - * $Id: signal_sigblock.c,v 1.4 2006-01-08 12:04:24 clib2devs Exp $ + * $Id: signal_sigblock.c,v 1.4 2006-01-08 12:04:24 clib4devs Exp $ */ #ifndef _SIGNAL_HEADERS_H @@ -9,15 +9,15 @@ int sigblock(int signal_mask) { int result; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); SHOWVALUE(signal_mask); - result = __clib2->__signals_blocked; + result = __clib4->__signals_blocked; - __clib2->__signals_blocked |= signal_mask; + __clib4->__signals_blocked |= signal_mask; RETURN(result); return (result); diff --git a/library/posix/sigdelset.c b/library/posix/sigdelset.c index 2a12f370..48f4d51b 100644 --- a/library/posix/sigdelset.c +++ b/library/posix/sigdelset.c @@ -1,5 +1,5 @@ /* - * $Id: signal_sigdelset.c,v 1.0 2022-02-16 20:25:00 clib2devs Exp $ + * $Id: signal_sigdelset.c,v 1.0 2022-02-16 20:25:00 clib4devs Exp $ */ #ifndef _SIGNAL_HEADERS_H diff --git a/library/posix/sigemptyset.c b/library/posix/sigemptyset.c index 1722759e..4c03e432 100644 --- a/library/posix/sigemptyset.c +++ b/library/posix/sigemptyset.c @@ -1,5 +1,5 @@ /* - * $Id: signal_sigemptyset.c,v 1.6 2006-01-08 12:04:24 clib2devs Exp $ + * $Id: signal_sigemptyset.c,v 1.6 2006-01-08 12:04:24 clib4devs Exp $ */ #ifndef _SIGNAL_HEADERS_H diff --git a/library/posix/sigfillset.c b/library/posix/sigfillset.c index 9d489de1..0a18cdb6 100644 --- a/library/posix/sigfillset.c +++ b/library/posix/sigfillset.c @@ -1,5 +1,5 @@ /* - * $Id: signal_sigfillset.c,v 1.0 2022-02-16 20:25:00 clib2devs Exp $ + * $Id: signal_sigfillset.c,v 1.0 2022-02-16 20:25:00 clib4devs Exp $ */ #ifndef _SIGNAL_HEADERS_H diff --git a/library/posix/sigismember.c b/library/posix/sigismember.c index 8aa35ad8..cb9b8846 100644 --- a/library/posix/sigismember.c +++ b/library/posix/sigismember.c @@ -1,5 +1,5 @@ /* - * $Id: signal_sigismember.c,v 1.0 2022-02-16 12:04:24 clib2devs Exp $ + * $Id: signal_sigismember.c,v 1.0 2022-02-16 12:04:24 clib4devs Exp $ */ #ifndef _SIGNAL_HEADERS_H diff --git a/library/posix/sigmask.c b/library/posix/sigmask.c index c21fae1b..ab329051 100644 --- a/library/posix/sigmask.c +++ b/library/posix/sigmask.c @@ -1,5 +1,5 @@ /* - * $Id: signal_sigmask.c,v 1.5 2006-01-08 12:04:24 clib2devs Exp $ + * $Id: signal_sigmask.c,v 1.5 2006-01-08 12:04:24 clib4devs Exp $ */ #ifndef _SIGNAL_HEADERS_H diff --git a/library/posix/signal.c b/library/posix/signal.c index 4b7ef3e6..d75a7305 100644 --- a/library/posix/signal.c +++ b/library/posix/signal.c @@ -1,5 +1,5 @@ /* - * $Id: signal_signal.c,v 1.4 2006-01-08 12:04:24 clib2devs Exp $ + * $Id: signal_signal.c,v 1.4 2006-01-08 12:04:24 clib4devs Exp $ */ #ifndef _SIGNAL_HEADERS_H @@ -9,7 +9,7 @@ void (*signal(int sig, void (*handler)(int)))(int) { int table_entry = sig - SIGHUP; void (*result)(int) = SIG_ERR; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); @@ -26,9 +26,9 @@ void (*signal(int sig, void (*handler)(int)))(int) { if (table_entry < 0) table_entry = 0; - result = (void (*)(int)) __clib2->__signal_handler_table[table_entry]; + result = (void (*)(int)) __clib4->__signal_handler_table[table_entry]; - __clib2->__signal_handler_table[table_entry] = (signal_handler_t) handler; + __clib4->__signal_handler_table[table_entry] = (signal_handler_t) handler; out: diff --git a/library/posix/signal_headers.h b/library/posix/signal_headers.h index 108a9b9b..5a4623f7 100755 --- a/library/posix/signal_headers.h +++ b/library/posix/signal_headers.h @@ -1,5 +1,5 @@ /* - * $Id: signal_headers.h,v 1.8 2006-01-08 12:04:24 clib2devs Exp $ + * $Id: signal_headers.h,v 1.8 2006-01-08 12:04:24 clib4devs Exp $ */ #ifndef _SIGNAL_HEADERS_H diff --git a/library/posix/sigprocmask.c b/library/posix/sigprocmask.c index 90ac55bb..53ebfd7c 100644 --- a/library/posix/sigprocmask.c +++ b/library/posix/sigprocmask.c @@ -1,5 +1,5 @@ /* - * $Id: signal_sigprocmask.c,v 1.6 2006-01-08 12:04:24 clib2devs Exp $ + * $Id: signal_sigprocmask.c,v 1.6 2006-01-08 12:04:24 clib4devs Exp $ */ #ifndef _SIGNAL_HEADERS_H @@ -9,7 +9,7 @@ int sigprocmask(int how, const sigset_t *set, sigset_t *oset) { int result = ERROR; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); @@ -25,7 +25,7 @@ sigprocmask(int how, const sigset_t *set, sigset_t *oset) { } if (oset != NULL) - (*oset) = __clib2->__signals_blocked; + (*oset) = __clib4->__signals_blocked; if (set != NULL) { SHOWVALUE(*set); @@ -35,21 +35,21 @@ sigprocmask(int how, const sigset_t *set, sigset_t *oset) { SHOWMSG("SIG_BLOCK"); - __clib2->__signals_blocked |= (*set); + __clib4->__signals_blocked |= (*set); break; case SIG_UNBLOCK: SHOWMSG("SIG_UNBLOCK"); - __clib2->__signals_blocked &= ~(*set); + __clib4->__signals_blocked &= ~(*set); break; case SIG_SETMASK: SHOWMSG("SIG_SETMASK"); - __clib2->__signals_blocked = (*set); + __clib4->__signals_blocked = (*set); break; } } diff --git a/library/posix/sigsetmask.c b/library/posix/sigsetmask.c index eb43f069..6567249f 100644 --- a/library/posix/sigsetmask.c +++ b/library/posix/sigsetmask.c @@ -1,5 +1,5 @@ /* - * $Id: posix_sigsetmask.c,v 1.4 2006-01-08 12:04:24 clib2devs Exp $ + * $Id: posix_sigsetmask.c,v 1.4 2006-01-08 12:04:24 clib4devs Exp $ */ #ifndef _SIGNAL_HEADERS_H @@ -9,15 +9,15 @@ int sigsetmask(int signal_mask) { int result; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); SHOWVALUE(signal_mask); - result = __clib2->__signals_blocked; + result = __clib4->__signals_blocked; - __clib2->__signals_blocked = signal_mask; + __clib4->__signals_blocked = signal_mask; RETURN(result); return(result); diff --git a/library/posix/statvfs.c b/library/posix/statvfs.c index 98a5e501..f004683e 100644 --- a/library/posix/statvfs.c +++ b/library/posix/statvfs.c @@ -1,5 +1,5 @@ /* - * $Id: posix_statvfs.c,v 1.0 2022-03-28 12:04:24 clib2devs Exp $ + * $Id: posix_statvfs.c,v 1.0 2022-03-28 12:04:24 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H @@ -14,14 +14,14 @@ int statvfs(const char *path, struct statvfs *buf) { struct name_translation_info path_name_nti; int result = -1; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); SHOWSTRING(path); SHOWPOINTER(buf); - if (__clib2->__unix_path_semantics) { + if (__clib4->__unix_path_semantics) { if (__translate_unix_to_amiga_path_name(&path, &path_name_nti) != 0) goto out; diff --git a/library/posix/sysinfo.c b/library/posix/sysinfo.c index 736eed29..2aa82237 100644 --- a/library/posix/sysinfo.c +++ b/library/posix/sysinfo.c @@ -1,5 +1,5 @@ /* - * $Id: systeminfo_sysinfo.c,v 1.6 2010-08-20 15:33:36 clib2devs Exp $ + * $Id: systeminfo_sysinfo.c,v 1.6 2010-08-20 15:33:36 clib4devs Exp $ */ #include diff --git a/library/posix/sysv_ftok.c b/library/posix/sysv_ftok.c index 633bb851..3aeb1467 100644 --- a/library/posix/sysv_ftok.c +++ b/library/posix/sysv_ftok.c @@ -1,5 +1,5 @@ /* - * $Id: ipc_ftok.c,v 1.1 2023-07-08 12:19:14 clib2devs Exp $ + * $Id: ipc_ftok.c,v 1.1 2023-07-08 12:19:14 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H @@ -14,14 +14,14 @@ key_t ftok(const char *path, int id) { uint32_t blockno = 0; struct Lock *flock; struct name_translation_info path_name_nti; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); SHOWSTRING(path); SHOWVALUE(id); - if (__clib2->__unix_path_semantics) { + if (__clib4->__unix_path_semantics) { if (__translate_unix_to_amiga_path_name(&path, &path_name_nti) != 0) return key; if (path_name_nti.is_root) { diff --git a/library/posix/sysv_idkey.c b/library/posix/sysv_idkey.c index 117b4767..14c24d9b 100644 --- a/library/posix/sysv_idkey.c +++ b/library/posix/sysv_idkey.c @@ -1,5 +1,5 @@ /* - * $Id: ipc_ftok.c,v 1.0 2021-01-26 12:19:14 clib2devs Exp $ + * $Id: ipc_ftok.c,v 1.0 2021-01-26 12:19:14 clib4devs Exp $ * * Common support functions. * @@ -10,18 +10,18 @@ #endif /* _STDIO_HEADERS_H */ #include "ipc_headers.h" -#include "clib2.h" +#include "clib4.h" #include "uuid.h" #include "map.h" struct UndoInfo * -GetUndo(struct Clib2Resource *res, int id, int create) { - struct _clib2 *__clib2 = __CLIB2; +GetUndo(struct Clib4Resource *res, int id, int create) { + struct _clib4 *__clib4 = __CLIB4; struct UndoInfo *ui = NULL; - struct Clib2Node key; - memset(&key, 0, sizeof(struct Clib2Node)); - strncpy(key.uuid, __clib2->uuid, UUID4_LEN); - struct Clib2Node *c2n = hashmap_get(res->children, &key); + struct Clib4Node key; + memset(&key, 0, sizeof(struct Clib4Node)); + strncpy(key.uuid, __clib4->uuid, UUID4_LEN); + struct Clib4Node *c2n = hashmap_get(res->children, &key); if (c2n->undo != NULL) { ui = c2n->undo; while (ui) { diff --git a/library/posix/sysv_msgctl.c b/library/posix/sysv_msgctl.c index 8fe006f5..3f5d18d8 100644 --- a/library/posix/sysv_msgctl.c +++ b/library/posix/sysv_msgctl.c @@ -1,5 +1,5 @@ /* - * $Id: sysv_msgctl.c,v 1.2 2023-07-08 13:59:43 clib2devs Exp $ + * $Id: sysv_msgctl.c,v 1.2 2023-07-08 13:59:43 clib4devs Exp $ */ #ifndef _SHM_HEADERS_H @@ -35,7 +35,7 @@ _msgctl(int qid, int cmd, struct msqid_ds *buf) { SHOWVALUE(cmd); SHOWPOINTER(buf); - struct Clib2Resource *res = (APTR) OpenResource(RESOURCE_NAME); + struct Clib4Resource *res = (APTR) OpenResource(RESOURCE_NAME); int ret = -1; struct msqid_ds *qi; IPCLock(&res->msgcx.keymap); diff --git a/library/posix/sysv_msgget.c b/library/posix/sysv_msgget.c index 5b9b0015..b4951650 100644 --- a/library/posix/sysv_msgget.c +++ b/library/posix/sysv_msgget.c @@ -1,5 +1,5 @@ /* - * $Id: sysv_msgget.c,v 1.2 2023-07-08 19:32:53 clib2devs Exp $ + * $Id: sysv_msgget.c,v 1.2 2023-07-08 19:32:53 clib4devs Exp $ */ #ifndef _SHM_HEADERS_H @@ -38,7 +38,7 @@ _msgget(key_t key, int flags) { SHOWVALUE(key); SHOWVALUE(flags); - struct Clib2Resource *res = (APTR) OpenResource(RESOURCE_NAME); + struct Clib4Resource *res = (APTR) OpenResource(RESOURCE_NAME); IPCLock(&res->msgcx.keymap); ret = GetIPCKeyId(&res->msgcx.keymap, key, flags, (void *(*)(int, int)) msg_construct); if (ret < 0) { diff --git a/library/posix/sysv_msgids.c b/library/posix/sysv_msgids.c index f90ec320..644fb338 100644 --- a/library/posix/sysv_msgids.c +++ b/library/posix/sysv_msgids.c @@ -1,5 +1,5 @@ /* - * $Id: sysv_msgids.c,v 1.2 2023-07-08 19:56:21 clib2devs Exp $ + * $Id: sysv_msgids.c,v 1.2 2023-07-08 19:56:21 clib4devs Exp $ */ #ifndef _SHM_HEADERS_H @@ -19,7 +19,7 @@ _msgids(int *buf, size_t nids, size_t *qcnt) { SHOWVALUE(nids); SHOWPOINTER(qcnt); - struct Clib2Resource *res = (APTR) OpenResource(RESOURCE_NAME); + struct Clib4Resource *res = (APTR) OpenResource(RESOURCE_NAME); IPCLock(&res->msgcx.keymap); ret = IPCids(&res->msgcx.keymap, (int32 *) buf, nids, (uint32 *) qcnt); if (ret) { diff --git a/library/posix/sysv_msgrcv.c b/library/posix/sysv_msgrcv.c index a06e1590..d10958b6 100644 --- a/library/posix/sysv_msgrcv.c +++ b/library/posix/sysv_msgrcv.c @@ -1,5 +1,5 @@ /* - * $Id: sysv_msgrcv.c,v 1.2 2023-07-08 19:35:07 clib2devs Exp $ + * $Id: sysv_msgrcv.c,v 1.2 2023-07-08 19:35:07 clib4devs Exp $ */ #ifndef _SHM_HEADERS_H @@ -21,7 +21,7 @@ _msgrcv(int qid, void *msg, size_t mlen, long mtype, int flags) { SHOWVALUE(mtype); SHOWVALUE(flags); - struct Clib2Resource *res = (APTR) OpenResource(RESOURCE_NAME); + struct Clib4Resource *res = (APTR) OpenResource(RESOURCE_NAME); struct Msg *m, *prev; int nbytes; struct msqid_ds *qi; diff --git a/library/posix/sysv_msgsnap.c b/library/posix/sysv_msgsnap.c index a8fcccd5..e8cad4ea 100644 --- a/library/posix/sysv_msgsnap.c +++ b/library/posix/sysv_msgsnap.c @@ -1,5 +1,5 @@ /* - * $Id: sysv_msgsnap.c,v 1.2 2023-07-08 19:42:41 clib2devs Exp $ + * $Id: sysv_msgsnap.c,v 1.2 2023-07-08 19:42:41 clib4devs Exp $ */ #ifndef _SHM_HEADERS_H @@ -28,7 +28,7 @@ _msgsnap(int qid, void *qbuf, size_t blen, long mtype) { SHOWVALUE(blen); SHOWVALUE(mtype); - struct Clib2Resource *res = (APTR) OpenResource(RESOURCE_NAME); + struct Clib4Resource *res = (APTR) OpenResource(RESOURCE_NAME); IPCLock(&res->msgcx.keymap); qi = GetIPCById(&res->msgcx.keymap, qid); if (qi) { diff --git a/library/posix/sysv_msgsnd.c b/library/posix/sysv_msgsnd.c index 09381656..ca4ac7cc 100644 --- a/library/posix/sysv_msgsnd.c +++ b/library/posix/sysv_msgsnd.c @@ -1,5 +1,5 @@ /* - * $Id: sysv_msgsnd.c,v 1.2 2023-07-08 18:25:10 clib2devs Exp $ + * $Id: sysv_msgsnd.c,v 1.2 2023-07-08 18:25:10 clib4devs Exp $ */ #ifndef _SHM_HEADERS_H @@ -29,7 +29,7 @@ _msgsnd(int qid, const void *msg, size_t mlen, int flags) { RETURN(ret); return ret; } - struct Clib2Resource *res = (APTR) OpenResource(RESOURCE_NAME); + struct Clib4Resource *res = (APTR) OpenResource(RESOURCE_NAME); redo: /* Retry after waiting for queue to not be full. */ diff --git a/library/posix/sysv_semctl.c b/library/posix/sysv_semctl.c index c69aae4c..e0f639aa 100644 --- a/library/posix/sysv_semctl.c +++ b/library/posix/sysv_semctl.c @@ -1,5 +1,5 @@ /* - * $Id: sysv_semctl.c,v 1.1 2023-07-08 17:07:00 clib2devs Exp $ + * $Id: sysv_semctl.c,v 1.1 2023-07-08 17:07:00 clib4devs Exp $ */ #ifndef _SHM_HEADERS_H @@ -38,7 +38,7 @@ _semctl(int semid, int semnum, int cmd, union semun aun) { SHOWVALUE(semnum); SHOWVALUE(cmd); - struct Clib2Resource *res = (APTR) OpenResource(RESOURCE_NAME); + struct Clib4Resource *res = (APTR) OpenResource(RESOURCE_NAME); IPCLock(&res->semcx.keymap); si = GetIPCById(&res->semcx.keymap, semid); diff --git a/library/posix/sysv_semget.c b/library/posix/sysv_semget.c index 58156eec..eaf7c32f 100644 --- a/library/posix/sysv_semget.c +++ b/library/posix/sysv_semget.c @@ -1,5 +1,5 @@ /* - * $Id: sysv_semget.c,v 1.1 2023-07-08 17:39:33 clib2devs Exp $ + * $Id: sysv_semget.c,v 1.1 2023-07-08 17:39:33 clib4devs Exp $ */ #ifndef _SHM_HEADERS_H @@ -60,7 +60,7 @@ _semget(key_t key, int nsems, int flags) { SHOWVALUE(nsems); SHOWVALUE(flags); - struct Clib2Resource *res = (APTR) OpenResource(RESOURCE_NAME); + struct Clib4Resource *res = (APTR) OpenResource(RESOURCE_NAME); IPCLock(&res->semcx.keymap); if (1) { diff --git a/library/posix/sysv_semids.c b/library/posix/sysv_semids.c index 7db5a559..71e0c997 100644 --- a/library/posix/sysv_semids.c +++ b/library/posix/sysv_semids.c @@ -1,5 +1,5 @@ /* - * $Id: sysv_semids.c,v 1.1 2023-07-08 17:07:00 clib2devs Exp $ + * $Id: sysv_semids.c,v 1.1 2023-07-08 17:07:00 clib4devs Exp $ */ #ifndef _SHM_HEADERS_H @@ -15,7 +15,7 @@ _semids(long int *buf, uint32_t nids, long unsigned int *idcnt) { SHOWVALUE(nids); SHOWPOINTER(idcnt); - struct Clib2Resource *res = (APTR) OpenResource(RESOURCE_NAME); + struct Clib4Resource *res = (APTR) OpenResource(RESOURCE_NAME); IPCLock(&res->semcx.keymap); ret = IPCids(&res->semcx.keymap, buf, nids, idcnt); IPCUnlock(&res->semcx.keymap); diff --git a/library/posix/sysv_semop.c b/library/posix/sysv_semop.c index 94249488..c22c5fd5 100644 --- a/library/posix/sysv_semop.c +++ b/library/posix/sysv_semop.c @@ -1,5 +1,5 @@ /* - * $Id: sysv_semop.c,v 1.1 2023-07-08 17:36:42 clib2devs Exp $ + * $Id: sysv_semop.c,v 1.1 2023-07-08 17:36:42 clib4devs Exp $ */ #ifndef _SHM_HEADERS_H @@ -26,7 +26,7 @@ _semop(int semid, const struct sembuf *ops, int nops) { __set_errno(EFAULT); goto out; } - struct Clib2Resource *res = (APTR) OpenResource(RESOURCE_NAME); + struct Clib4Resource *res = (APTR) OpenResource(RESOURCE_NAME); redo: diff --git a/library/posix/sysv_semtimedop.c b/library/posix/sysv_semtimedop.c index ec5b6d1c..58da6b9e 100644 --- a/library/posix/sysv_semtimedop.c +++ b/library/posix/sysv_semtimedop.c @@ -1,5 +1,5 @@ /* - * $Id: sysv_semtimedop.c,v 1.1 2023-07-08 17:26:15 clib2devs Exp $ + * $Id: sysv_semtimedop.c,v 1.1 2023-07-08 17:26:15 clib4devs Exp $ */ #ifndef _SHM_HEADERS_H @@ -16,7 +16,7 @@ _semtimedop(int semid, const struct sembuf *ops, int nops, struct timespec *to) SHOWVALUE(nops); SHOWPOINTER(to); - //struct Clib2Resource *res = (APTR) OpenResource(RESOURCE_NAME); + //struct Clib4Resource *res = (APTR) OpenResource(RESOURCE_NAME); __set_errno(EINVAL); RETURN(ret); diff --git a/library/posix/sysv_shmat.c b/library/posix/sysv_shmat.c index dd724d77..462ac154 100644 --- a/library/posix/sysv_shmat.c +++ b/library/posix/sysv_shmat.c @@ -1,5 +1,5 @@ /* - * $Id: sysv_shmat.c,v 1.2 2023-07-08 12:28:14 clib2devs Exp $ + * $Id: sysv_shmat.c,v 1.2 2023-07-08 12:28:14 clib4devs Exp $ */ #ifndef _SHM_HEADERS_H @@ -17,7 +17,7 @@ _shmat(int shmid, const void *prefadds, int flags) { SHOWPOINTER(prefadds); SHOWVALUE(flags); - struct Clib2Resource *res = (APTR) OpenResource(RESOURCE_NAME); + struct Clib4Resource *res = (APTR) OpenResource(RESOURCE_NAME); IPCLock(&res->shmcx.keymap); si = GetIPCById(&res->shmcx.keymap, shmid); diff --git a/library/posix/sysv_shmctl.c b/library/posix/sysv_shmctl.c index da1e3a96..dd39550c 100644 --- a/library/posix/sysv_shmctl.c +++ b/library/posix/sysv_shmctl.c @@ -1,5 +1,5 @@ /* - * $Id: sysv_shmctl.c,v 1.2 2023-07-08 13:36:17 clib2devs Exp $ + * $Id: sysv_shmctl.c,v 1.2 2023-07-08 13:36:17 clib4devs Exp $ */ #ifndef _SHM_HEADERS_H @@ -26,7 +26,7 @@ _shmctl(int shmid, int cmd, struct shmid_ds *cbuf) { SHOWVALUE(cmd); SHOWPOINTER(cbuf); - struct Clib2Resource *res = (APTR) OpenResource(RESOURCE_NAME); + struct Clib4Resource *res = (APTR) OpenResource(RESOURCE_NAME); IPCLock(&res->shmcx.keymap); si = GetIPCById(&res->shmcx.keymap, shmid); if (si) { diff --git a/library/posix/sysv_shmdt.c b/library/posix/sysv_shmdt.c index 0ea11160..256541d8 100644 --- a/library/posix/sysv_shmdt.c +++ b/library/posix/sysv_shmdt.c @@ -1,5 +1,5 @@ /* - * $Id: sysv_shmdt.c,v 1.2 2023-07-08 13:30:03 clib2devs Exp $ + * $Id: sysv_shmdt.c,v 1.2 2023-07-08 13:30:03 clib4devs Exp $ */ #ifndef _SHM_HEADERS_H @@ -30,7 +30,7 @@ _shmdt(const void *shmaddr) { SHOWPOINTER(shmaddr); - struct Clib2Resource *res = (APTR) OpenResource(RESOURCE_NAME); + struct Clib4Resource *res = (APTR) OpenResource(RESOURCE_NAME); IPCLock(&res->shmcx.keymap); si = GetIPCByP(&res->shmcx.keymap, (int (*)(void *, void *)) addrcmp, shmaddr, &id); if (si) { diff --git a/library/posix/sysv_shmget.c b/library/posix/sysv_shmget.c index b371fc4c..12dcfc55 100644 --- a/library/posix/sysv_shmget.c +++ b/library/posix/sysv_shmget.c @@ -1,5 +1,5 @@ /* - * $Id: sysv_shmget.c,v 1.2 2023-07-08 13:24:59 clib2devs Exp $ + * $Id: sysv_shmget.c,v 1.2 2023-07-08 13:24:59 clib4devs Exp $ */ #ifndef _SHM_HEADERS_H @@ -39,7 +39,7 @@ _shmget(key_t key, size_t size, int flags) { SHOWVALUE(size); SHOWVALUE(flags); - struct Clib2Resource *res = (APTR) OpenResource(RESOURCE_NAME); + struct Clib4Resource *res = (APTR) OpenResource(RESOURCE_NAME); IPCLock(&res->shmcx.keymap); if ((size + res->shmcx.totshm) < res->shmcx.shmmax) { diff --git a/library/posix/sysv_shmids.c b/library/posix/sysv_shmids.c index 196d7e29..f5960821 100644 --- a/library/posix/sysv_shmids.c +++ b/library/posix/sysv_shmids.c @@ -1,5 +1,5 @@ /* - * $Id: sysv_shmids.c,v 1.2 2023-07-08 13:40:49 clib2devs Exp $ + * $Id: sysv_shmids.c,v 1.2 2023-07-08 13:40:49 clib4devs Exp $ */ #ifndef _SHM_HEADERS_H @@ -15,7 +15,7 @@ _shmids(int *buf, size_t nids, size_t *idcnt) { SHOWVALUE(nids); SHOWPOINTER(idcnt); - struct Clib2Resource *res = (APTR) OpenResource(RESOURCE_NAME); + struct Clib4Resource *res = (APTR) OpenResource(RESOURCE_NAME); IPCLock(&res->shmcx.keymap); ret = IPCids(&res->shmcx.keymap, (int32 *) buf, nids, (uint32 *) idcnt); if (ret) { diff --git a/library/posix/uio_headers.h b/library/posix/uio_headers.h index 6164f72a..d58307c5 100755 --- a/library/posix/uio_headers.h +++ b/library/posix/uio_headers.h @@ -1,5 +1,5 @@ /* - * $Id: uio_headers.h,v 1.2 2006-01-08 12:04:27 clib2devs Exp $ + * $Id: uio_headers.h,v 1.2 2006-01-08 12:04:27 clib4devs Exp $ */ #ifndef _UIO_HEADERS_H diff --git a/library/posix/ulimit.c b/library/posix/ulimit.c index 4ef0e12c..3537eb24 100644 --- a/library/posix/ulimit.c +++ b/library/posix/ulimit.c @@ -1,5 +1,5 @@ /* - * $Id: ulimit_ulimit.c,v 1.2 2006-07-28 14:37:27 clib2devs Exp $ + * $Id: ulimit_ulimit.c,v 1.2 2006-07-28 14:37:27 clib4devs Exp $ */ #include diff --git a/library/posix/uname.c b/library/posix/uname.c index f9f23733..c7e11bbc 100644 --- a/library/posix/uname.c +++ b/library/posix/uname.c @@ -1,5 +1,5 @@ /* - * $Id: utsname_uname.c,v 1.6 2022-04-20 15:33:36 clib2devs Exp $ + * $Id: utsname_uname.c,v 1.6 2022-04-20 15:33:36 clib4devs Exp $ */ #include diff --git a/library/posix/writev.c b/library/posix/writev.c index 4d99ff64..6eeb0a5e 100644 --- a/library/posix/writev.c +++ b/library/posix/writev.c @@ -1,5 +1,5 @@ /* - * $Id: uio_writev.c,v 1.5 2006-01-08 12:04:27 clib2devs Exp $ + * $Id: uio_writev.c,v 1.5 2006-01-08 12:04:27 clib4devs Exp $ */ #ifndef _UIO_HEADERS_H @@ -14,7 +14,7 @@ writev(int file_descriptor, const struct iovec *iov, int vec_count) { char *buffer = NULL; struct fd *fd = NULL; int i; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); @@ -22,7 +22,7 @@ writev(int file_descriptor, const struct iovec *iov, int vec_count) { SHOWPOINTER(iov); SHOWVALUE(vec_count); - __stdio_lock(__clib2); + __stdio_lock(__clib4); if (iov == NULL) { __set_errno(EFAULT); @@ -66,7 +66,7 @@ writev(int file_descriptor, const struct iovec *iov, int vec_count) { msg.fam_Data = buffer; msg.fam_Size = total_num_bytes_written; - if ((*fd->fd_Action)(__clib2, fd, &msg) == EOF) { + if ((*fd->fd_Action)(__clib4, fd, &msg) == EOF) { __set_errno(msg.fam_Error); goto out; } @@ -79,7 +79,7 @@ writev(int file_descriptor, const struct iovec *iov, int vec_count) { msg.fam_Data = (char *) iov[i].iov_base; msg.fam_Size = iov[i].iov_len; - if ((*fd->fd_Action)(__clib2, fd, &msg) == EOF) { + if ((*fd->fd_Action)(__clib4, fd, &msg) == EOF) { __set_errno(msg.fam_Error); goto out; } @@ -95,7 +95,7 @@ writev(int file_descriptor, const struct iovec *iov, int vec_count) { free(buffer); __fd_unlock(fd); - __stdio_unlock(__clib2); + __stdio_unlock(__clib4); RETURN(result); return (result); diff --git a/library/prng/__rand48_step.c b/library/prng/__rand48_step.c index 5713689d..df0e0577 100644 --- a/library/prng/__rand48_step.c +++ b/library/prng/__rand48_step.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib___rand48_step.c,v 1.0 2022-08-06 10:36:26 clib2devs Exp $ + * $Id: stdlib___rand48_step.c,v 1.0 2022-08-06 10:36:26 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H diff --git a/library/prng/__seed48.c b/library/prng/__seed48.c index b10baaf7..d0abcdc5 100644 --- a/library/prng/__seed48.c +++ b/library/prng/__seed48.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib___seed48.c,v 1.0 2022-08-06 10:36:26 clib2devs Exp $ + * $Id: stdlib___seed48.c,v 1.0 2022-08-06 10:36:26 clib4devs Exp $ */ #include "rand48.h" diff --git a/library/prng/drand48.c b/library/prng/drand48.c index 84b86e15..86bee345 100644 --- a/library/prng/drand48.c +++ b/library/prng/drand48.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_drand48.c,v 1.0 2022-08-06 10:36:26 clib2devs Exp $ + * $Id: stdlib_drand48.c,v 1.0 2022-08-06 10:36:26 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H #include "../stdlib/stdlib_headers.h" diff --git a/library/prng/erand48.c b/library/prng/erand48.c index 15c0feaf..a9d8f970 100644 --- a/library/prng/erand48.c +++ b/library/prng/erand48.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_erand48.c,v 1.0 2022-08-06 10:36:26 clib2devs Exp $ + * $Id: stdlib_erand48.c,v 1.0 2022-08-06 10:36:26 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H #include "../stdlib/stdlib_headers.h" diff --git a/library/prng/getrandom.c b/library/prng/getrandom.c index d2db9e1f..4dafe2fe 100644 --- a/library/prng/getrandom.c +++ b/library/prng/getrandom.c @@ -1,5 +1,5 @@ /* - * $Id: prng_getrandom.c,v 1.0 2023-06-15 12:04:22 clib2devs Exp $ + * $Id: prng_getrandom.c,v 1.0 2023-06-15 12:04:22 clib4devs Exp $ */ #ifndef _FCNTL_HEADERS_H @@ -17,9 +17,9 @@ Upon error, return -1 and set errno. */ ssize_t getrandom(void *buffer, size_t length, unsigned int flags) { - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; BOOL devrandom = (flags & GRND_RANDOM) != 0; - int fd = __clib2->randfd[devrandom]; + int fd = __clib4->randfd[devrandom]; if (fd < 0) { int oflags = (O_RDONLY + (flags & GRND_NONBLOCK ? O_NONBLOCK : 0)); @@ -29,7 +29,7 @@ getrandom(void *buffer, size_t length, unsigned int flags) { __set_errno(ENOSYS); return -1; } - __clib2->randfd[devrandom] = fd; + __clib4->randfd[devrandom] = fd; } return read(fd, buffer, length); diff --git a/library/prng/inistate.c b/library/prng/inistate.c index ee029541..9243cee5 100644 --- a/library/prng/inistate.c +++ b/library/prng/inistate.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_inistate.c,v 1.0 2022-02-23 12:23:12 clib2devs Exp $ + * $Id: stdlib_inistate.c,v 1.0 2022-02-23 12:23:12 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H #include "../stdlib/stdlib_headers.h" @@ -7,7 +7,7 @@ char * initstate(unsigned seed, char *state, size_t size) { - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; void *old; ENTER(); @@ -18,24 +18,24 @@ initstate(unsigned seed, char *state, size_t size) { if (size < 8) return 0; - ObtainSemaphore(__clib2->__random_lock); + ObtainSemaphore(__clib4->__random_lock); old = savestate(); if (size < 32) - __clib2->n = 0; + __clib4->n = 0; else if (size < 64) - __clib2->n = 7; + __clib4->n = 7; else if (size < 128) - __clib2->n = 15; + __clib4->n = 15; else if (size < 256) - __clib2->n = 31; + __clib4->n = 31; else - __clib2->n = 63; - __clib2->x = (uint32_t*)state + 1; + __clib4->n = 63; + __clib4->x = (uint32_t*)state + 1; __srandom(seed); savestate(); - ReleaseSemaphore(__clib2->__random_lock); + ReleaseSemaphore(__clib4->__random_lock); RETURN(old); return old; diff --git a/library/prng/jrand48.c b/library/prng/jrand48.c index 96e8d296..301b548b 100644 --- a/library/prng/jrand48.c +++ b/library/prng/jrand48.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_jrand48.c,v 1.0 2021-02-23 10:36:26 clib2devs Exp $ + * $Id: stdlib_jrand48.c,v 1.0 2021-02-23 10:36:26 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H #include "../stdlib/stdlib_headers.h" diff --git a/library/prng/lcong48.c b/library/prng/lcong48.c index 2b009e56..9f420d65 100644 --- a/library/prng/lcong48.c +++ b/library/prng/lcong48.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_lcong48.c,v 1.0 2022-08-06 10:36:26 clib2devs Exp $ + * $Id: stdlib_lcong48.c,v 1.0 2022-08-06 10:36:26 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H #include "../stdlib/stdlib_headers.h" diff --git a/library/prng/lrand48.c b/library/prng/lrand48.c index 67c7e58c..6bd79d5b 100644 --- a/library/prng/lrand48.c +++ b/library/prng/lrand48.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_lrand48.c,v 1.0 2022-08-06 10:36:26 clib2devs Exp $ + * $Id: stdlib_lrand48.c,v 1.0 2022-08-06 10:36:26 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H #include "../stdlib/stdlib_headers.h" diff --git a/library/prng/mrand48.c b/library/prng/mrand48.c index 0eefe6cb..bd1c32b1 100644 --- a/library/prng/mrand48.c +++ b/library/prng/mrand48.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_mrand48.c,v 1.0 2022-08-06 10:36:26 clib2devs Exp $ + * $Id: stdlib_mrand48.c,v 1.0 2022-08-06 10:36:26 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H #include "../stdlib/stdlib_headers.h" diff --git a/library/prng/nrand48.c b/library/prng/nrand48.c index 6b72c77d..5b37e5c5 100644 --- a/library/prng/nrand48.c +++ b/library/prng/nrand48.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_nrand48.c,v 1.0 2022-08-06 10:36:26 clib2devs Exp $ + * $Id: stdlib_nrand48.c,v 1.0 2022-08-06 10:36:26 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H #include "../stdlib/stdlib_headers.h" diff --git a/library/prng/rand.c b/library/prng/rand.c index 09e07ac2..151f1470 100644 --- a/library/prng/rand.c +++ b/library/prng/rand.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_rand.c,v 1.7 2022-09-01 12:04:26 clib2devs Exp $ + * $Id: stdlib_rand.c,v 1.7 2022-09-01 12:04:26 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H @@ -8,9 +8,9 @@ int rand(void) { - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; - __clib2->__random_seed = 6364136223846793005ULL * __clib2->__random_seed + 1; + __clib4->__random_seed = 6364136223846793005ULL * __clib4->__random_seed + 1; - return (__clib2->__random_seed >> 33); + return (__clib4->__random_seed >> 33); } diff --git a/library/prng/rand_r.c b/library/prng/rand_r.c index 6201b176..f0066e92 100644 --- a/library/prng/rand_r.c +++ b/library/prng/rand_r.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_rand_r.c,v 1.2 2006-01-08 12:04:26 clib2devs Exp $ + * $Id: stdlib_rand_r.c,v 1.2 2006-01-08 12:04:26 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H diff --git a/library/prng/random.c b/library/prng/random.c index 9f5c019a..d7687508 100644 --- a/library/prng/random.c +++ b/library/prng/random.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_random.c,v 1.0 2021-03-22 20:10:26 clib2devs Exp $ + * $Id: stdlib_random.c,v 1.0 2021-03-22 20:10:26 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H #include "../stdlib/stdlib_headers.h" @@ -17,44 +17,44 @@ lcg64(uint64_t x) { void * savestate() { - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; - __clib2->x[-1] = (__clib2->n << 16) | (__clib2->i << 8) | __clib2->j; - return __clib2->x - 1; + __clib4->x[-1] = (__clib4->n << 16) | (__clib4->i << 8) | __clib4->j; + return __clib4->x - 1; } void loadstate(uint32_t *state) { - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; - __clib2->x = state + 1; - __clib2->n = __clib2->x[-1] >> 16; - __clib2->i = (__clib2->x[-1] >> 8) & 0xff; - __clib2->j = __clib2->x[-1] & 0xff; + __clib4->x = state + 1; + __clib4->n = __clib4->x[-1] >> 16; + __clib4->i = (__clib4->x[-1] >> 8) & 0xff; + __clib4->j = __clib4->x[-1] & 0xff; } long random(void) { long k; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); - ObtainSemaphore(__clib2->__random_lock); + ObtainSemaphore(__clib4->__random_lock); - if (__clib2->n == 0) { - k = __clib2->x[0] = lcg31(__clib2->x[0]); + if (__clib4->n == 0) { + k = __clib4->x[0] = lcg31(__clib4->x[0]); goto end; } - __clib2->x[__clib2->i] += __clib2->x[__clib2->j]; - k = __clib2->x[__clib2->i]>>1; - if (++__clib2->i == __clib2->n) - __clib2->i = 0; - if (++__clib2->j == __clib2->n) - __clib2->j = 0; + __clib4->x[__clib4->i] += __clib4->x[__clib4->j]; + k = __clib4->x[__clib4->i]>>1; + if (++__clib4->i == __clib4->n) + __clib4->i = 0; + if (++__clib4->j == __clib4->n) + __clib4->j = 0; end: - ReleaseSemaphore(__clib2->__random_lock); + ReleaseSemaphore(__clib4->__random_lock); RETURN(k); return k; diff --git a/library/prng/seed48.c b/library/prng/seed48.c index d3edd86f..8f92d637 100644 --- a/library/prng/seed48.c +++ b/library/prng/seed48.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_seed48.c,v 1.0 2022-08-06 10:36:26 clib2devs Exp $ + * $Id: stdlib_seed48.c,v 1.0 2022-08-06 10:36:26 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H #include "../stdlib/stdlib_headers.h" diff --git a/library/prng/setstate.c b/library/prng/setstate.c index c959f681..e4c61221 100644 --- a/library/prng/setstate.c +++ b/library/prng/setstate.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_setstate.c,v 1.0 2022-02-23 12:23:12 clib2devs Exp $ + * $Id: stdlib_setstate.c,v 1.0 2022-02-23 12:23:12 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H #include "../stdlib/stdlib_headers.h" @@ -8,17 +8,17 @@ char * setstate(const char *state) { char *old; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); SHOWSTRING(state); - ObtainSemaphore(__clib2->__random_lock); + ObtainSemaphore(__clib4->__random_lock); old = savestate(); loadstate((uint32_t*)state); - ReleaseSemaphore(__clib2->__random_lock); + ReleaseSemaphore(__clib4->__random_lock); RETURN(old); return old; diff --git a/library/prng/srand.c b/library/prng/srand.c index f79d384d..3aa42086 100644 --- a/library/prng/srand.c +++ b/library/prng/srand.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_srand.c,v 1.4 2006-01-08 12:04:26 clib2devs Exp $ + * $Id: stdlib_srand.c,v 1.4 2006-01-08 12:04:26 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H @@ -10,9 +10,9 @@ void srand(unsigned seed) { ENTER(); SHOWVALUE(seed); - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; - __clib2->__random_seed = seed - 1; + __clib4->__random_seed = seed - 1; LEAVE(); } diff --git a/library/prng/srand48.c b/library/prng/srand48.c index f16487f2..143033e7 100644 --- a/library/prng/srand48.c +++ b/library/prng/srand48.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_srand48.c,v 1.0 2022-08-06 10:36:26 clib2devs Exp $ + * $Id: stdlib_srand48.c,v 1.0 2022-08-06 10:36:26 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H #include "../stdlib/stdlib_headers.h" diff --git a/library/prng/srandom.c b/library/prng/srandom.c index dc8fdb6d..a1f65c59 100644 --- a/library/prng/srandom.c +++ b/library/prng/srandom.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_srandom.c,v 1.0 2021-01-24 20:10:26 clib2devs Exp $ + * $Id: stdlib_srandom.c,v 1.0 2021-01-24 20:10:26 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H #include "../stdlib/stdlib_headers.h" @@ -9,34 +9,34 @@ void __srandom(unsigned seed) { int k; uint64_t s = seed; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); SHOWVALUE(seed); - if (__clib2->n == 0) { - __clib2->x[0] = s; + if (__clib4->n == 0) { + __clib4->x[0] = s; return; } - __clib2->i = __clib2->n == 31 || __clib2->n == 7 ? 3 : 1; - __clib2->j = 0; - for (k = 0; k < __clib2->n; k++) { + __clib4->i = __clib4->n == 31 || __clib4->n == 7 ? 3 : 1; + __clib4->j = 0; + for (k = 0; k < __clib4->n; k++) { s = lcg64(s); - __clib2->x[k] = s>>32; + __clib4->x[k] = s>>32; } /* make sure x contains at least one odd number */ - __clib2->x[0] |= 1; + __clib4->x[0] |= 1; LEAVE(); } void srandom(unsigned int seed) { - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; - ObtainSemaphore(__clib2->__random_lock); + ObtainSemaphore(__clib4->__random_lock); __srandom(seed); - ReleaseSemaphore(__clib2->__random_lock); + ReleaseSemaphore(__clib4->__random_lock); } \ No newline at end of file diff --git a/library/profile/_mcount.c b/library/profile/_mcount.c index 01dd3aad..5237bfec 100644 --- a/library/profile/_mcount.c +++ b/library/profile/_mcount.c @@ -1,5 +1,5 @@ /* - * $Id: profile__mcount.c,v 1.0 2022-08-06 10:36:26 clib2devs Exp $ + * $Id: profile__mcount.c,v 1.0 2022-08-06 10:36:26 clib4devs Exp $ */ #include "profile_gmon.h" diff --git a/library/profile/gmon.c b/library/profile/gmon.c index b5f115e7..9f3b8f8c 100644 --- a/library/profile/gmon.c +++ b/library/profile/gmon.c @@ -1,5 +1,5 @@ /* - * $Id: profile_gmon.c,v 1.0 2021-01-18 12:04:26 clib2devs Exp $ + * $Id: profile_gmon.c,v 1.0 2021-01-18 12:04:26 clib4devs Exp $ */ #include diff --git a/library/profile/mcount.S b/library/profile/mcount.S index e35f961d..1ca26e7c 100644 --- a/library/profile/mcount.S +++ b/library/profile/mcount.S @@ -1,5 +1,5 @@ // -// $Id: profile_mcount.S,v 1.0 2021-01-18 12:04:26 clib2devs Exp $ +// $Id: profile_mcount.S,v 1.0 2021-01-18 12:04:26 clib4devs Exp $ // .globl _mcount diff --git a/library/profile/profil.c b/library/profile/profil.c index 8a014fb0..149ae734 100644 --- a/library/profile/profil.c +++ b/library/profile/profil.c @@ -1,5 +1,5 @@ /* - * $Id: profile_profil.c,v 1.0 2021-01-21 10:08:32 clib2devs Exp $ + * $Id: profile_profil.c,v 1.0 2021-01-21 10:08:32 clib4devs Exp $ */ #include diff --git a/library/profile/profile.lib_rev.c b/library/profile/profile.lib_rev.c index acb127d5..3e8b5ef9 100644 --- a/library/profile/profile.lib_rev.c +++ b/library/profile/profile.lib_rev.c @@ -1,5 +1,5 @@ /* - * $Id: profile.lib_rev.c,v 1.0 2022-07-18 11:59:23 clib2devs Exp $ + * $Id: profile.lib_rev.c,v 1.0 2022-07-18 11:59:23 clib4devs Exp $ */ #include "profile.lib_rev.h" diff --git a/library/profile/profile_gmon.h b/library/profile/profile_gmon.h index 1d5a5280..471d1630 100755 --- a/library/profile/profile_gmon.h +++ b/library/profile/profile_gmon.h @@ -1,5 +1,5 @@ /* -* $Id: profile_gmon.h,v 1.0 2021-01-18 12:04:26 clib2devs Exp $ +* $Id: profile_gmon.h,v 1.0 2021-01-18 12:04:26 clib4devs Exp $ */ #ifndef _GMON_H diff --git a/library/pthread/README.md b/library/pthread/README.md index 7d7f6d6f..89687ccb 100644 --- a/library/pthread/README.md +++ b/library/pthread/README.md @@ -1,4 +1,4 @@ -# POSIX Threads for Clib2 based on AROS/MOS version (thanks to joakim ports) +# POSIX Threads for Clib4 based on AROS/MOS version (thanks to joakim ports) This library implements a subset of the POSIX Threads standard on top of the native Amiga APIs (SignalSemaphores, signals, processes, etc.). diff --git a/library/pthread/common.c b/library/pthread/common.c index c3dc36be..b1e334b5 100644 --- a/library/pthread/common.c +++ b/library/pthread/common.c @@ -1,5 +1,5 @@ /* - $Id: common.c,v 1.00 2022-07-18 12:09:49 clib2devs Exp $ + $Id: common.c,v 1.00 2022-07-18 12:09:49 clib4devs Exp $ Copyright (C) 2014 Szilard Biro Copyright (C) 2018 Harry Sintonen diff --git a/library/pthread/pthread.c b/library/pthread/pthread.c index 6da4a0b5..5003b312 100644 --- a/library/pthread/pthread.c +++ b/library/pthread/pthread.c @@ -1,5 +1,5 @@ /* - $Id: pthread.c,v 1.00 2022-07-18 12:09:49 clib2devs Exp $ + $Id: pthread.c,v 1.00 2022-07-18 12:09:49 clib4devs Exp $ Copyright (C) 2014 Szilard Biro Copyright (C) 2018 Harry Sintonen diff --git a/library/pthread/pthread.lib_rev.c b/library/pthread/pthread.lib_rev.c index d97dcf6c..648e8481 100644 --- a/library/pthread/pthread.lib_rev.c +++ b/library/pthread/pthread.lib_rev.c @@ -1,5 +1,5 @@ /* - * $Id: pthread.lib_rev.c,v 1.0 2022-07-18 11:59:23 clib2devs Exp $ + * $Id: pthread.lib_rev.c,v 1.0 2022-07-18 11:59:23 clib4devs Exp $ */ #include "pthread.lib_rev.h" diff --git a/library/pthread/pthread_attr_destroy.c b/library/pthread/pthread_attr_destroy.c index b8f1d652..c12bac7c 100644 --- a/library/pthread/pthread_attr_destroy.c +++ b/library/pthread/pthread_attr_destroy.c @@ -1,5 +1,5 @@ /* - $Id: pthread_attr_destroy.c,v 1.00 2022-07-18 12:09:49 clib2devs Exp $ + $Id: pthread_attr_destroy.c,v 1.00 2022-07-18 12:09:49 clib4devs Exp $ Copyright (C) 2014 Szilard Biro Copyright (C) 2018 Harry Sintonen diff --git a/library/pthread/pthread_attr_getdetachstate.c b/library/pthread/pthread_attr_getdetachstate.c index 22b10f9b..bc57ea72 100644 --- a/library/pthread/pthread_attr_getdetachstate.c +++ b/library/pthread/pthread_attr_getdetachstate.c @@ -1,5 +1,5 @@ /* - $Id: pthread_attr_getdetachstate.c,v 1.00 2022-07-18 12:09:49 clib2devs Exp $ + $Id: pthread_attr_getdetachstate.c,v 1.00 2022-07-18 12:09:49 clib4devs Exp $ Copyright (C) 2014 Szilard Biro Copyright (C) 2018 Harry Sintonen diff --git a/library/pthread/pthread_attr_getguardsize.c b/library/pthread/pthread_attr_getguardsize.c index ee1393a9..38d0fc1e 100644 --- a/library/pthread/pthread_attr_getguardsize.c +++ b/library/pthread/pthread_attr_getguardsize.c @@ -1,5 +1,5 @@ /* - $Id: pthread_attr_getguardsize.c,v 1.00 2023-03-03 12:09:49 clib2devs Exp $ + $Id: pthread_attr_getguardsize.c,v 1.00 2023-03-03 12:09:49 clib4devs Exp $ */ #include "pthread.h" diff --git a/library/pthread/pthread_attr_getinheritsched.c b/library/pthread/pthread_attr_getinheritsched.c index 88cfb22c..31278071 100644 --- a/library/pthread/pthread_attr_getinheritsched.c +++ b/library/pthread/pthread_attr_getinheritsched.c @@ -1,5 +1,5 @@ /* - $Id: pthread_attr_getinheritsched.c,v 1.00 2023-04-16 12:09:49 clib2devs Exp $ + $Id: pthread_attr_getinheritsched.c,v 1.00 2023-04-16 12:09:49 clib4devs Exp $ */ #ifndef _UNISTD_HEADERS_H diff --git a/library/pthread/pthread_attr_getschedparam.c b/library/pthread/pthread_attr_getschedparam.c index 8bca3ee5..3a0f4635 100644 --- a/library/pthread/pthread_attr_getschedparam.c +++ b/library/pthread/pthread_attr_getschedparam.c @@ -1,5 +1,5 @@ /* - $Id: pthread_attr_getschedparam.c,v 1.00 2022-07-18 12:09:49 clib2devs Exp $ + $Id: pthread_attr_getschedparam.c,v 1.00 2022-07-18 12:09:49 clib4devs Exp $ Copyright (C) 2014 Szilard Biro Copyright (C) 2018 Harry Sintonen diff --git a/library/pthread/pthread_attr_getschedpolicy.c b/library/pthread/pthread_attr_getschedpolicy.c index 0be42045..be951be1 100644 --- a/library/pthread/pthread_attr_getschedpolicy.c +++ b/library/pthread/pthread_attr_getschedpolicy.c @@ -1,5 +1,5 @@ /* - $Id: pthread_attr_getschedpolicy.c,v 1.00 2023-04-16 12:09:49 clib2devs Exp $ + $Id: pthread_attr_getschedpolicy.c,v 1.00 2023-04-16 12:09:49 clib4devs Exp $ */ #ifndef _UNISTD_HEADERS_H diff --git a/library/pthread/pthread_attr_getscope.c b/library/pthread/pthread_attr_getscope.c index 63f67a51..0d3ab0c7 100644 --- a/library/pthread/pthread_attr_getscope.c +++ b/library/pthread/pthread_attr_getscope.c @@ -1,5 +1,5 @@ /* - $Id: pthread_attr_getscope.c,v 1.00 2023-04-16 12:09:49 clib2devs Exp $ + $Id: pthread_attr_getscope.c,v 1.00 2023-04-16 12:09:49 clib4devs Exp $ */ #ifndef _UNISTD_HEADERS_H diff --git a/library/pthread/pthread_attr_getstack.c b/library/pthread/pthread_attr_getstack.c index 842a6aac..d03be774 100644 --- a/library/pthread/pthread_attr_getstack.c +++ b/library/pthread/pthread_attr_getstack.c @@ -1,5 +1,5 @@ /* - $Id: pthread_attr_getstack.c,v 1.00 2022-07-18 12:09:49 clib2devs Exp $ + $Id: pthread_attr_getstack.c,v 1.00 2022-07-18 12:09:49 clib4devs Exp $ Copyright (C) 2014 Szilard Biro Copyright (C) 2018 Harry Sintonen diff --git a/library/pthread/pthread_attr_getstacksize.c b/library/pthread/pthread_attr_getstacksize.c index ad301185..2630a7a5 100644 --- a/library/pthread/pthread_attr_getstacksize.c +++ b/library/pthread/pthread_attr_getstacksize.c @@ -1,5 +1,5 @@ /* - $Id: pthread_attr_getstacksize.c,v 1.00 2022-07-18 12:09:49 clib2devs Exp $ + $Id: pthread_attr_getstacksize.c,v 1.00 2022-07-18 12:09:49 clib4devs Exp $ Copyright (C) 2014 Szilard Biro Copyright (C) 2018 Harry Sintonen diff --git a/library/pthread/pthread_attr_init.c b/library/pthread/pthread_attr_init.c index d1a75ca8..940fad07 100644 --- a/library/pthread/pthread_attr_init.c +++ b/library/pthread/pthread_attr_init.c @@ -1,5 +1,5 @@ /* - $Id: pthread_attr_init.c,v 1.00 2022-07-18 12:09:49 clib2devs Exp $ + $Id: pthread_attr_init.c,v 1.00 2022-07-18 12:09:49 clib4devs Exp $ Copyright (C) 2014 Szilard Biro Copyright (C) 2018 Harry Sintonen diff --git a/library/pthread/pthread_attr_setdetachstate.c b/library/pthread/pthread_attr_setdetachstate.c index ae1097e1..81357b49 100644 --- a/library/pthread/pthread_attr_setdetachstate.c +++ b/library/pthread/pthread_attr_setdetachstate.c @@ -1,5 +1,5 @@ /* - $Id: pthread_attr_setdetachstate.c,v 1.00 2022-07-18 12:09:49 clib2devs Exp $ + $Id: pthread_attr_setdetachstate.c,v 1.00 2022-07-18 12:09:49 clib4devs Exp $ Copyright (C) 2014 Szilard Biro Copyright (C) 2018 Harry Sintonen diff --git a/library/pthread/pthread_attr_setguardsize.c b/library/pthread/pthread_attr_setguardsize.c index 52e5544c..cc2ba88c 100644 --- a/library/pthread/pthread_attr_setguardsize.c +++ b/library/pthread/pthread_attr_setguardsize.c @@ -1,5 +1,5 @@ /* - $Id: pthread_attr_setguardsize.c,v 1.00 2023-03-03 12:09:49 clib2devs Exp $ + $Id: pthread_attr_setguardsize.c,v 1.00 2023-03-03 12:09:49 clib4devs Exp $ */ #include "pthread.h" diff --git a/library/pthread/pthread_attr_setinheritsched.c b/library/pthread/pthread_attr_setinheritsched.c index ed8b77b4..6e1f5bd4 100644 --- a/library/pthread/pthread_attr_setinheritsched.c +++ b/library/pthread/pthread_attr_setinheritsched.c @@ -1,5 +1,5 @@ /* - $Id: pthread_attr_setinheritsched.c,v 1.00 2023-04-16 12:09:49 clib2devs Exp $ + $Id: pthread_attr_setinheritsched.c,v 1.00 2023-04-16 12:09:49 clib4devs Exp $ */ #ifndef _UNISTD_HEADERS_H diff --git a/library/pthread/pthread_attr_setschedparam.c b/library/pthread/pthread_attr_setschedparam.c index 80f33bbb..85af0782 100644 --- a/library/pthread/pthread_attr_setschedparam.c +++ b/library/pthread/pthread_attr_setschedparam.c @@ -1,5 +1,5 @@ /* - $Id: pthread_attr_setschedparam.c,v 1.00 2022-07-18 12:09:49 clib2devs Exp $ + $Id: pthread_attr_setschedparam.c,v 1.00 2022-07-18 12:09:49 clib4devs Exp $ Copyright (C) 2014 Szilard Biro Copyright (C) 2018 Harry Sintonen diff --git a/library/pthread/pthread_attr_setschedpolicy.c b/library/pthread/pthread_attr_setschedpolicy.c index 625fe7da..27833d7f 100644 --- a/library/pthread/pthread_attr_setschedpolicy.c +++ b/library/pthread/pthread_attr_setschedpolicy.c @@ -1,5 +1,5 @@ /* - $Id: pthread_attr_setschedpolicy.c,v 1.00 2023-04-16 12:09:49 clib2devs Exp $ + $Id: pthread_attr_setschedpolicy.c,v 1.00 2023-04-16 12:09:49 clib4devs Exp $ */ #ifndef _UNISTD_HEADERS_H diff --git a/library/pthread/pthread_attr_setscope.c b/library/pthread/pthread_attr_setscope.c index 1e503f74..f8c08e2c 100644 --- a/library/pthread/pthread_attr_setscope.c +++ b/library/pthread/pthread_attr_setscope.c @@ -1,5 +1,5 @@ /* - $Id: pthread_attr_setscope.c,v 1.00 2023-04-16 12:09:49 clib2devs Exp $ + $Id: pthread_attr_setscope.c,v 1.00 2023-04-16 12:09:49 clib4devs Exp $ */ #ifndef _UNISTD_HEADERS_H diff --git a/library/pthread/pthread_attr_setstack.c b/library/pthread/pthread_attr_setstack.c index c4794a72..ea905e81 100644 --- a/library/pthread/pthread_attr_setstack.c +++ b/library/pthread/pthread_attr_setstack.c @@ -1,5 +1,5 @@ /* - $Id: pthread_attr_setstack.c,v 1.00 2022-07-18 12:09:49 clib2devs Exp $ + $Id: pthread_attr_setstack.c,v 1.00 2022-07-18 12:09:49 clib4devs Exp $ Copyright (C) 2014 Szilard Biro Copyright (C) 2018 Harry Sintonen diff --git a/library/pthread/pthread_attr_setstacksize.c b/library/pthread/pthread_attr_setstacksize.c index 7413985e..4d6fd3c6 100644 --- a/library/pthread/pthread_attr_setstacksize.c +++ b/library/pthread/pthread_attr_setstacksize.c @@ -1,5 +1,5 @@ /* - $Id: pthread_attr_setstacksize.c,v 1.00 2022-07-18 12:09:49 clib2devs Exp $ + $Id: pthread_attr_setstacksize.c,v 1.00 2022-07-18 12:09:49 clib4devs Exp $ Copyright (C) 2014 Szilard Biro Copyright (C) 2018 Harry Sintonen diff --git a/library/pthread/pthread_barrier_destroy.c b/library/pthread/pthread_barrier_destroy.c index 35399666..0312f401 100644 --- a/library/pthread/pthread_barrier_destroy.c +++ b/library/pthread/pthread_barrier_destroy.c @@ -1,5 +1,5 @@ /* - $Id: pthread_barrier_destroy.c,v 1.00 2022-07-18 12:09:49 clib2devs Exp $ + $Id: pthread_barrier_destroy.c,v 1.00 2022-07-18 12:09:49 clib4devs Exp $ Copyright (C) 2014 Szilard Biro Copyright (C) 2018 Harry Sintonen diff --git a/library/pthread/pthread_barrier_init.c b/library/pthread/pthread_barrier_init.c index 3a15f0d5..235ff51b 100644 --- a/library/pthread/pthread_barrier_init.c +++ b/library/pthread/pthread_barrier_init.c @@ -1,5 +1,5 @@ /* - $Id: pthread_barrier_init.c,v 1.00 2022-07-18 12:09:49 clib2devs Exp $ + $Id: pthread_barrier_init.c,v 1.00 2022-07-18 12:09:49 clib4devs Exp $ Copyright (C) 2014 Szilard Biro Copyright (C) 2018 Harry Sintonen diff --git a/library/pthread/pthread_barrier_wait.c b/library/pthread/pthread_barrier_wait.c index 5595cf76..2f610df3 100644 --- a/library/pthread/pthread_barrier_wait.c +++ b/library/pthread/pthread_barrier_wait.c @@ -1,5 +1,5 @@ /* - $Id: pthread_barrier_wait.c,v 1.00 2022-07-18 12:09:49 clib2devs Exp $ + $Id: pthread_barrier_wait.c,v 1.00 2022-07-18 12:09:49 clib4devs Exp $ Copyright (C) 2014 Szilard Biro Copyright (C) 2018 Harry Sintonen diff --git a/library/pthread/pthread_barrierattr_destroy.c b/library/pthread/pthread_barrierattr_destroy.c index 272238e4..935cc919 100644 --- a/library/pthread/pthread_barrierattr_destroy.c +++ b/library/pthread/pthread_barrierattr_destroy.c @@ -1,5 +1,5 @@ /* - $Id: pthread_barrier_destroy.c,v 1.00 2023-04-16 12:09:49 clib2devs Exp $ + $Id: pthread_barrier_destroy.c,v 1.00 2023-04-16 12:09:49 clib4devs Exp $ */ #ifndef _UNISTD_HEADERS_H diff --git a/library/pthread/pthread_barrierattr_getpshared.c b/library/pthread/pthread_barrierattr_getpshared.c index c93b3ca8..3ce40eda 100644 --- a/library/pthread/pthread_barrierattr_getpshared.c +++ b/library/pthread/pthread_barrierattr_getpshared.c @@ -1,5 +1,5 @@ /* - $Id: pthread_barrierattr_getpshared.c,v 1.00 2023-04-16 12:09:49 clib2devs Exp $ + $Id: pthread_barrierattr_getpshared.c,v 1.00 2023-04-16 12:09:49 clib4devs Exp $ */ #ifndef _UNISTD_HEADERS_H diff --git a/library/pthread/pthread_barrierattr_init.c b/library/pthread/pthread_barrierattr_init.c index 8b7293a3..f18fce65 100644 --- a/library/pthread/pthread_barrierattr_init.c +++ b/library/pthread/pthread_barrierattr_init.c @@ -1,5 +1,5 @@ /* - $Id: pthread_barrier_init.c,v 1.00 2023-04-16 12:09:49 clib2devs Exp $ + $Id: pthread_barrier_init.c,v 1.00 2023-04-16 12:09:49 clib4devs Exp $ */ #ifndef _UNISTD_HEADERS_H diff --git a/library/pthread/pthread_barrierattr_setpshared.c b/library/pthread/pthread_barrierattr_setpshared.c index c9ecfae1..fb0df763 100644 --- a/library/pthread/pthread_barrierattr_setpshared.c +++ b/library/pthread/pthread_barrierattr_setpshared.c @@ -1,5 +1,5 @@ /* - $Id: pthread_barrierattr_setpshared.c,v 1.00 2023-04-16 12:09:49 clib2devs Exp $ + $Id: pthread_barrierattr_setpshared.c,v 1.00 2023-04-16 12:09:49 clib4devs Exp $ */ #ifndef _UNISTD_HEADERS_H diff --git a/library/pthread/pthread_cancel.c b/library/pthread/pthread_cancel.c index 68e52a0c..213ae410 100644 --- a/library/pthread/pthread_cancel.c +++ b/library/pthread/pthread_cancel.c @@ -1,5 +1,5 @@ /* - $Id: pthread_cancel.c,v 1.00 2022-07-18 12:09:49 clib2devs Exp $ + $Id: pthread_cancel.c,v 1.00 2022-07-18 12:09:49 clib4devs Exp $ Copyright (C) 2014 Szilard Biro Copyright (C) 2018 Harry Sintonen diff --git a/library/pthread/pthread_cleanup_pop.c b/library/pthread/pthread_cleanup_pop.c index 8502215a..82f7e7ea 100644 --- a/library/pthread/pthread_cleanup_pop.c +++ b/library/pthread/pthread_cleanup_pop.c @@ -1,5 +1,5 @@ /* - $Id: pthread_cleanup_pop.c,v 1.00 2022-07-18 12:09:49 clib2devs Exp $ + $Id: pthread_cleanup_pop.c,v 1.00 2022-07-18 12:09:49 clib4devs Exp $ Copyright (C) 2014 Szilard Biro Copyright (C) 2018 Harry Sintonen diff --git a/library/pthread/pthread_cleanup_push.c b/library/pthread/pthread_cleanup_push.c index f76726cf..5fcbe1f8 100644 --- a/library/pthread/pthread_cleanup_push.c +++ b/library/pthread/pthread_cleanup_push.c @@ -1,5 +1,5 @@ /* - $Id: pthread_cleanup_push.c,v 1.00 2022-07-18 12:09:49 clib2devs Exp $ + $Id: pthread_cleanup_push.c,v 1.00 2022-07-18 12:09:49 clib4devs Exp $ Copyright (C) 2014 Szilard Biro Copyright (C) 2018 Harry Sintonen diff --git a/library/pthread/pthread_cond_broadcast.c b/library/pthread/pthread_cond_broadcast.c index f2505372..c077b20b 100644 --- a/library/pthread/pthread_cond_broadcast.c +++ b/library/pthread/pthread_cond_broadcast.c @@ -1,5 +1,5 @@ /* - $Id: pthread_cond_broadcast.c,v 1.00 2022-07-18 12:09:49 clib2devs Exp $ + $Id: pthread_cond_broadcast.c,v 1.00 2022-07-18 12:09:49 clib4devs Exp $ Copyright (C) 2014 Szilard Biro Copyright (C) 2018 Harry Sintonen diff --git a/library/pthread/pthread_cond_destroy.c b/library/pthread/pthread_cond_destroy.c index 4476d9e1..a4a90745 100644 --- a/library/pthread/pthread_cond_destroy.c +++ b/library/pthread/pthread_cond_destroy.c @@ -1,5 +1,5 @@ /* - $Id: pthread_cond_destroy.c,v 1.00 2022-07-18 12:09:49 clib2devs Exp $ + $Id: pthread_cond_destroy.c,v 1.00 2022-07-18 12:09:49 clib4devs Exp $ Copyright (C) 2014 Szilard Biro Copyright (C) 2018 Harry Sintonen diff --git a/library/pthread/pthread_cond_init.c b/library/pthread/pthread_cond_init.c index c8ddb4a4..b57e0cd2 100644 --- a/library/pthread/pthread_cond_init.c +++ b/library/pthread/pthread_cond_init.c @@ -1,5 +1,5 @@ /* - $Id: pthread_cond_init.c,v 1.00 2022-07-18 12:09:49 clib2devs Exp $ + $Id: pthread_cond_init.c,v 1.00 2022-07-18 12:09:49 clib4devs Exp $ Copyright (C) 2014 Szilard Biro Copyright (C) 2018 Harry Sintonen diff --git a/library/pthread/pthread_cond_signal.c b/library/pthread/pthread_cond_signal.c index 0fc2faf3..a36bb83f 100644 --- a/library/pthread/pthread_cond_signal.c +++ b/library/pthread/pthread_cond_signal.c @@ -1,5 +1,5 @@ /* - $Id: pthread_cond_signal.c,v 1.00 2022-07-18 12:09:49 clib2devs Exp $ + $Id: pthread_cond_signal.c,v 1.00 2022-07-18 12:09:49 clib4devs Exp $ Copyright (C) 2014 Szilard Biro Copyright (C) 2018 Harry Sintonen diff --git a/library/pthread/pthread_cond_timedwait.c b/library/pthread/pthread_cond_timedwait.c index fc6192b2..89147665 100644 --- a/library/pthread/pthread_cond_timedwait.c +++ b/library/pthread/pthread_cond_timedwait.c @@ -1,5 +1,5 @@ /* - $Id: pthread_cond_timedwait.c,v 1.00 2022-07-18 12:09:49 clib2devs Exp $ + $Id: pthread_cond_timedwait.c,v 1.00 2022-07-18 12:09:49 clib4devs Exp $ Copyright (C) 2014 Szilard Biro Copyright (C) 2018 Harry Sintonen diff --git a/library/pthread/pthread_cond_timedwait_relative_np.c b/library/pthread/pthread_cond_timedwait_relative_np.c index 86c9b38f..3fa1378b 100644 --- a/library/pthread/pthread_cond_timedwait_relative_np.c +++ b/library/pthread/pthread_cond_timedwait_relative_np.c @@ -1,5 +1,5 @@ /* - $Id: pthread_cond_timedwait_relative_np.c,v 1.00 2022-07-18 12:09:49 clib2devs Exp $ + $Id: pthread_cond_timedwait_relative_np.c,v 1.00 2022-07-18 12:09:49 clib4devs Exp $ Copyright (C) 2014 Szilard Biro Copyright (C) 2018 Harry Sintonen diff --git a/library/pthread/pthread_cond_wait.c b/library/pthread/pthread_cond_wait.c index 56ba6a2e..7915dc70 100644 --- a/library/pthread/pthread_cond_wait.c +++ b/library/pthread/pthread_cond_wait.c @@ -1,5 +1,5 @@ /* - $Id: pthread_cond_wait.c,v 1.00 2022-07-18 12:09:49 clib2devs Exp $ + $Id: pthread_cond_wait.c,v 1.00 2022-07-18 12:09:49 clib4devs Exp $ Copyright (C) 2014 Szilard Biro Copyright (C) 2018 Harry Sintonen diff --git a/library/pthread/pthread_condattr_destroy.c b/library/pthread/pthread_condattr_destroy.c index 2de110d3..68a6caac 100644 --- a/library/pthread/pthread_condattr_destroy.c +++ b/library/pthread/pthread_condattr_destroy.c @@ -1,5 +1,5 @@ /* - $Id: pthread_condattr_destroy.c,v 1.00 2022-07-18 12:09:49 clib2devs Exp $ + $Id: pthread_condattr_destroy.c,v 1.00 2022-07-18 12:09:49 clib4devs Exp $ Copyright (C) 2014 Szilard Biro Copyright (C) 2018 Harry Sintonen diff --git a/library/pthread/pthread_condattr_getpshared.c b/library/pthread/pthread_condattr_getpshared.c index 5706e79c..ddaf09bd 100644 --- a/library/pthread/pthread_condattr_getpshared.c +++ b/library/pthread/pthread_condattr_getpshared.c @@ -1,5 +1,5 @@ /* - $Id: pthread_condattr_getpshared.c,v 1.00 2023-04-16 12:09:49 clib2devs Exp $ + $Id: pthread_condattr_getpshared.c,v 1.00 2023-04-16 12:09:49 clib4devs Exp $ */ #ifndef _UNISTD_HEADERS_H diff --git a/library/pthread/pthread_condattr_init.c b/library/pthread/pthread_condattr_init.c index ca723243..468c7e1f 100644 --- a/library/pthread/pthread_condattr_init.c +++ b/library/pthread/pthread_condattr_init.c @@ -1,5 +1,5 @@ /* - $Id: pthread_condattr_init.c,v 1.00 2022-07-18 12:09:49 clib2devs Exp $ + $Id: pthread_condattr_init.c,v 1.00 2022-07-18 12:09:49 clib4devs Exp $ Copyright (C) 2014 Szilard Biro Copyright (C) 2018 Harry Sintonen diff --git a/library/pthread/pthread_condattr_setpshared.c b/library/pthread/pthread_condattr_setpshared.c index bcd01834..abc8e5ec 100644 --- a/library/pthread/pthread_condattr_setpshared.c +++ b/library/pthread/pthread_condattr_setpshared.c @@ -1,5 +1,5 @@ /* - $Id: pthread_condattr_setpshared.c,v 1.00 2023-04-16 12:09:49 clib2devs Exp $ + $Id: pthread_condattr_setpshared.c,v 1.00 2023-04-16 12:09:49 clib4devs Exp $ */ #ifndef _UNISTD_HEADERS_H diff --git a/library/pthread/pthread_create.c b/library/pthread/pthread_create.c index cf953add..76beee26 100644 --- a/library/pthread/pthread_create.c +++ b/library/pthread/pthread_create.c @@ -1,5 +1,5 @@ /* - $Id: pthread_create.c,v 1.00 2022-07-18 12:09:49 clib2devs Exp $ + $Id: pthread_create.c,v 1.00 2022-07-18 12:09:49 clib4devs Exp $ Copyright (C) 2014 Szilard Biro Copyright (C) 2018 Harry Sintonen @@ -45,7 +45,7 @@ StarterFunc() { struct Process *startedTask = (struct Process *) FindTask(NULL); ThreadInfo *inf = (ThreadInfo *) startedTask->pr_Task.tc_UserData; - struct _clib2 *__clib2 = (struct _clib2 *) GetEntryData(); + struct _clib4 *__clib4 = (struct _clib4 *) GetEntryData(); // custom stack requires special handling if (inf->attr.stackaddr != NULL && inf->attr.stacksize > 0) { diff --git a/library/pthread/pthread_detach.c b/library/pthread/pthread_detach.c index a670e3b8..f7c2f0b1 100644 --- a/library/pthread/pthread_detach.c +++ b/library/pthread/pthread_detach.c @@ -1,5 +1,5 @@ /* - $Id: pthread_detach.c,v 1.00 2022-07-18 12:09:49 clib2devs Exp $ + $Id: pthread_detach.c,v 1.00 2022-07-18 12:09:49 clib4devs Exp $ Copyright (C) 2014 Szilard Biro Copyright (C) 2018 Harry Sintonen diff --git a/library/pthread/pthread_equal.c b/library/pthread/pthread_equal.c index 8fba1d21..a4e8672a 100644 --- a/library/pthread/pthread_equal.c +++ b/library/pthread/pthread_equal.c @@ -1,5 +1,5 @@ /* - $Id: pthread_equal.c,v 1.00 2022-07-18 12:09:49 clib2devs Exp $ + $Id: pthread_equal.c,v 1.00 2022-07-18 12:09:49 clib4devs Exp $ Copyright (C) 2014 Szilard Biro Copyright (C) 2018 Harry Sintonen diff --git a/library/pthread/pthread_exit.c b/library/pthread/pthread_exit.c index 59dd9ba6..95fe19f4 100644 --- a/library/pthread/pthread_exit.c +++ b/library/pthread/pthread_exit.c @@ -1,5 +1,5 @@ /* - $Id: pthread_exit.c,v 1.00 2022-07-18 12:09:49 clib2devs Exp $ + $Id: pthread_exit.c,v 1.00 2022-07-18 12:09:49 clib4devs Exp $ Copyright (C) 2014 Szilard Biro Copyright (C) 2018 Harry Sintonen diff --git a/library/pthread/pthread_getattr_np.c b/library/pthread/pthread_getattr_np.c index bb1f9d4c..7a1c467b 100644 --- a/library/pthread/pthread_getattr_np.c +++ b/library/pthread/pthread_getattr_np.c @@ -1,5 +1,5 @@ /* - $Id: pthread_getattr_np.c,v 1.00 2022-07-18 12:09:49 clib2devs Exp $ + $Id: pthread_getattr_np.c,v 1.00 2022-07-18 12:09:49 clib4devs Exp $ Copyright (C) 2014 Szilard Biro Copyright (C) 2018 Harry Sintonen diff --git a/library/pthread/pthread_getconcurrency.c b/library/pthread/pthread_getconcurrency.c index 6ae77452..55898533 100644 --- a/library/pthread/pthread_getconcurrency.c +++ b/library/pthread/pthread_getconcurrency.c @@ -1,5 +1,5 @@ /* - $Id: pthread_getconcurrency.c,v 1.00 2023-04-16 12:09:49 clib2devs Exp $ + $Id: pthread_getconcurrency.c,v 1.00 2023-04-16 12:09:49 clib4devs Exp $ */ #ifndef _UNISTD_HEADERS_H diff --git a/library/pthread/pthread_getname_np.c b/library/pthread/pthread_getname_np.c index ca085fbb..f4f8f7d1 100644 --- a/library/pthread/pthread_getname_np.c +++ b/library/pthread/pthread_getname_np.c @@ -1,5 +1,5 @@ /* - $Id: pthread_getname_np.c,v 1.00 2022-07-18 12:09:49 clib2devs Exp $ + $Id: pthread_getname_np.c,v 1.00 2022-07-18 12:09:49 clib4devs Exp $ Copyright (C) 2014 Szilard Biro Copyright (C) 2018 Harry Sintonen diff --git a/library/pthread/pthread_getschedparam.c b/library/pthread/pthread_getschedparam.c index 09c835dc..852e38df 100644 --- a/library/pthread/pthread_getschedparam.c +++ b/library/pthread/pthread_getschedparam.c @@ -1,5 +1,5 @@ /* - $Id: pthread_getschedparam.c,v 1.00 2022-07-18 12:09:49 clib2devs Exp $ + $Id: pthread_getschedparam.c,v 1.00 2022-07-18 12:09:49 clib4devs Exp $ Copyright (C) 2014 Szilard Biro Copyright (C) 2018 Harry Sintonen diff --git a/library/pthread/pthread_getspecific.c b/library/pthread/pthread_getspecific.c index 8878c7b0..455f1894 100644 --- a/library/pthread/pthread_getspecific.c +++ b/library/pthread/pthread_getspecific.c @@ -1,5 +1,5 @@ /* - $Id: pthread_getspecific.c,v 1.00 2022-07-18 12:09:49 clib2devs Exp $ + $Id: pthread_getspecific.c,v 1.00 2022-07-18 12:09:49 clib4devs Exp $ Copyright (C) 2014 Szilard Biro Copyright (C) 2018 Harry Sintonen diff --git a/library/pthread/pthread_join.c b/library/pthread/pthread_join.c index c00dc120..edd6663a 100644 --- a/library/pthread/pthread_join.c +++ b/library/pthread/pthread_join.c @@ -1,5 +1,5 @@ /* - $Id: pthread_join.c,v 1.00 2022-07-18 12:09:49 clib2devs Exp $ + $Id: pthread_join.c,v 1.00 2022-07-18 12:09:49 clib4devs Exp $ Copyright (C) 2014 Szilard Biro Copyright (C) 2018 Harry Sintonen diff --git a/library/pthread/pthread_key_create.c b/library/pthread/pthread_key_create.c index 361cd6d2..2fa7995d 100644 --- a/library/pthread/pthread_key_create.c +++ b/library/pthread/pthread_key_create.c @@ -1,5 +1,5 @@ /* - $Id: pthread_key_create.c,v 1.00 2022-07-18 12:09:49 clib2devs Exp $ + $Id: pthread_key_create.c,v 1.00 2022-07-18 12:09:49 clib4devs Exp $ Copyright (C) 2014 Szilard Biro Copyright (C) 2018 Harry Sintonen diff --git a/library/pthread/pthread_key_delete.c b/library/pthread/pthread_key_delete.c index f262371f..184f58fd 100644 --- a/library/pthread/pthread_key_delete.c +++ b/library/pthread/pthread_key_delete.c @@ -1,5 +1,5 @@ /* - $Id: pthread_key_delete.c,v 1.00 2022-07-18 12:09:49 clib2devs Exp $ + $Id: pthread_key_delete.c,v 1.00 2022-07-18 12:09:49 clib4devs Exp $ Copyright (C) 2014 Szilard Biro Copyright (C) 2018 Harry Sintonen diff --git a/library/pthread/pthread_kill.c b/library/pthread/pthread_kill.c index 154612a2..c1f521b9 100644 --- a/library/pthread/pthread_kill.c +++ b/library/pthread/pthread_kill.c @@ -1,5 +1,5 @@ /* - $Id: pthread_kill.c,v 1.00 2022-07-18 12:09:49 clib2devs Exp $ + $Id: pthread_kill.c,v 1.00 2022-07-18 12:09:49 clib4devs Exp $ Copyright (C) 2014 Szilard Biro Copyright (C) 2018 Harry Sintonen diff --git a/library/pthread/pthread_mutex_destroy.c b/library/pthread/pthread_mutex_destroy.c index 964f606f..36d132e1 100644 --- a/library/pthread/pthread_mutex_destroy.c +++ b/library/pthread/pthread_mutex_destroy.c @@ -1,5 +1,5 @@ /* - $Id: pthread_mutex_destroy.c,v 1.00 2022-07-18 12:09:49 clib2devs Exp $ + $Id: pthread_mutex_destroy.c,v 1.00 2022-07-18 12:09:49 clib4devs Exp $ Copyright (C) 2014 Szilard Biro Copyright (C) 2018 Harry Sintonen diff --git a/library/pthread/pthread_mutex_init.c b/library/pthread/pthread_mutex_init.c index bd1ba18e..f07ead5d 100644 --- a/library/pthread/pthread_mutex_init.c +++ b/library/pthread/pthread_mutex_init.c @@ -1,5 +1,5 @@ /* - $Id: pthread_mutex_init.c,v 1.00 2022-07-18 12:09:49 clib2devs Exp $ + $Id: pthread_mutex_init.c,v 1.00 2022-07-18 12:09:49 clib4devs Exp $ Copyright (C) 2014 Szilard Biro Copyright (C) 2018 Harry Sintonen diff --git a/library/pthread/pthread_mutex_lock.c b/library/pthread/pthread_mutex_lock.c index 614a7195..fdee19a2 100644 --- a/library/pthread/pthread_mutex_lock.c +++ b/library/pthread/pthread_mutex_lock.c @@ -1,5 +1,5 @@ /* - $Id: pthread_mutex_lock.c,v 1.00 2022-07-18 12:09:49 clib2devs Exp $ + $Id: pthread_mutex_lock.c,v 1.00 2022-07-18 12:09:49 clib4devs Exp $ Copyright (C) 2014 Szilard Biro Copyright (C) 2018 Harry Sintonen diff --git a/library/pthread/pthread_mutex_timedlock.c b/library/pthread/pthread_mutex_timedlock.c index 5850a8e7..6c798bcf 100644 --- a/library/pthread/pthread_mutex_timedlock.c +++ b/library/pthread/pthread_mutex_timedlock.c @@ -1,5 +1,5 @@ /* - $Id: pthread_mutex_timedlock.c,v 1.00 2022-07-18 12:09:49 clib2devs Exp $ + $Id: pthread_mutex_timedlock.c,v 1.00 2022-07-18 12:09:49 clib4devs Exp $ Copyright (C) 2014 Szilard Biro Copyright (C) 2018 Harry Sintonen diff --git a/library/pthread/pthread_mutex_trylock.c b/library/pthread/pthread_mutex_trylock.c index 1c019210..c8b16425 100644 --- a/library/pthread/pthread_mutex_trylock.c +++ b/library/pthread/pthread_mutex_trylock.c @@ -1,5 +1,5 @@ /* - $Id: pthread_mutex_trylock.c,v 1.00 2022-07-18 12:09:49 clib2devs Exp $ + $Id: pthread_mutex_trylock.c,v 1.00 2022-07-18 12:09:49 clib4devs Exp $ Copyright (C) 2014 Szilard Biro Copyright (C) 2018 Harry Sintonen diff --git a/library/pthread/pthread_mutex_unlock.c b/library/pthread/pthread_mutex_unlock.c index 401fd9e5..e676831e 100644 --- a/library/pthread/pthread_mutex_unlock.c +++ b/library/pthread/pthread_mutex_unlock.c @@ -1,5 +1,5 @@ /* - $Id: pthread_mutex_unlock.c,v 1.00 2022-07-18 12:09:49 clib2devs Exp $ + $Id: pthread_mutex_unlock.c,v 1.00 2022-07-18 12:09:49 clib4devs Exp $ Copyright (C) 2014 Szilard Biro Copyright (C) 2018 Harry Sintonen diff --git a/library/pthread/pthread_mutexattr_destroy.c b/library/pthread/pthread_mutexattr_destroy.c index 96ddc10b..fced1243 100644 --- a/library/pthread/pthread_mutexattr_destroy.c +++ b/library/pthread/pthread_mutexattr_destroy.c @@ -1,5 +1,5 @@ /* - $Id: pthread_mutexattr_destroy.c,v 1.00 2022-07-18 12:09:49 clib2devs Exp $ + $Id: pthread_mutexattr_destroy.c,v 1.00 2022-07-18 12:09:49 clib4devs Exp $ Copyright (C) 2014 Szilard Biro Copyright (C) 2018 Harry Sintonen diff --git a/library/pthread/pthread_mutexattr_getpshared.c b/library/pthread/pthread_mutexattr_getpshared.c index 67abeca2..33b294e2 100644 --- a/library/pthread/pthread_mutexattr_getpshared.c +++ b/library/pthread/pthread_mutexattr_getpshared.c @@ -1,5 +1,5 @@ /* - $Id: pthread_mutexattr_getpshared.c,v 1.00 2023-04-16 12:09:49 clib2devs Exp $ + $Id: pthread_mutexattr_getpshared.c,v 1.00 2023-04-16 12:09:49 clib4devs Exp $ */ #ifndef _UNISTD_HEADERS_H diff --git a/library/pthread/pthread_mutexattr_gettype.c b/library/pthread/pthread_mutexattr_gettype.c index 3c96e036..55e020f6 100644 --- a/library/pthread/pthread_mutexattr_gettype.c +++ b/library/pthread/pthread_mutexattr_gettype.c @@ -1,5 +1,5 @@ /* - $Id: pthread_mutexattr_gettype.c,v 1.00 2022-07-18 12:09:49 clib2devs Exp $ + $Id: pthread_mutexattr_gettype.c,v 1.00 2022-07-18 12:09:49 clib4devs Exp $ Copyright (C) 2014 Szilard Biro Copyright (C) 2018 Harry Sintonen diff --git a/library/pthread/pthread_mutexattr_init.c b/library/pthread/pthread_mutexattr_init.c index 262f4cb1..5653c320 100644 --- a/library/pthread/pthread_mutexattr_init.c +++ b/library/pthread/pthread_mutexattr_init.c @@ -1,5 +1,5 @@ /* - $Id: pthread_mutexattr_init.c,v 1.00 2022-07-18 12:09:49 clib2devs Exp $ + $Id: pthread_mutexattr_init.c,v 1.00 2022-07-18 12:09:49 clib4devs Exp $ Copyright (C) 2014 Szilard Biro Copyright (C) 2018 Harry Sintonen diff --git a/library/pthread/pthread_mutexattr_setpshared.c b/library/pthread/pthread_mutexattr_setpshared.c index c1a4b2cf..6f7e306b 100644 --- a/library/pthread/pthread_mutexattr_setpshared.c +++ b/library/pthread/pthread_mutexattr_setpshared.c @@ -1,5 +1,5 @@ /* - $Id: pthread_mutexattr_setpshared.c,v 1.00 2023-04-16 12:09:49 clib2devs Exp $ + $Id: pthread_mutexattr_setpshared.c,v 1.00 2023-04-16 12:09:49 clib4devs Exp $ */ #ifndef _UNISTD_HEADERS_H diff --git a/library/pthread/pthread_mutexattr_settype.c b/library/pthread/pthread_mutexattr_settype.c index af2a9c41..e96e4675 100644 --- a/library/pthread/pthread_mutexattr_settype.c +++ b/library/pthread/pthread_mutexattr_settype.c @@ -1,5 +1,5 @@ /* - $Id: pthread_mutexattr_settype.c,v 1.00 2022-07-18 12:09:49 clib2devs Exp $ + $Id: pthread_mutexattr_settype.c,v 1.00 2022-07-18 12:09:49 clib4devs Exp $ Copyright (C) 2014 Szilard Biro Copyright (C) 2018 Harry Sintonen diff --git a/library/pthread/pthread_num_processors_np.c b/library/pthread/pthread_num_processors_np.c index 92cf35eb..175976ce 100644 --- a/library/pthread/pthread_num_processors_np.c +++ b/library/pthread/pthread_num_processors_np.c @@ -1,5 +1,5 @@ /* - $Id: pthread_num_processor_np.c,v 1.00 2023-05-01 12:09:49 clib2devs Exp $ + $Id: pthread_num_processor_np.c,v 1.00 2023-05-01 12:09:49 clib4devs Exp $ */ diff --git a/library/pthread/pthread_once.c b/library/pthread/pthread_once.c index e8e132bf..6ed974b6 100644 --- a/library/pthread/pthread_once.c +++ b/library/pthread/pthread_once.c @@ -1,5 +1,5 @@ /* - $Id: pthread_once.c,v 1.00 2022-07-18 12:09:49 clib2devs Exp $ + $Id: pthread_once.c,v 1.00 2022-07-18 12:09:49 clib4devs Exp $ Copyright (C) 2014 Szilard Biro Copyright (C) 2018 Harry Sintonen diff --git a/library/pthread/pthread_rwlock_destroy.c b/library/pthread/pthread_rwlock_destroy.c index 3010deed..dfe76ffc 100644 --- a/library/pthread/pthread_rwlock_destroy.c +++ b/library/pthread/pthread_rwlock_destroy.c @@ -1,5 +1,5 @@ /* - $Id: pthread_rwlock_destroy.c,v 1.00 2022-07-18 12:09:49 clib2devs Exp $ + $Id: pthread_rwlock_destroy.c,v 1.00 2022-07-18 12:09:49 clib4devs Exp $ Copyright (C) 2014 Szilard Biro Copyright (C) 2018 Harry Sintonen diff --git a/library/pthread/pthread_rwlock_init.c b/library/pthread/pthread_rwlock_init.c index d2742e9b..7598bf11 100644 --- a/library/pthread/pthread_rwlock_init.c +++ b/library/pthread/pthread_rwlock_init.c @@ -1,5 +1,5 @@ /* - $Id: pthread_rwlock_init.c,v 1.00 2022-07-18 12:09:49 clib2devs Exp $ + $Id: pthread_rwlock_init.c,v 1.00 2022-07-18 12:09:49 clib4devs Exp $ Copyright (C) 2014 Szilard Biro Copyright (C) 2018 Harry Sintonen diff --git a/library/pthread/pthread_rwlock_rdlock.c b/library/pthread/pthread_rwlock_rdlock.c index c4ed66ff..5cfa0f05 100644 --- a/library/pthread/pthread_rwlock_rdlock.c +++ b/library/pthread/pthread_rwlock_rdlock.c @@ -1,5 +1,5 @@ /* - $Id: pthread_rwlock_rdlock.c,v 1.00 2022-07-18 12:09:49 clib2devs Exp $ + $Id: pthread_rwlock_rdlock.c,v 1.00 2022-07-18 12:09:49 clib4devs Exp $ Copyright (C) 2014 Szilard Biro Copyright (C) 2018 Harry Sintonen diff --git a/library/pthread/pthread_rwlock_timedrdlock.c b/library/pthread/pthread_rwlock_timedrdlock.c index 4fd5eb1b..8e0f31e3 100644 --- a/library/pthread/pthread_rwlock_timedrdlock.c +++ b/library/pthread/pthread_rwlock_timedrdlock.c @@ -1,5 +1,5 @@ /* - $Id: pthread_rwlock_timedrdlock.c,v 1.00 2022-07-18 12:09:49 clib2devs Exp $ + $Id: pthread_rwlock_timedrdlock.c,v 1.00 2022-07-18 12:09:49 clib4devs Exp $ Copyright (C) 2014 Szilard Biro Copyright (C) 2018 Harry Sintonen diff --git a/library/pthread/pthread_rwlock_timedwrlock.c b/library/pthread/pthread_rwlock_timedwrlock.c index 06e31c78..72737536 100644 --- a/library/pthread/pthread_rwlock_timedwrlock.c +++ b/library/pthread/pthread_rwlock_timedwrlock.c @@ -1,5 +1,5 @@ /* - $Id: pthread_rwlock_timedwrlock.c,v 1.00 2022-07-18 12:09:49 clib2devs Exp $ + $Id: pthread_rwlock_timedwrlock.c,v 1.00 2022-07-18 12:09:49 clib4devs Exp $ Copyright (C) 2014 Szilard Biro Copyright (C) 2018 Harry Sintonen diff --git a/library/pthread/pthread_rwlock_tryrdlock.c b/library/pthread/pthread_rwlock_tryrdlock.c index 6ff9471b..b4b79039 100644 --- a/library/pthread/pthread_rwlock_tryrdlock.c +++ b/library/pthread/pthread_rwlock_tryrdlock.c @@ -1,5 +1,5 @@ /* - $Id: pthread_rwlock_tryrdlock.c,v 1.00 2022-07-18 12:09:49 clib2devs Exp $ + $Id: pthread_rwlock_tryrdlock.c,v 1.00 2022-07-18 12:09:49 clib4devs Exp $ Copyright (C) 2014 Szilard Biro Copyright (C) 2018 Harry Sintonen diff --git a/library/pthread/pthread_rwlock_trywrlock.c b/library/pthread/pthread_rwlock_trywrlock.c index 3dd27085..c5a2fb34 100644 --- a/library/pthread/pthread_rwlock_trywrlock.c +++ b/library/pthread/pthread_rwlock_trywrlock.c @@ -1,5 +1,5 @@ /* - $Id: pthread_rwlock_trywrlock.c,v 1.00 2022-07-18 12:09:49 clib2devs Exp $ + $Id: pthread_rwlock_trywrlock.c,v 1.00 2022-07-18 12:09:49 clib4devs Exp $ Copyright (C) 2014 Szilard Biro Copyright (C) 2018 Harry Sintonen diff --git a/library/pthread/pthread_rwlock_unlock.c b/library/pthread/pthread_rwlock_unlock.c index 598480e3..903f1fdf 100644 --- a/library/pthread/pthread_rwlock_unlock.c +++ b/library/pthread/pthread_rwlock_unlock.c @@ -1,5 +1,5 @@ /* - $Id: pthread_rwlock_unlock.c,v 1.00 2022-07-18 12:09:49 clib2devs Exp $ + $Id: pthread_rwlock_unlock.c,v 1.00 2022-07-18 12:09:49 clib4devs Exp $ Copyright (C) 2014 Szilard Biro Copyright (C) 2018 Harry Sintonen diff --git a/library/pthread/pthread_rwlock_wrlock.c b/library/pthread/pthread_rwlock_wrlock.c index a2f4b056..dd527e7e 100644 --- a/library/pthread/pthread_rwlock_wrlock.c +++ b/library/pthread/pthread_rwlock_wrlock.c @@ -1,5 +1,5 @@ /* - $Id: pthread_rwlock_wrlock.c,v 1.00 2022-07-18 12:09:49 clib2devs Exp $ + $Id: pthread_rwlock_wrlock.c,v 1.00 2022-07-18 12:09:49 clib4devs Exp $ Copyright (C) 2014 Szilard Biro Copyright (C) 2018 Harry Sintonen diff --git a/library/pthread/pthread_rwlockattr_destroy.c b/library/pthread/pthread_rwlockattr_destroy.c index 25b2be12..8e6df28f 100644 --- a/library/pthread/pthread_rwlockattr_destroy.c +++ b/library/pthread/pthread_rwlockattr_destroy.c @@ -1,5 +1,5 @@ /* - $Id: pthread_rwlockattr_destroy.c,v 1.00 2022-07-18 12:09:49 clib2devs Exp $ + $Id: pthread_rwlockattr_destroy.c,v 1.00 2022-07-18 12:09:49 clib4devs Exp $ Copyright (C) 2014 Szilard Biro Copyright (C) 2018 Harry Sintonen diff --git a/library/pthread/pthread_rwlockattr_getpshared.c b/library/pthread/pthread_rwlockattr_getpshared.c index 98050834..132b43d3 100644 --- a/library/pthread/pthread_rwlockattr_getpshared.c +++ b/library/pthread/pthread_rwlockattr_getpshared.c @@ -1,5 +1,5 @@ /* - $Id: pthread_rwlockattr_getpshared.c,v 1.00 2023-04-16 12:09:49 clib2devs Exp $ + $Id: pthread_rwlockattr_getpshared.c,v 1.00 2023-04-16 12:09:49 clib4devs Exp $ */ #ifndef _UNISTD_HEADERS_H diff --git a/library/pthread/pthread_rwlockattr_init.c b/library/pthread/pthread_rwlockattr_init.c index 5ee9b358..e4c1088a 100644 --- a/library/pthread/pthread_rwlockattr_init.c +++ b/library/pthread/pthread_rwlockattr_init.c @@ -1,5 +1,5 @@ /* - $Id: pthread_rwlockattr_init.c,v 1.00 2022-07-18 12:09:49 clib2devs Exp $ + $Id: pthread_rwlockattr_init.c,v 1.00 2022-07-18 12:09:49 clib4devs Exp $ Copyright (C) 2014 Szilard Biro Copyright (C) 2018 Harry Sintonen diff --git a/library/pthread/pthread_rwlockattr_setpshared.c b/library/pthread/pthread_rwlockattr_setpshared.c index f36ade2e..9c51e6d5 100644 --- a/library/pthread/pthread_rwlockattr_setpshared.c +++ b/library/pthread/pthread_rwlockattr_setpshared.c @@ -1,5 +1,5 @@ /* - $Id: pthread_rwlockattr_setpshared.c,v 1.00 2023-04-16 12:09:49 clib2devs Exp $ + $Id: pthread_rwlockattr_setpshared.c,v 1.00 2023-04-16 12:09:49 clib4devs Exp $ */ #ifndef _UNISTD_HEADERS_H diff --git a/library/pthread/pthread_self.c b/library/pthread/pthread_self.c index ad520ee5..af512b5c 100644 --- a/library/pthread/pthread_self.c +++ b/library/pthread/pthread_self.c @@ -1,5 +1,5 @@ /* - $Id: pthread_self.c,v 1.00 2022-07-18 12:09:49 clib2devs Exp $ + $Id: pthread_self.c,v 1.00 2022-07-18 12:09:49 clib4devs Exp $ Copyright (C) 2014 Szilard Biro Copyright (C) 2018 Harry Sintonen diff --git a/library/pthread/pthread_setcancelstate.c b/library/pthread/pthread_setcancelstate.c index f72b271b..e0d188f5 100644 --- a/library/pthread/pthread_setcancelstate.c +++ b/library/pthread/pthread_setcancelstate.c @@ -1,5 +1,5 @@ /* - $Id: pthread_setcancelstate.c,v 1.00 2022-07-18 12:09:49 clib2devs Exp $ + $Id: pthread_setcancelstate.c,v 1.00 2022-07-18 12:09:49 clib4devs Exp $ Copyright (C) 2014 Szilard Biro Copyright (C) 2018 Harry Sintonen diff --git a/library/pthread/pthread_setcanceltype.c b/library/pthread/pthread_setcanceltype.c index a716626a..7a4409ba 100644 --- a/library/pthread/pthread_setcanceltype.c +++ b/library/pthread/pthread_setcanceltype.c @@ -1,5 +1,5 @@ /* - $Id: pthread_setcanceltype.c,v 1.00 2022-07-18 12:09:49 clib2devs Exp $ + $Id: pthread_setcanceltype.c,v 1.00 2022-07-18 12:09:49 clib4devs Exp $ Copyright (C) 2014 Szilard Biro Copyright (C) 2018 Harry Sintonen diff --git a/library/pthread/pthread_setconcurrency.c b/library/pthread/pthread_setconcurrency.c index 8725c8b4..c391180a 100644 --- a/library/pthread/pthread_setconcurrency.c +++ b/library/pthread/pthread_setconcurrency.c @@ -1,5 +1,5 @@ /* - $Id: pthread_setconcurrency.c,v 1.00 2023-04-16 12:09:49 clib2devs Exp $ + $Id: pthread_setconcurrency.c,v 1.00 2023-04-16 12:09:49 clib4devs Exp $ */ #ifndef _UNISTD_HEADERS_H diff --git a/library/pthread/pthread_setname_np.c b/library/pthread/pthread_setname_np.c index 069d4127..7664b955 100644 --- a/library/pthread/pthread_setname_np.c +++ b/library/pthread/pthread_setname_np.c @@ -1,5 +1,5 @@ /* - $Id: pthread_setname_np.c,v 1.00 2022-07-18 12:09:49 clib2devs Exp $ + $Id: pthread_setname_np.c,v 1.00 2022-07-18 12:09:49 clib4devs Exp $ Copyright (C) 2014 Szilard Biro Copyright (C) 2018 Harry Sintonen diff --git a/library/pthread/pthread_setschedparam.c b/library/pthread/pthread_setschedparam.c index 3546c50f..246e83df 100644 --- a/library/pthread/pthread_setschedparam.c +++ b/library/pthread/pthread_setschedparam.c @@ -1,5 +1,5 @@ /* - $Id: pthread_setschedparam.c,v 1.00 2022-07-18 12:09:49 clib2devs Exp $ + $Id: pthread_setschedparam.c,v 1.00 2022-07-18 12:09:49 clib4devs Exp $ Copyright (C) 2014 Szilard Biro Copyright (C) 2018 Harry Sintonen diff --git a/library/pthread/pthread_setschedprio.c b/library/pthread/pthread_setschedprio.c index ddeb6852..92179825 100644 --- a/library/pthread/pthread_setschedprio.c +++ b/library/pthread/pthread_setschedprio.c @@ -1,5 +1,5 @@ /* - $Id: pthread_setschedprio.c,v 1.00 2022-07-18 12:09:49 clib2devs Exp $ + $Id: pthread_setschedprio.c,v 1.00 2022-07-18 12:09:49 clib4devs Exp $ Copyright (C) 2014 Szilard Biro Copyright (C) 2018 Harry Sintonen diff --git a/library/pthread/pthread_setspecific.c b/library/pthread/pthread_setspecific.c index 39202cbe..31c410ec 100644 --- a/library/pthread/pthread_setspecific.c +++ b/library/pthread/pthread_setspecific.c @@ -1,5 +1,5 @@ /* - $Id: pthread_setspecific.c,v 1.00 2022-07-18 12:09:49 clib2devs Exp $ + $Id: pthread_setspecific.c,v 1.00 2022-07-18 12:09:49 clib4devs Exp $ Copyright (C) 2014 Szilard Biro Copyright (C) 2018 Harry Sintonen diff --git a/library/pthread/pthread_spin_destroy.c b/library/pthread/pthread_spin_destroy.c index b697809f..03290356 100644 --- a/library/pthread/pthread_spin_destroy.c +++ b/library/pthread/pthread_spin_destroy.c @@ -1,5 +1,5 @@ /* - $Id: pthread_spin_destroy.c,v 1.00 2022-07-18 12:09:49 clib2devs Exp $ + $Id: pthread_spin_destroy.c,v 1.00 2022-07-18 12:09:49 clib4devs Exp $ Copyright (C) 2014 Szilard Biro Copyright (C) 2018 Harry Sintonen diff --git a/library/pthread/pthread_spin_init.c b/library/pthread/pthread_spin_init.c index 2fbea27b..0471ef6e 100644 --- a/library/pthread/pthread_spin_init.c +++ b/library/pthread/pthread_spin_init.c @@ -1,5 +1,5 @@ /* - $Id: pthread_spin_init.c,v 1.00 2022-07-18 12:09:49 clib2devs Exp $ + $Id: pthread_spin_init.c,v 1.00 2022-07-18 12:09:49 clib4devs Exp $ Copyright (C) 2014 Szilard Biro Copyright (C) 2018 Harry Sintonen diff --git a/library/pthread/pthread_spin_lock.c b/library/pthread/pthread_spin_lock.c index a1f5edd2..4bff77d4 100644 --- a/library/pthread/pthread_spin_lock.c +++ b/library/pthread/pthread_spin_lock.c @@ -1,5 +1,5 @@ /* - $Id: pthread_spin_lock.c,v 1.00 2022-07-18 12:09:49 clib2devs Exp $ + $Id: pthread_spin_lock.c,v 1.00 2022-07-18 12:09:49 clib4devs Exp $ Copyright (C) 2014 Szilard Biro Copyright (C) 2018 Harry Sintonen diff --git a/library/pthread/pthread_spin_trylock.c b/library/pthread/pthread_spin_trylock.c index fd3160f4..64bdb19d 100644 --- a/library/pthread/pthread_spin_trylock.c +++ b/library/pthread/pthread_spin_trylock.c @@ -1,5 +1,5 @@ /* - $Id: pthread_spin_trylock.c,v 1.00 2022-07-18 12:09:49 clib2devs Exp $ + $Id: pthread_spin_trylock.c,v 1.00 2022-07-18 12:09:49 clib4devs Exp $ Copyright (C) 2014 Szilard Biro Copyright (C) 2018 Harry Sintonen diff --git a/library/pthread/pthread_spin_unlock.c b/library/pthread/pthread_spin_unlock.c index 9f422a06..b7e046ff 100644 --- a/library/pthread/pthread_spin_unlock.c +++ b/library/pthread/pthread_spin_unlock.c @@ -1,5 +1,5 @@ /* - $Id: pthread_spin_unlock.c,v 1.00 2022-07-18 12:09:49 clib2devs Exp $ + $Id: pthread_spin_unlock.c,v 1.00 2022-07-18 12:09:49 clib4devs Exp $ Copyright (C) 2014 Szilard Biro Copyright (C) 2018 Harry Sintonen diff --git a/library/pthread/pthread_testcancel.c b/library/pthread/pthread_testcancel.c index c171bd40..523a85f4 100644 --- a/library/pthread/pthread_testcancel.c +++ b/library/pthread/pthread_testcancel.c @@ -1,5 +1,5 @@ /* - $Id: pthread_testcancel.c,v 1.00 2022-07-18 12:09:49 clib2devs Exp $ + $Id: pthread_testcancel.c,v 1.00 2022-07-18 12:09:49 clib4devs Exp $ Copyright (C) 2014 Szilard Biro Copyright (C) 2018 Harry Sintonen diff --git a/library/pthread/sched_get_priority_max.c b/library/pthread/sched_get_priority_max.c index 8a672949..adb5a927 100644 --- a/library/pthread/sched_get_priority_max.c +++ b/library/pthread/sched_get_priority_max.c @@ -1,5 +1,5 @@ /* - $Id: sched_get_priority_max.c,v 1.00 2022-07-18 12:09:49 clib2devs Exp $ + $Id: sched_get_priority_max.c,v 1.00 2022-07-18 12:09:49 clib4devs Exp $ Copyright (C) 2014 Szilard Biro Copyright (C) 2018 Harry Sintonen diff --git a/library/pthread/sched_get_priority_min.c b/library/pthread/sched_get_priority_min.c index 807ea151..808fd3a9 100644 --- a/library/pthread/sched_get_priority_min.c +++ b/library/pthread/sched_get_priority_min.c @@ -1,5 +1,5 @@ /* - $Id: sched_get_priority_min.c,v 1.00 2022-07-18 12:09:49 clib2devs Exp $ + $Id: sched_get_priority_min.c,v 1.00 2022-07-18 12:09:49 clib4devs Exp $ Copyright (C) 2014 Szilard Biro Copyright (C) 2018 Harry Sintonen diff --git a/library/pthread/sched_yield.c b/library/pthread/sched_yield.c index 5a768294..a32e1142 100644 --- a/library/pthread/sched_yield.c +++ b/library/pthread/sched_yield.c @@ -1,5 +1,5 @@ /* - * $Id: sched_sched_yield.h,v 1.1 2021-01-14 12:06:14 clib2devs Exp $ + * $Id: sched_sched_yield.h,v 1.1 2021-01-14 12:06:14 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H diff --git a/library/regex/regcomp.c b/library/regex/regcomp.c index 806e1201..7533573a 100644 --- a/library/regex/regcomp.c +++ b/library/regex/regcomp.c @@ -1,5 +1,5 @@ /* - * $Id: regex_regcomp.c,v 1.0 2022-03-21 18:52:18 clib2devs Exp $ + * $Id: regex_regcomp.c,v 1.0 2022-03-21 18:52:18 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H diff --git a/library/regex/regerror.c b/library/regex/regerror.c index aa5ee9f0..c6795ef5 100644 --- a/library/regex/regerror.c +++ b/library/regex/regerror.c @@ -1,5 +1,5 @@ /* - * $Id: regex_regerror.c,v 1.0 2022-03-21 18:52:18 clib2devs Exp $ + * $Id: regex_regerror.c,v 1.0 2022-03-21 18:52:18 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H diff --git a/library/regex/regexec.c b/library/regex/regexec.c index f334efc2..fca49b37 100644 --- a/library/regex/regexec.c +++ b/library/regex/regexec.c @@ -1,5 +1,5 @@ /* - * $Id: regex_regexec.c,v 1.0 2022-03-21 18:52:18 clib2devs Exp $ + * $Id: regex_regexec.c,v 1.0 2022-03-21 18:52:18 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H diff --git a/library/regex/regfree.c b/library/regex/regfree.c index d7092372..64367dea 100644 --- a/library/regex/regfree.c +++ b/library/regex/regfree.c @@ -1,5 +1,5 @@ /* - * $Id: regex_regfree.c,v 1.0 2022-03-21 18:52:18 clib2devs Exp $ + * $Id: regex_regfree.c,v 1.0 2022-03-21 18:52:18 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H diff --git a/library/regex/regmem.c b/library/regex/regmem.c index ddce1f8f..b4d6eb06 100644 --- a/library/regex/regmem.c +++ b/library/regex/regmem.c @@ -1,5 +1,5 @@ /* - * $Id: regex_regmem.c,v 1.0 2022-03-21 18:52:18 clib2devs Exp $ + * $Id: regex_regmem.c,v 1.0 2022-03-21 18:52:18 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H diff --git a/library/regex/tre.h b/library/regex/tre.h index 7a9f8990..00c3d744 100644 --- a/library/regex/tre.h +++ b/library/regex/tre.h @@ -1,5 +1,5 @@ /* - * $Id: regex_tre.h,v 1.0 2022-03-21 18:52:18 clib2devs Exp $ + * $Id: regex_tre.h,v 1.0 2022-03-21 18:52:18 clib4devs Exp $ Copyright (c) 2001-2009 Ville Laurikari All rights reserved. diff --git a/library/resolv/dns_parse.c b/library/resolv/dns_parse.c index 68d45b0c..79a6e8e9 100644 --- a/library/resolv/dns_parse.c +++ b/library/resolv/dns_parse.c @@ -1,4 +1,4 @@ -/* $Id: resolv_dns_parse.c,v 1.0 2022-08-09 10:44:15 clib2devs Exp $ +/* $Id: resolv_dns_parse.c,v 1.0 2022-08-09 10:44:15 clib4devs Exp $ Copyright (C) 2005-2006, 2008-2020 Free Software Foundation, Inc. diff --git a/library/resolv/lookup_name.c b/library/resolv/lookup_name.c index 9e695d04..265ca1cd 100644 --- a/library/resolv/lookup_name.c +++ b/library/resolv/lookup_name.c @@ -1,5 +1,5 @@ /* - * $Id: resolv_lookupname.c,v 1.0 2022-08-09 10:44:15 clib2devs Exp $ + * $Id: resolv_lookupname.c,v 1.0 2022-08-09 10:44:15 clib4devs Exp $ */ #ifndef _SOCKET_HEADERS_H diff --git a/library/resolv/lookup_serv.c b/library/resolv/lookup_serv.c index 59b8f640..af302fb6 100644 --- a/library/resolv/lookup_serv.c +++ b/library/resolv/lookup_serv.c @@ -1,4 +1,4 @@ -/* $Id: socket_lookup_serv.c,v 1.0 2022-03-14 10:44:15 clib2devs Exp $ +/* $Id: socket_lookup_serv.c,v 1.0 2022-03-14 10:44:15 clib4devs Exp $ Copyright (C) 2005-2006, 2008-2020 Free Software Foundation, Inc. diff --git a/library/resolv/res_init.c b/library/resolv/res_init.c index 89984fcc..6b0be555 100644 --- a/library/resolv/res_init.c +++ b/library/resolv/res_init.c @@ -1,4 +1,4 @@ -/* $Id: socket_res_inic.c,v 1.0 2022-03-14 10:44:15 clib2devs Exp $ +/* $Id: socket_res_inic.c,v 1.0 2022-03-14 10:44:15 clib4devs Exp $ Copyright (C) 2005-2006, 2008-2020 Free Software Foundation, Inc. diff --git a/library/resolv/res_mkquery.c b/library/resolv/res_mkquery.c index dc17b5b6..a7624394 100644 --- a/library/resolv/res_mkquery.c +++ b/library/resolv/res_mkquery.c @@ -1,4 +1,4 @@ -/* $Id: socket_res_mkquery.c,v 1.0 2022-03-14 10:44:15 clib2devs Exp $ +/* $Id: socket_res_mkquery.c,v 1.0 2022-03-14 10:44:15 clib4devs Exp $ Copyright (C) 2005-2006, 2008-2020 Free Software Foundation, Inc. diff --git a/library/resolv/res_msend_rc.c b/library/resolv/res_msend_rc.c index 0d5d64d9..1dae12e3 100644 --- a/library/resolv/res_msend_rc.c +++ b/library/resolv/res_msend_rc.c @@ -1,4 +1,4 @@ -/* $Id: socket_res_msend.c,v 1.0 2022-03-14 10:44:15 clib2devs Exp $ +/* $Id: socket_res_msend.c,v 1.0 2022-03-14 10:44:15 clib4devs Exp $ Copyright (C) 2005-2006, 2008-2020 Free Software Foundation, Inc. diff --git a/library/resolv/res_query.c b/library/resolv/res_query.c index 442e9ba7..c5bee4a2 100644 --- a/library/resolv/res_query.c +++ b/library/resolv/res_query.c @@ -1,4 +1,4 @@ -/* $Id: socket_res_query.c,v 1.0 2022-03-14 10:44:15 clib2devs Exp $ +/* $Id: socket_res_query.c,v 1.0 2022-03-14 10:44:15 clib4devs Exp $ Copyright (C) 2005-2006, 2008-2020 Free Software Foundation, Inc. diff --git a/library/resolv/res_querydomain.c b/library/resolv/res_querydomain.c index ea3f4bb3..461c3213 100644 --- a/library/resolv/res_querydomain.c +++ b/library/resolv/res_querydomain.c @@ -1,4 +1,4 @@ -/* $Id: socket_res_querydomain.c,v 1.0 2022-03-14 10:44:15 clib2devs Exp $ +/* $Id: socket_res_querydomain.c,v 1.0 2022-03-14 10:44:15 clib4devs Exp $ Copyright (C) 2005-2006, 2008-2020 Free Software Foundation, Inc. diff --git a/library/resolv/res_search.c b/library/resolv/res_search.c index c9981209..a3d4bd2d 100644 --- a/library/resolv/res_search.c +++ b/library/resolv/res_search.c @@ -1,4 +1,4 @@ -/* $Id: socket_res_search.c,v 1.0 2022-03-14 10:44:15 clib2devs Exp $ +/* $Id: socket_res_search.c,v 1.0 2022-03-14 10:44:15 clib4devs Exp $ Copyright (C) 2005-2006, 2008-2020 Free Software Foundation, Inc. diff --git a/library/resolv/res_send.c b/library/resolv/res_send.c index c9e386e0..a8274c33 100644 --- a/library/resolv/res_send.c +++ b/library/resolv/res_send.c @@ -1,4 +1,4 @@ -/* $Id: socket_res_send.c,v 1.0 2022-03-14 10:44:15 clib2devs Exp $ +/* $Id: socket_res_send.c,v 1.0 2022-03-14 10:44:15 clib4devs Exp $ Copyright (C) 2005-2006, 2008-2020 Free Software Foundation, Inc. diff --git a/library/resolv/res_state.c b/library/resolv/res_state.c index c1ebff85..2f3c9288 100644 --- a/library/resolv/res_state.c +++ b/library/resolv/res_state.c @@ -1,4 +1,4 @@ -/* $Id: socket_res_state.c,v 1.0 2022-03-14 10:44:15 clib2devs Exp $ +/* $Id: socket_res_state.c,v 1.0 2022-03-14 10:44:15 clib4devs Exp $ */ #include diff --git a/library/resolv/resolvconf.c b/library/resolv/resolvconf.c index f2fc6fd3..9cafef24 100644 --- a/library/resolv/resolvconf.c +++ b/library/resolv/resolvconf.c @@ -1,4 +1,4 @@ -/* $Id: resolv_resolvconf.c,v 1.0 2022-03-14 10:44:15 clib2devs Exp $ +/* $Id: resolv_resolvconf.c,v 1.0 2022-03-14 10:44:15 clib4devs Exp $ Copyright (C) 2005-2006, 2008-2020 Free Software Foundation, Inc. diff --git a/library/rt/aio_cancel.c b/library/rt/aio_cancel.c index 422cddf2..0d60d731 100644 --- a/library/rt/aio_cancel.c +++ b/library/rt/aio_cancel.c @@ -1,5 +1,5 @@ /* - * $Id: aio_aio_cancel.c,v 1.0 2023-03-03 07:15:37 clib2devs Exp $ + * $Id: aio_aio_cancel.c,v 1.0 2023-03-03 07:15:37 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H #include "stdio_headers.h" diff --git a/library/rt/aio_error.c b/library/rt/aio_error.c index 8f3aacc1..de4e1648 100644 --- a/library/rt/aio_error.c +++ b/library/rt/aio_error.c @@ -1,5 +1,5 @@ /* - * $Id: aio_aio_error.c,v 1.0 2023-03-03 07:15:37 clib2devs Exp $ + * $Id: aio_aio_error.c,v 1.0 2023-03-03 07:15:37 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H #include "stdio_headers.h" diff --git a/library/rt/aio_fsync.c b/library/rt/aio_fsync.c index 876201ad..a995e5b0 100644 --- a/library/rt/aio_fsync.c +++ b/library/rt/aio_fsync.c @@ -1,5 +1,5 @@ /* - * $Id: aio_aio_error.c,v 1.0 2023-03-03 07:15:37 clib2devs Exp $ + * $Id: aio_aio_error.c,v 1.0 2023-03-03 07:15:37 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H #include "stdio_headers.h" diff --git a/library/rt/aio_init.c b/library/rt/aio_init.c index 13cc790f..f054bf4f 100644 --- a/library/rt/aio_init.c +++ b/library/rt/aio_init.c @@ -1,5 +1,5 @@ /* - * $Id: aio_aio_init.c,v 1.0 2023-03-03 07:15:37 clib2devs Exp $ + * $Id: aio_aio_init.c,v 1.0 2023-03-03 07:15:37 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H #include "stdio_headers.h" diff --git a/library/rt/aio_misc.c b/library/rt/aio_misc.c index 915d9ec6..48908e58 100644 --- a/library/rt/aio_misc.c +++ b/library/rt/aio_misc.c @@ -1,5 +1,5 @@ /* - * $Id: aio_aio_misc.c,v 1.0 2023-03-03 07:15:37 clib2devs Exp $ + * $Id: aio_aio_misc.c,v 1.0 2023-03-03 07:15:37 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H #include "stdio_headers.h" diff --git a/library/rt/aio_notify.c b/library/rt/aio_notify.c index f144cd14..65cd7482 100644 --- a/library/rt/aio_notify.c +++ b/library/rt/aio_notify.c @@ -1,5 +1,5 @@ /* - * $Id: aio_aio_notify.c,v 1.0 2023-03-03 07:15:37 clib2devs Exp $ + * $Id: aio_aio_notify.c,v 1.0 2023-03-03 07:15:37 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H #include "stdio_headers.h" diff --git a/library/rt/aio_read.c b/library/rt/aio_read.c index 8bbf6f54..807b3da6 100644 --- a/library/rt/aio_read.c +++ b/library/rt/aio_read.c @@ -1,5 +1,5 @@ /* - * $Id: aio_aio_read.c,v 1.0 2023-03-03 07:15:37 clib2devs Exp $ + * $Id: aio_aio_read.c,v 1.0 2023-03-03 07:15:37 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H diff --git a/library/rt/aio_read64.c b/library/rt/aio_read64.c index 30084de1..88bc1a91 100644 --- a/library/rt/aio_read64.c +++ b/library/rt/aio_read64.c @@ -1,5 +1,5 @@ /* - * $Id: aio_aio_read64.c,v 1.0 2023-03-03 07:15:37 clib2devs Exp $ + * $Id: aio_aio_read64.c,v 1.0 2023-03-03 07:15:37 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H diff --git a/library/rt/aio_return.c b/library/rt/aio_return.c index 20ff99bd..935f523f 100644 --- a/library/rt/aio_return.c +++ b/library/rt/aio_return.c @@ -1,5 +1,5 @@ /* - * $Id: aio_aio_return.c,v 1.0 2023-03-03 07:15:37 clib2devs Exp $ + * $Id: aio_aio_return.c,v 1.0 2023-03-03 07:15:37 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H diff --git a/library/rt/aio_sigqueue.c b/library/rt/aio_sigqueue.c index cda6f2f2..ca35119e 100644 --- a/library/rt/aio_sigqueue.c +++ b/library/rt/aio_sigqueue.c @@ -1,5 +1,5 @@ /* - * $Id: aio_aio_sigqueue.c,v 1.0 2023-03-03 07:15:37 clib2devs Exp $ + * $Id: aio_aio_sigqueue.c,v 1.0 2023-03-03 07:15:37 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H diff --git a/library/rt/aio_suspend.c b/library/rt/aio_suspend.c index af023f1b..ea7f2a93 100644 --- a/library/rt/aio_suspend.c +++ b/library/rt/aio_suspend.c @@ -1,5 +1,5 @@ /* - * $Id: aio_aio_suspend.c,v 1.0 2023-03-03 07:15:37 clib2devs Exp $ + * $Id: aio_aio_suspend.c,v 1.0 2023-03-03 07:15:37 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H diff --git a/library/rt/aio_write.c b/library/rt/aio_write.c index b5e18515..d70893d2 100644 --- a/library/rt/aio_write.c +++ b/library/rt/aio_write.c @@ -1,5 +1,5 @@ /* - * $Id: aio_aio_write.c,v 1.0 2023-03-03 07:15:37 clib2devs Exp $ + * $Id: aio_aio_write.c,v 1.0 2023-03-03 07:15:37 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H diff --git a/library/rt/aio_write64.c b/library/rt/aio_write64.c index ed87d02a..e1974cbb 100644 --- a/library/rt/aio_write64.c +++ b/library/rt/aio_write64.c @@ -1,5 +1,5 @@ /* - * $Id: aio_aio_write64.c,v 1.0 2023-03-03 07:15:37 clib2devs Exp $ + * $Id: aio_aio_write64.c,v 1.0 2023-03-03 07:15:37 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H diff --git a/library/rt/clist.c b/library/rt/clist.c index 28d8974e..f6cc57b4 100644 --- a/library/rt/clist.c +++ b/library/rt/clist.c @@ -1,5 +1,5 @@ /* - * $Id: misc_clist.c,v 1.0 2023-03-03 14:15:37 clib2devs Exp $ + * $Id: misc_clist.c,v 1.0 2023-03-03 14:15:37 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H diff --git a/library/rt/clist.h b/library/rt/clist.h index 9c745fbc..20736e3d 100644 --- a/library/rt/clist.h +++ b/library/rt/clist.h @@ -1,5 +1,5 @@ /* - * $Id: misc_clist.h,v 1.0 2023-03-03 07:15:37 clib2devs Exp $ + * $Id: misc_clist.h,v 1.0 2023-03-03 07:15:37 clib4devs Exp $ */ #ifndef CLIST_H diff --git a/library/rt/lio_listio.c b/library/rt/lio_listio.c index 87f66add..30c175c8 100644 --- a/library/rt/lio_listio.c +++ b/library/rt/lio_listio.c @@ -1,5 +1,5 @@ /* - * $Id: aio_lio_listio.c,v 1.0 2023-03-03 07:15:37 clib2devs Exp $ + * $Id: aio_lio_listio.c,v 1.0 2023-03-03 07:15:37 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H #include "stdio_headers.h" diff --git a/library/rt/rt.lib_rev.c b/library/rt/rt.lib_rev.c index d242fc46..7482763f 100644 --- a/library/rt/rt.lib_rev.c +++ b/library/rt/rt.lib_rev.c @@ -1,5 +1,5 @@ /* - * $Id: rt.lib_rev.c,v 1.0 2023-04-27 11:59:23 clib2devs Exp $ + * $Id: rt.lib_rev.c,v 1.0 2023-04-27 11:59:23 clib4devs Exp $ */ #include "rt.lib_rev.h" diff --git a/library/search/ftw.c b/library/search/ftw.c index 55a432cb..ef173749 100644 --- a/library/search/ftw.c +++ b/library/search/ftw.c @@ -1,5 +1,5 @@ /* - * $Id: ftw_ftw.c,v 1.5 2006-01-08 12:04:22 clib2devs Exp $ + * $Id: ftw_ftw.c,v 1.5 2006-01-08 12:04:22 clib4devs Exp $ */ /* diff --git a/library/search/ftw_headers.h b/library/search/ftw_headers.h index 8d570bfc..7c7cee22 100755 --- a/library/search/ftw_headers.h +++ b/library/search/ftw_headers.h @@ -1,5 +1,5 @@ /* - * $Id: ftw_headers.h,v 1.3 2006-01-08 12:04:22 clib2devs Exp $ + * $Id: ftw_headers.h,v 1.3 2006-01-08 12:04:22 clib4devs Exp $ */ #ifndef _FTW_HEADERS_H diff --git a/library/search/hash_func.c b/library/search/hash_func.c index ca1bff02..bf01683c 100644 --- a/library/search/hash_func.c +++ b/library/search/hash_func.c @@ -1,5 +1,5 @@ /* - * $Id: search_hash_func.c,v 1.0 2021-02-21 19:38:14 clib2devs Exp $ + * $Id: search_hash_func.c,v 1.0 2021-02-21 19:38:14 clib4devs Exp $ */ #include diff --git a/library/search/hcreate.c b/library/search/hcreate.c index 1601d86b..6e2c9e64 100644 --- a/library/search/hcreate.c +++ b/library/search/hcreate.c @@ -1,5 +1,5 @@ /* - * $Id: search_hcreate.c,v 1.0 2021-02-21 19:38:14 clib2devs Exp $ + * $Id: search_hcreate.c,v 1.0 2021-02-21 19:38:14 clib4devs Exp $ */ #include diff --git a/library/search/lfind.c b/library/search/lfind.c index 90563512..4d595e95 100644 --- a/library/search/lfind.c +++ b/library/search/lfind.c @@ -1,5 +1,5 @@ /* - * $Id: search_lfind.c,v 1.0 2021-02-21 19:38:14 clib2devs Exp $ + * $Id: search_lfind.c,v 1.0 2021-02-21 19:38:14 clib4devs Exp $ */ #include diff --git a/library/search/lsearch.c b/library/search/lsearch.c index ae0c8a85..042bfbc7 100644 --- a/library/search/lsearch.c +++ b/library/search/lsearch.c @@ -1,5 +1,5 @@ /* - * $Id: search_lsearch.c,v 1.0 2021-02-21 19:38:14 clib2devs Exp $ + * $Id: search_lsearch.c,v 1.0 2021-02-21 19:38:14 clib4devs Exp $ */ #include diff --git a/library/search/nftw.c b/library/search/nftw.c index b5292ac0..19819cbc 100644 --- a/library/search/nftw.c +++ b/library/search/nftw.c @@ -1,5 +1,5 @@ /* - * $Id: ftw_nftw.c,v 1.5 2006-01-08 12:04:22 clib2devs Exp $ + * $Id: ftw_nftw.c,v 1.5 2006-01-08 12:04:22 clib4devs Exp $ */ /* diff --git a/library/search/tdelete.c b/library/search/tdelete.c index ace07196..82d6f828 100644 --- a/library/search/tdelete.c +++ b/library/search/tdelete.c @@ -1,5 +1,5 @@ /* - * $Id: search_tdelete.c,v 1.0 2021-02-21 19:38:14 clib2devs Exp $ + * $Id: search_tdelete.c,v 1.0 2021-02-21 19:38:14 clib4devs Exp $ */ #define _SEARCH_PRIVATE diff --git a/library/search/tdestroy.c b/library/search/tdestroy.c index e2e28c0b..b9e1f8be 100644 --- a/library/search/tdestroy.c +++ b/library/search/tdestroy.c @@ -1,5 +1,5 @@ /* - * $Id: search_tdestroy.c,v 1.0 2021-02-21 19:38:14 clib2devs Exp $ + * $Id: search_tdestroy.c,v 1.0 2021-02-21 19:38:14 clib4devs Exp $ */ #define _SEARCH_PRIVATE diff --git a/library/search/tfind.c b/library/search/tfind.c index c210438e..cecc5153 100644 --- a/library/search/tfind.c +++ b/library/search/tfind.c @@ -1,5 +1,5 @@ /* - * $Id: search_tfind.c,v 1.0 2021-02-21 19:38:14 clib2devs Exp $ + * $Id: search_tfind.c,v 1.0 2021-02-21 19:38:14 clib4devs Exp $ */ #define _SEARCH_PRIVATE diff --git a/library/search/tsearch.c b/library/search/tsearch.c index 2908288d..0063f660 100644 --- a/library/search/tsearch.c +++ b/library/search/tsearch.c @@ -1,5 +1,5 @@ /* - * $Id: search_tsearch.c,v 1.0 2021-02-21 19:38:14 clib2devs Exp $ + * $Id: search_tsearch.c,v 1.0 2021-02-21 19:38:14 clib4devs Exp $ */ #define _SEARCH_PRIVATE diff --git a/library/search/twalk.c b/library/search/twalk.c index 9be7a115..78c2be9f 100644 --- a/library/search/twalk.c +++ b/library/search/twalk.c @@ -1,5 +1,5 @@ /* - * $Id: search_twalk.c,v 1.0 2021-02-21 19:38:14 clib2devs Exp $ + * $Id: search_twalk.c,v 1.0 2021-02-21 19:38:14 clib4devs Exp $ */ #define _SEARCH_PRIVATE diff --git a/library/setjmp/_longjmp.S b/library/setjmp/_longjmp.S index f5989a1b..0c2c4261 100644 --- a/library/setjmp/_longjmp.S +++ b/library/setjmp/_longjmp.S @@ -1,9 +1,9 @@ /* - * $Id: setjmp_longjmp.S,v 1.0 2023-03-02 12:04:24 clib2devs Exp $ + * $Id: setjmp_longjmp.S,v 1.0 2023-03-02 12:04:24 clib4devs Exp $ */ /* - * $Id: setjmp_longjmp.S,v 1.0 2023-03-02 12:04:24 clib2devs Exp $ + * $Id: setjmp_longjmp.S,v 1.0 2023-03-02 12:04:24 clib4devs Exp $ */ /* longjmp for PowerPC. diff --git a/library/setjmp/longjmp.S b/library/setjmp/longjmp.S index 268d61a7..500c1f1f 100644 --- a/library/setjmp/longjmp.S +++ b/library/setjmp/longjmp.S @@ -1,5 +1,5 @@ /* - * $Id: stdlib_longjmp.c,v 1.6 2010-10-20 13:50:17 clib2devs Exp $ + * $Id: stdlib_longjmp.c,v 1.6 2010-10-20 13:50:17 clib4devs Exp $ */ /* This is a simple version of setjmp and longjmp for the PowerPC. diff --git a/library/setjmp/setjmp.S b/library/setjmp/setjmp.S index a355fc56..9f9763de 100644 --- a/library/setjmp/setjmp.S +++ b/library/setjmp/setjmp.S @@ -1,5 +1,5 @@ /* - * $Id: stdlib_setjmp.c,v 2.0 2010-10-20 13:50:17 clib2devs Exp $ + * $Id: stdlib_setjmp.c,v 2.0 2010-10-20 13:50:17 clib4devs Exp $ */ /* This is a simple version of setjmp and longjmp for the PowerPC. Ian Lance Taylor, Cygnus Support, 9 Feb 1994. diff --git a/library/setjmp/siglongjmp.c b/library/setjmp/siglongjmp.c index e8fd7d1b..bae250e0 100644 --- a/library/setjmp/siglongjmp.c +++ b/library/setjmp/siglongjmp.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_siglongjmp.c,v 1.0 2023-02-28 14:12:15 clib2devs Exp $ + * $Id: stdlib_siglongjmp.c,v 1.0 2023-02-28 14:12:15 clib4devs Exp $ */ #ifndef _SIGNAL_HEADERS_H diff --git a/library/shared_library/clib2.c b/library/shared_library/clib4.c similarity index 86% rename from library/shared_library/clib2.c rename to library/shared_library/clib4.c index 807516ff..3c599707 100644 --- a/library/shared_library/clib2.c +++ b/library/shared_library/clib4.c @@ -84,7 +84,7 @@ #include "dos.h" #include "c.lib_rev.h" -#include "clib2.h" +#include "clib4.h" #include "debug.h" #include "uuid.h" @@ -109,12 +109,12 @@ struct TimerIFace *ITimer = 0; struct Library *__UtilityBase = 0; struct UtilityIFace *__IUtility = 0; -struct Clib2IFace *IClib2 = 0; +struct Clib4IFace *IClib4 = 0; const struct Resident RomTag; #define LIBPRI 0 -#define LIBNAME "clib2.library" +#define LIBNAME "clib4.library" static struct TimeRequest *openTimer(uint32 unit); static void closeTimer(struct TimeRequest *tr); @@ -165,23 +165,23 @@ static void closeLibraries() { } } -struct Clib2Base *libOpen(struct LibraryManagerInterface *Self, uint32 version) { +struct Clib4Base *libOpen(struct LibraryManagerInterface *Self, uint32 version) { if (version > VERSION) { return NULL; } - struct Clib2Base *libBase = (struct Clib2Base *) Self->Data.LibBase; - if (!IClib2) { - IClib2 = (struct Clib2IFace *) IExec->GetInterface((struct Library *) libBase, "main", 1, NULL); - IExec->DropInterface((struct Interface *)IClib2); + struct Clib4Base *libBase = (struct Clib4Base *) Self->Data.LibBase; + if (!IClib4) { + IClib4 = (struct Clib4IFace *) IExec->GetInterface((struct Library *) libBase, "main", 1, NULL); + IExec->DropInterface((struct Interface *)IClib4); } ++libBase->libNode.lib_OpenCnt; libBase->libNode.lib_Flags &= ~LIBF_DELEXP; - struct Clib2Resource *res = (APTR) IExec->OpenResource(RESOURCE_NAME); + struct Clib4Resource *res = (APTR) IExec->OpenResource(RESOURCE_NAME); if (res) { - struct Clib2Node c2n; + struct Clib4Node c2n; char uuid[UUID4_LEN + 1] = {0}; uint32 pid = IDOS->GetPID(0, GPID_PROCESS); uint32 ppid = IDOS->GetPID(0, GPID_PARENT); @@ -200,19 +200,19 @@ struct Clib2Base *libOpen(struct LibraryManagerInterface *Self, uint32 version) #ifdef __SPE__ case CPUFAMILY_E500: D(("Using SPE setjmp family functions")); - IClib2->setjmp = setjmp_spe; - IClib2->longjmp = longjmp_spe; - IClib2->_longjmp = _longjmp_spe; - IClib2->_setjmp = _setjmp_spe; - IClib2->__sigsetjmp = __sigsetjmp_spe; - IClib2->siglongjmp = siglongjmp_spe; + IClib4->setjmp = setjmp_spe; + IClib4->longjmp = longjmp_spe; + IClib4->_longjmp = _longjmp_spe; + IClib4->_setjmp = _setjmp_spe; + IClib4->__sigsetjmp = __sigsetjmp_spe; + IClib4->siglongjmp = siglongjmp_spe; break; #endif default: if (res->altivec) { D(("Using Altivec setjmp family functions")); - IClib2->setjmp = setjmp_altivec; - IClib2->longjmp = longjmp_altivec; + IClib4->setjmp = setjmp_altivec; + IClib4->longjmp = longjmp_altivec; } else D(("Using default setjmp family functions")); @@ -224,7 +224,7 @@ struct Clib2Base *libOpen(struct LibraryManagerInterface *Self, uint32 version) BPTR libExpunge(struct LibraryManagerInterface *Self) { BPTR result = 0; - struct Clib2Resource *res = (APTR) IExec->OpenResource(RESOURCE_NAME); + struct Clib4Resource *res = (APTR) IExec->OpenResource(RESOURCE_NAME); if (res) { IPCMapUninit(&res->shmcx.keymap); IPCMapUninit(&res->msgcx.keymap); @@ -234,7 +234,7 @@ BPTR libExpunge(struct LibraryManagerInterface *Self) { size_t iter = 0; void *item; while (hashmap_iter(res->children, &iter, &item)) { - const struct Clib2Node *node = item; + const struct Clib4Node *node = item; if (node->undo) IExec->FreeVec(node->undo); } @@ -248,7 +248,7 @@ BPTR libExpunge(struct LibraryManagerInterface *Self) { IExec->FreeVec(res); } - struct Clib2Base *libBase = (struct Clib2Base *) Self->Data.LibBase; + struct Clib4Base *libBase = (struct Clib4Base *) Self->Data.LibBase; if (libBase->libNode.lib_OpenCnt) { libBase->libNode.lib_Flags |= LIBF_DELEXP; return result; @@ -266,15 +266,15 @@ BPTR libExpunge(struct LibraryManagerInterface *Self) { } BPTR libClose(struct LibraryManagerInterface *Self) { - struct Clib2Base *libBase = (struct Clib2Base *) Self->Data.LibBase; + struct Clib4Base *libBase = (struct Clib4Base *) Self->Data.LibBase; - struct Clib2Resource *res = (APTR) IExec->OpenResource(RESOURCE_NAME); + struct Clib4Resource *res = (APTR) IExec->OpenResource(RESOURCE_NAME); if (res) { uint32 pid = IDOS->GetPID(0, GPID_PROCESS); size_t iter = 0; void *item; while (hashmap_iter(res->children, &iter, &item)) { - const struct Clib2Node *node = item; + const struct Clib4Node *node = item; if (node->pid == pid) { if (node->undo) IExec->FreeVec(node->undo); @@ -297,11 +297,11 @@ BPTR libClose(struct LibraryManagerInterface *Self) { } } -uint32 clib2Obtain(struct Clib2IFace *Self) { +uint32 clib4Obtain(struct Clib4IFace *Self) { return ++Self->Data.RefCount; } -uint32 clib2Release(struct Clib2IFace *Self) { +uint32 clib4Release(struct Clib4IFace *Self) { return --Self->Data.RefCount; } @@ -314,7 +314,7 @@ uint32 libRelease(struct LibraryManagerInterface *Self) { } int libReserved(void) { - __CLIB2->_errno = ENOSYS; + __CLIB4->_errno = ENOSYS; return -1; } @@ -332,19 +332,19 @@ unixSocketCompare(const void *a, const void *b, void *udata) { } uint64_t -clib2NodeHash(const void *item, uint64_t seed0, uint64_t seed1) { - const struct Clib2Node *node = item; +clib4NodeHash(const void *item, uint64_t seed0, uint64_t seed1) { + const struct Clib4Node *node = item; return hashmap_xxhash3(node->uuid, strlen(node->uuid), seed0, seed1); } int -clib2NodeCompare(const void *a, const void *b, void *udata) { - const struct Clib2Node *ua = a; - const struct Clib2Node *ub = b; +clib4NodeCompare(const void *a, const void *b, void *udata) { + const struct Clib4Node *ua = a; + const struct Clib4Node *ub = b; return ua->uuid == ub->uuid; } -struct Clib2Base *libInit(struct Clib2Base *libBase, BPTR seglist, struct ExecIFace *const iexec) { +struct Clib4Base *libInit(struct Clib4Base *libBase, BPTR seglist, struct ExecIFace *const iexec) { libBase->libNode.lib_Node.ln_Type = NT_LIBRARY; libBase->libNode.lib_Node.ln_Pri = LIBPRI; libBase->libNode.lib_Node.ln_Name = LIBNAME; @@ -403,10 +403,10 @@ struct Clib2Base *libInit(struct Clib2Base *libBase, BPTR seglist, struct ExecIF } /* Open resource */ - struct Clib2Resource *res = (APTR) iexec->OpenResource(RESOURCE_NAME); + struct Clib4Resource *res = (APTR) iexec->OpenResource(RESOURCE_NAME); if (!res) { res = iexec->AllocVecTags( - sizeof(struct Clib2Resource), + sizeof(struct Clib4Resource), AVT_Type, MEMF_SHARED, AVT_ClearWithValue, 0, AVT_Lock, TRUE, @@ -421,12 +421,12 @@ struct Clib2Base *libInit(struct Clib2Base *libBase, BPTR seglist, struct ExecIF res->size = sizeof(*res); iexec->InitSemaphore(&res->semaphore); - res->children = hashmap_new(sizeof(struct Clib2Node), 0, 0, 0, clib2NodeHash, clib2NodeCompare, NULL, NULL); + res->children = hashmap_new(sizeof(struct Clib4Node), 0, 0, 0, clib4NodeHash, clib4NodeCompare, NULL, NULL); /* Initialize unix sockets hashmap */ res->uxSocketsMap = hashmap_new(sizeof(struct UnixSocket), 0, 0, 0, unixSocketHash, unixSocketCompare, NULL, NULL); - /* Initialize fallback clib2 reent structure */ - res->fallbackClib = (struct _clib2 *) iexec->AllocVecTags(sizeof(struct _clib2), + /* Initialize fallback clib4 reent structure */ + res->fallbackClib = (struct _clib4 *) iexec->AllocVecTags(sizeof(struct _clib4), AVT_Type, MEMF_SHARED, AVT_ClearWithValue, 0, TAG_DONE); @@ -481,13 +481,13 @@ static struct TagItem libManagerTags[] = { {TAG_DONE, 0} }; -extern struct _clib2 *__getClib2(void); +extern struct _clib4 *__getClib4(void); -#include "clib2_vectors.h" +#include "clib4_vectors.h" static struct TagItem mainTags[] = { {MIT_Name, (uint32) "main"}, - {MIT_VectorTable, (uint32) clib2Vectors}, + {MIT_VectorTable, (uint32) clib4Vectors}, {MIT_Version, 1}, {MIT_DataSize, 0}, {TAG_DONE, 0} @@ -502,7 +502,7 @@ static uint32 libInterfaces[] = { /* CreateLibrary tag list */ static struct TagItem libCreateTags[] = { - {CLT_DataSize, (uint32)(sizeof(struct Clib2Base))}, + {CLT_DataSize, (uint32)(sizeof(struct Clib4Base))}, {CLT_Interfaces, (uint32) libInterfaces}, {CLT_InitFunc, (uint32) libInit}, {TAG_DONE, 0} diff --git a/library/shared_library/clib2.h b/library/shared_library/clib4.h similarity index 89% rename from library/shared_library/clib2.h rename to library/shared_library/clib4.h index 77f0cea3..167ddc10 100644 --- a/library/shared_library/clib2.h +++ b/library/shared_library/clib4.h @@ -1,5 +1,5 @@ -#ifndef _CLIB2_H -#define _CLIB2_H +#ifndef _CLIB4_H +#define _CLIB4_H #include #include @@ -9,7 +9,7 @@ #include "uuid.h" #include "ipc_headers.h" -#define RESOURCE_NAME "clib2.resource" +#define RESOURCE_NAME "clib4.resource" extern int setjmp_spe(jmp_buf); extern void longjmp_spe(jmp_buf, int); @@ -20,13 +20,13 @@ extern int __sigsetjmp_spe(struct __jmp_buf_tag, int); extern void _longjmp_spe(struct __jmp_buf_tag, int); extern int _setjmp_spe(struct __jmp_buf_tag); /* 1796 */ -struct Clib2Resource { +struct Clib4Resource { struct Library resource; /* must be first */ uint32 size; /* for struct validation only */ struct SignalSemaphore semaphore; /* for list arbitration */ struct hashmap *children; /* list of parent nodes */ struct hashmap *uxSocketsMap; - struct _clib2 *fallbackClib; + struct _clib4 *fallbackClib; /* SysVIPC fields */ int locked; struct @@ -47,7 +47,7 @@ struct Clib2Resource { uint32 cpufamily; }; -struct Clib2Node { +struct Clib4Node { uint32 pid; /* the process PID */ uint32 pPid; /* the process Parent PID */ char uuid[UUID4_LEN + 1]; @@ -56,7 +56,7 @@ struct Clib2Node { int32 errNo; }; -struct Clib2Base { +struct Clib4Base { struct Library libNode; uint16 pad; BPTR SegList; @@ -65,8 +65,8 @@ struct Clib2Base { int libReserved(void); uint32 libRelease(struct LibraryManagerInterface *Self); uint32 libObtain(struct LibraryManagerInterface *Self); -struct Clib2Base *libOpen(struct LibraryManagerInterface *Self, uint32 version); -struct Clib2Base *libInit(struct Clib2Base *libBase, BPTR seglist, struct ExecIFace *const iexec); +struct Clib4Base *libOpen(struct LibraryManagerInterface *Self, uint32 version); +struct Clib4Base *libInit(struct Clib4Base *libBase, BPTR seglist, struct ExecIFace *const iexec); BPTR libExpunge(struct LibraryManagerInterface *Self); static void _start_ctors(void (*__CTOR_LIST__[])(void)); diff --git a/library/shared_library/clib2_vectors.h b/library/shared_library/clib4_vectors.h similarity index 99% rename from library/shared_library/clib2_vectors.h rename to library/shared_library/clib4_vectors.h index 999c58f6..e3219f64 100644 --- a/library/shared_library/clib2_vectors.h +++ b/library/shared_library/clib4_vectors.h @@ -1,11 +1,11 @@ -static void *clib2Vectors[] = { - (void *) (clib2Obtain), - (void *) (clib2Release), +static void *clib4Vectors[] = { + (void *) (clib4Obtain), + (void *) (clib4Release), (void *) (NULL), (void *) (NULL), /* internal */ (void *) (library_start), - (void *) (__getClib2), + (void *) (__getClib4), (void *) (libReserved), (void *) (__translate_amiga_to_unix_path_name), (void *) (__translate_unix_to_amiga_path_name), @@ -1080,9 +1080,6 @@ static void *clib2Vectors[] = { /* sys/utsname.h */ (void *) (uname), /* 4084 */ - /* END OF CLIB2 VERSION 1.0 */ - /* New function will go below */ - (void *) (futimens), /* 4088 */ (void *) (utimensat), /* 4092 */ (void *) (__isnan), /* 4096 */ diff --git a/library/shared_library/interface.h b/library/shared_library/interface.h index 4b2d81e7..217759b3 100644 --- a/library/shared_library/interface.h +++ b/library/shared_library/interface.h @@ -94,15 +94,15 @@ struct NameTranslationInfo; #include -struct Clib2IFace { +struct Clib4IFace { struct InterfaceData Data; //-4/56 - unsigned long APICALL (*Obtain)(struct Clib2IFace *Self); //60 - unsigned long APICALL (*Release)(struct Clib2IFace *Self); //64 - void APICALL (*Expunge)(struct Clib2IFace *Self); //68 - struct Clib2IFace *APICALL (*Clone)(struct Clib2IFace *Self); //72 + unsigned long APICALL (*Obtain)(struct Clib4IFace *Self); //60 + unsigned long APICALL (*Release)(struct Clib4IFace *Self); //64 + void APICALL (*Expunge)(struct Clib4IFace *Self); //68 + struct Clib4IFace *APICALL (*Clone)(struct Clib4IFace *Self); //72 /* internal */ int (* library_start)(char *argstr, int arglen, int (* start_main)(int, char **), void (*__CTOR_LIST__[])(void), void (*__DTOR_LIST__[])(void)); //76 - struct _clib2 * (* __getClib2)(void); //80 + struct _clib4 * (* __getClib4)(void); //80 void (* internal1)(void); //84 void (* __translate_amiga_to_unix_path_name)(void); //88 void (* __translate_unix_to_amiga_path_name)(void); //92 @@ -1322,27 +1322,27 @@ struct Clib2IFace { }; #ifdef __PIC__ -#define Clib2Call2(function, offset) \ +#define Clib4Call2(function, offset) \ asm(".section \".text\" \n\ .align 2 \n\ .globl " #function " \n\ .type " #function ", @function \n\ " #function ": \n\ li %r12," #offset " \n\ - b __Clib2Call@plt \n\ + b __Clib4Call@plt \n\ .size " #function ", .-" #function) #elif !defined(__PIC__) -#define Clib2Call2(function, offset) \ +#define Clib4Call2(function, offset) \ asm(".section \".text\" \n\ .align 2 \n\ .globl " #function " \n\ .type " #function ", @function \n\ " #function ": \n\ li %r12," #offset " \n\ - b __Clib2Call \n\ + b __Clib4Call \n\ .size " #function ", .-" #function) #endif -#define Clib2Call(x...) Clib2Call2(x) +#define Clib4Call(x...) Clib4Call2(x) #endif \ No newline at end of file diff --git a/library/shared_library/stubs.c b/library/shared_library/stubs.c index 9b61b06d..d565036a 100644 --- a/library/shared_library/stubs.c +++ b/library/shared_library/stubs.c @@ -7,1084 +7,1084 @@ asm(".section \".text\" \n\ .align 2 \n\ - .globl __Clib2Call \n\ - .type __Clib2Call, @function \n\ -__Clib2Call: \n\ - lis %r11, IClib2@ha \n\ - lwz %r0, IClib2@l(%r11) \n\ + .globl __Clib4Call \n\ + .type __Clib4Call, @function \n\ +__Clib4Call: \n\ + lis %r11, IClib4@ha \n\ + lwz %r0, IClib4@l(%r11) \n\ lwzx %r11, %r12, %r0 \n\ mtctr %r11 \n\ bctr \n\ - .size __Clib2Call, .-__Clib2Call"); + .size __Clib4Call, .-__Clib4Call"); -Clib2Call(__getClib2, 80); -//Clib2Call(__getGlobalClib2, 84); -Clib2Call(__translate_amiga_to_unix_path_name, 88); -Clib2Call(__translate_unix_to_amiga_path_name, 92); -//Clib2Call(__restore_path_name, 96); -Clib2Call(__print_termination_message, 100); +Clib4Call(__getClib4, 80); +//Clib4Call(__getGlobalClib4, 84); +Clib4Call(__translate_amiga_to_unix_path_name, 88); +Clib4Call(__translate_unix_to_amiga_path_name, 92); +//Clib4Call(__restore_path_name, 96); +Clib4Call(__print_termination_message, 100); /* Functions defined stubs starts here */ -Clib2Call(argz_create, 116); -Clib2Call(argz_create_sep, 120); -Clib2Call(argz_count, 124); -Clib2Call(argz_extract, 128); -Clib2Call(argz_stringify, 132); -Clib2Call(argz_add, 136); -Clib2Call(argz_add_sep, 140); -Clib2Call(argz_append, 144); -Clib2Call(argz_delete, 148); -Clib2Call(argz_insert, 152); -Clib2Call(argz_next, 156); -Clib2Call(argz_replace, 160); -Clib2Call(__assertion_failure, 164); -Clib2Call(cacos, 168); -Clib2Call(cacosf, 172); -Clib2Call(cacosl, 176); -Clib2Call(casin, 180); -Clib2Call(casinf, 184); -Clib2Call(casinl, 188); -Clib2Call(catan, 192); -Clib2Call(catanf, 196); -Clib2Call(catanl, 200); -Clib2Call(ccos, 204); -Clib2Call(ccosf, 208); -Clib2Call(ccosl, 212); -Clib2Call(csin, 216); -Clib2Call(csinf, 220); -Clib2Call(csinl, 224); -Clib2Call(ctan, 228); -Clib2Call(ctanf, 232); -Clib2Call(ctanl, 236); -Clib2Call(cacosh, 240); -Clib2Call(cacoshf, 244); -Clib2Call(cacoshl, 248); -Clib2Call(casinh, 252); -Clib2Call(casinhf, 256); -Clib2Call(casinhl, 260); -Clib2Call(catanh, 264); -Clib2Call(catanhf, 268); -Clib2Call(catanhl, 272); -Clib2Call(ccosh, 276); -Clib2Call(ccoshf, 280); -Clib2Call(ccoshl, 284); -Clib2Call(csinh, 288); -Clib2Call(csinhf, 292); -Clib2Call(csinhl, 296); -Clib2Call(ctanh, 300); -Clib2Call(ctanhf, 304); -Clib2Call(ctanhl, 308); -Clib2Call(cexp, 312); -Clib2Call(cexpf, 316); -Clib2Call(cexpl, 320); -Clib2Call(clog, 324); -Clib2Call(clogf, 328); -Clib2Call(clogl, 332); -Clib2Call(cabs, 336); -Clib2Call(cabsf, 340); -Clib2Call(cabsl, 344); -Clib2Call(cpow, 348); -Clib2Call(cpowf, 352); -Clib2Call(cpowl, 356); -Clib2Call(csqrt, 360); -Clib2Call(csqrtf, 364); -Clib2Call(csqrtl, 368); -Clib2Call(carg, 372); -Clib2Call(cargf, 376); -Clib2Call(cargl, 380); -Clib2Call(conj, 384); -Clib2Call(conjf, 388); -Clib2Call(conjl, 392); -Clib2Call(cproj, 396); -Clib2Call(cprojf, 400); -Clib2Call(cprojl, 404); -Clib2Call(cimag, 408); -Clib2Call(cimagf, 412); -Clib2Call(cimagl, 416); -Clib2Call(creal, 420); -Clib2Call(crealf, 424); -Clib2Call(creall, 428); -Clib2Call(crypt_r, 432); -Clib2Call(isalnum, 436); -Clib2Call(isalpha, 440); -Clib2Call(iscntrl, 444); -Clib2Call(isdigit, 448); -Clib2Call(isgraph, 452); -Clib2Call(islower, 456); -Clib2Call(isprint, 460); -Clib2Call(ispunct, 464); -Clib2Call(isspace, 468); -Clib2Call(isupper, 472); -Clib2Call(isxdigit, 476); -Clib2Call(tolower, 480); -Clib2Call(toupper, 484); -Clib2Call(isblank, 488); -Clib2Call(isascii, 492); -Clib2Call(toascii, 496); -Clib2Call(opendir, 500); -Clib2Call(readdir, 504); -Clib2Call(rewinddir, 508); -Clib2Call(closedir, 512); -Clib2Call(fdopendir, 516); -Clib2Call(alphasort, 520); -Clib2Call(dirfd, 524); -Clib2Call(scandir, 528); -Clib2Call(readdir_r, 532); -Clib2Call(readdir64_r, 536); -Clib2Call(dlclose, 540); -Clib2Call(dlerror, 544); -Clib2Call(dlopen, 548); -Clib2Call(dlsym, 552); -Clib2Call(envz_entry, 556); -Clib2Call(envz_get, 560); -Clib2Call(envz_add, 564); -Clib2Call(envz_merge, 568); -Clib2Call(envz_remove, 572); -Clib2Call(envz_strip, 576); -Clib2Call(warn, 580); -Clib2Call(vwarn, 584); -Clib2Call(warnx, 588); -Clib2Call(vwarnx, 592); -Clib2Call(err, 596); -Clib2Call(verr, 600); -Clib2Call(errx, 604); -Clib2Call(verrx, 608); -Clib2Call(__errno, 612); -Clib2Call(__h_errno, 616); -Clib2Call(open, 620); -Clib2Call(openat, 624); -Clib2Call(creat, 628); -Clib2Call(close, 632); -Clib2Call(read, 636); -Clib2Call(write, 640); -Clib2Call(fcntl, 644); -Clib2Call(fnmatch, 648); -Clib2Call(ftw, 652); -Clib2Call(nftw, 656); -Clib2Call(glob, 660); -Clib2Call(globfree, 664); -Clib2Call(endgrent, 668); -Clib2Call(getgrent, 672); -Clib2Call(getgrgid, 676); -Clib2Call(getgrnam, 680); -Clib2Call(setgrent, 684); -Clib2Call(iconv_open, 688); -Clib2Call(iconv, 692); -Clib2Call(iconv_close, 696); -Clib2Call(getifaddrs, 700); -Clib2Call(freeifaddrs, 704); -Clib2Call(imaxabs, 708); -Clib2Call(imaxdiv, 712); -Clib2Call(strtoimax, 716); -Clib2Call(strtoumax, 720); -Clib2Call(wcstoimax, 724); -Clib2Call(wcstoumax, 728); -Clib2Call(nl_langinfo, 732); -Clib2Call(basename, 736); -Clib2Call(dirname, 740); -Clib2Call(setlocale, 744); -Clib2Call(localeconv, 748); -Clib2Call(memalign, 752); -Clib2Call(acos, 756); -Clib2Call(asin, 760); -Clib2Call(atan, 764); -Clib2Call(atan2, 768); -Clib2Call(ceil, 772); -Clib2Call(cos, 776); -Clib2Call(cosh, 780); -Clib2Call(sincos, 784); -Clib2Call(sincosf, 788); -Clib2Call(sincosl, 792); -Clib2Call(exp10, 796); -Clib2Call(exp10f, 800); -Clib2Call(exp10l, 804); -Clib2Call(exp, 808); -Clib2Call(fabs, 812); -Clib2Call(floor, 816); -Clib2Call(fmod, 820); -Clib2Call(frexp, 824); -Clib2Call(ldexp, 828); -Clib2Call(log, 832); -Clib2Call(log10, 836); -Clib2Call(modf, 840); -Clib2Call(pow, 844); -Clib2Call(pow10, 848); -Clib2Call(pow10f, 852); -Clib2Call(pow10l, 856); -Clib2Call(sin, 860); -Clib2Call(sinh, 864); -Clib2Call(sqrt, 868); -Clib2Call(tan, 872); -Clib2Call(tanh, 876); -Clib2Call(j0, 880); -Clib2Call(y0, 884); -Clib2Call(j0f, 888); -Clib2Call(y0f, 892); -Clib2Call(j1, 896); -Clib2Call(y1, 900); -Clib2Call(j1f, 904); -Clib2Call(y1f, 908); -Clib2Call(jn, 912); -Clib2Call(yn, 916); -Clib2Call(jnf, 920); -Clib2Call(ynf, 924); -Clib2Call(__fpclassify_float, 928); -Clib2Call(__fpclassify_double, 932); -Clib2Call(__fpclassify_long_double, 936); -Clib2Call(__signbit_float, 940); -Clib2Call(__signbit_double, 944); -Clib2Call(__signbit_long_double, 948); -Clib2Call(__signgam, 952); -Clib2Call(acosf, 956); -Clib2Call(asinf, 960); -Clib2Call(atanf, 964); -Clib2Call(atan2f, 968); -Clib2Call(ceilf, 972); -Clib2Call(cosf, 976); -Clib2Call(coshf, 980); -Clib2Call(expf, 984); -Clib2Call(fabsf, 988); -Clib2Call(floorf, 992); -Clib2Call(fmodf, 996); -Clib2Call(frexpf, 1000); -Clib2Call(ldexpf, 1004); -Clib2Call(logf, 1008); -Clib2Call(log10f, 1012); -Clib2Call(modff, 1016); -Clib2Call(powf, 1020); -Clib2Call(sinf, 1024); -Clib2Call(sinhf, 1028); -Clib2Call(sqrtf, 1032); -Clib2Call(tanf, 1036); -Clib2Call(tanhf, 1040); -Clib2Call(acoshf, 1044); -Clib2Call(asinhf, 1048); -Clib2Call(atanhf, 1052); -Clib2Call(cbrtf, 1056); -Clib2Call(copysignf, 1060); -Clib2Call(erfcf, 1064); -Clib2Call(erff, 1068); -Clib2Call(expm1f, 1072); -Clib2Call(fdimf, 1076); -Clib2Call(fmaf, 1080); -Clib2Call(fmaxf, 1084); -Clib2Call(fminf, 1088); -Clib2Call(hypotf, 1092); -Clib2Call(lgammaf, 1096); -Clib2Call(log1pf, 1100); -Clib2Call(logbf, 1104); -Clib2Call(llrintf, 1108); -Clib2Call(lrintf, 1112); -Clib2Call(lroundf, 1116); -Clib2Call(llround, 1120); -Clib2Call(llroundf, 1124); -Clib2Call(nanf, 1128); -Clib2Call(nearbyintf, 1132); -Clib2Call(nextafterf, 1136); -Clib2Call(nexttowardf, 1140); -Clib2Call(remainderf, 1144); -Clib2Call(remquof, 1148); -Clib2Call(rintf, 1152); -Clib2Call(roundf, 1156); -Clib2Call(scalblnf, 1160); -Clib2Call(scalbnf, 1164); -Clib2Call(tgammaf, 1168); -Clib2Call(truncf, 1172); -Clib2Call(ilogbf, 1176); -Clib2Call(finite, 1180); -Clib2Call(acosh, 1184); -Clib2Call(asinh, 1188); -Clib2Call(atanh, 1192); -Clib2Call(cbrt, 1196); -Clib2Call(copysign, 1200); -Clib2Call(erf, 1204); -Clib2Call(erfc, 1208); -Clib2Call(expm1, 1212); -Clib2Call(fdim, 1216); -Clib2Call(fma, 1220); -Clib2Call(fmax, 1224); -Clib2Call(fmin, 1228); -Clib2Call(hypot, 1232); -Clib2Call(lgamma, 1236); -Clib2Call(log1p, 1240); -Clib2Call(logb, 1244); -Clib2Call(llrint, 1248); -Clib2Call(lrint, 1252); -Clib2Call(lround, 1256); -Clib2Call(nan, 1260); -Clib2Call(nearbyint, 1264); -Clib2Call(nexttoward, 1268); -Clib2Call(nextafter, 1272); -Clib2Call(remainder, 1276); -Clib2Call(remquo, 1280); -Clib2Call(rint, 1284); -Clib2Call(round, 1288); -Clib2Call(scalbln, 1292); -Clib2Call(scalbn, 1296); -Clib2Call(tgamma, 1300); -Clib2Call(trunc, 1304); -Clib2Call(ilogb, 1308); -Clib2Call(exp2f, 1312); -Clib2Call(exp2, 1316); -Clib2Call(exp2l, 1320); -Clib2Call(log2, 1324); -Clib2Call(log2f, 1328); -Clib2Call(log2l, 1332); -Clib2Call(acosl, 1336); -Clib2Call(asinl, 1340); -Clib2Call(atanl, 1344); -Clib2Call(atan2l, 1348); -Clib2Call(ceill, 1352); -Clib2Call(cosl, 1356); -Clib2Call(coshl, 1360); -Clib2Call(expl, 1364); -Clib2Call(fabsl, 1368); -Clib2Call(floorl, 1372); -Clib2Call(fmodl, 1376); -Clib2Call(frexpl, 1380); -Clib2Call(ldexpl, 1384); -Clib2Call(logl, 1388); -Clib2Call(log10l, 1392); -Clib2Call(modfl, 1396); -Clib2Call(powl, 1400); -Clib2Call(sinl, 1404); -Clib2Call(sinhl, 1408); -Clib2Call(sqrtl, 1412); -Clib2Call(tanl, 1416); -Clib2Call(tanhl, 1420); -Clib2Call(acoshl, 1424); -Clib2Call(asinhl, 1428); -Clib2Call(atanhl, 1432); -Clib2Call(cbrtl, 1436); -Clib2Call(copysignl, 1440); -Clib2Call(erfcl, 1444); -Clib2Call(erfl, 1448); -Clib2Call(expm1l, 1452); -Clib2Call(fdiml, 1456); -Clib2Call(fmal, 1460); -Clib2Call(fmaxl, 1464); -Clib2Call(fminl, 1468); -Clib2Call(hypotl, 1472); -Clib2Call(lgammal, 1476); -Clib2Call(log1pl, 1480); -Clib2Call(logbl, 1484); -Clib2Call(llrintl, 1488); -Clib2Call(lrintl, 1492); -Clib2Call(llroundl, 1496); -Clib2Call(lroundl, 1500); -Clib2Call(nanl, 1504); -Clib2Call(nearbyintl, 1508); -Clib2Call(nextafterl, 1512); -Clib2Call(nexttowardl, 1516); -Clib2Call(remainderl, 1520); -Clib2Call(remquol, 1524); -Clib2Call(rintl, 1528); -Clib2Call(roundl, 1532); -Clib2Call(scalblnl, 1536); -Clib2Call(scalbnl, 1540); -Clib2Call(tgammal, 1544); -Clib2Call(truncl, 1548); -Clib2Call(ilogbl, 1552); -Clib2Call(gethostbyaddr, 1556); -Clib2Call(gethostbyname, 1560); -Clib2Call(getnetbyaddr, 1564); -Clib2Call(getnetbyname, 1568); -Clib2Call(getprotobyname, 1572); -Clib2Call(getprotobynumber, 1576); -Clib2Call(getservbyname, 1580); -Clib2Call(getservbyport, 1584); -Clib2Call(herror, 1588); -Clib2Call(hstrerror, 1592); -Clib2Call(gethostbyname_r, 1596); -Clib2Call(gethostbyname2_r, 1600); -Clib2Call(gethostbyname2, 1604); -Clib2Call(gethostbyaddr_r, 1608); -Clib2Call(getservbyport_r, 1612); -Clib2Call(getservbyname_r, 1616); -Clib2Call(gai_strerror, 1620); -Clib2Call(getaddrinfo, 1624); -Clib2Call(freeaddrinfo, 1628); -Clib2Call(getnameinfo, 1632); -Clib2Call(catopen, 1636); -Clib2Call(catgets, 1640); -Clib2Call(catclose, 1644); -Clib2Call(poll, 1648); -Clib2Call(endpwent, 1652); -Clib2Call(getpwent, 1656); -Clib2Call(getpwnam, 1660); -Clib2Call(getpwnam_r, 1664); -Clib2Call(getpwuid, 1668); -Clib2Call(getpwuid_r, 1672); -Clib2Call(setpwent, 1676); -Clib2Call(regcomp, 1680); -Clib2Call(regexec, 1684); -Clib2Call(regfree, 1688); -Clib2Call(regerror, 1692); -Clib2Call(__res_state, 1696); -Clib2Call(res_init, 1700); -Clib2Call(res_query, 1704); -Clib2Call(res_querydomain, 1708); -Clib2Call(res_search, 1712); -Clib2Call(res_mkquery, 1716); -Clib2Call(res_send, 1720); -Clib2Call(dn_comp, 1724); -Clib2Call(dn_expand, 1728); -Clib2Call(dn_skipname, 1732); -Clib2Call(hcreate, 1736); -Clib2Call(hdestroy, 1740); -Clib2Call(hsearch, 1744); -Clib2Call(hcreate_r, 1748); -Clib2Call(hdestroy_r, 1752); -Clib2Call(hsearch_r, 1756); -Clib2Call(lfind, 1760); -Clib2Call(lsearch, 1764); -Clib2Call(tdelete, 1768); -Clib2Call(tdestroy, 1772); -Clib2Call(tfind, 1776); -Clib2Call(tsearch, 1780); -Clib2Call(twalk, 1784); -Clib2Call(setjmp, 1788); -Clib2Call(__sigsetjmp, 1792); -Clib2Call(_setjmp, 1796); -Clib2Call(longjmp, 1800); -Clib2Call(_longjmp, 1804); -Clib2Call(siglongjmp, 1808); -Clib2Call(__sigjmp_save, 1812); -Clib2Call(signal, 1816); -Clib2Call(raise, 1820); -Clib2Call(sigmask, 1824); -Clib2Call(sigblock, 1828); -Clib2Call(sigsetmask, 1832); -Clib2Call(sigprocmask, 1836); -Clib2Call(sigismember, 1840); -Clib2Call(sigemptyset, 1844); -Clib2Call(sigfillset, 1848); -Clib2Call(sigdelset, 1852); -Clib2Call(sigaddset, 1856); -Clib2Call(kill, 1860); -Clib2Call(sigaction, 1864); -Clib2Call(perror, 1868); -Clib2Call(fdopen64, 1872); -Clib2Call(fopen64, 1876); -Clib2Call(freopen64, 1880); -Clib2Call(ftello64, 1884); -Clib2Call(fseeko64, 1888); -Clib2Call(fgetpos64, 1892); -Clib2Call(fsetpos64, 1896); -Clib2Call(tmpfile64, 1900); -Clib2Call(fopen, 1904); -Clib2Call(fclose, 1908); -Clib2Call(fflush, 1912); -Clib2Call(freopen, 1916); -Clib2Call(setvbuf, 1920); -Clib2Call(setbuf, 1924); -Clib2Call(fseek, 1928); -Clib2Call(ftell, 1932); -Clib2Call(rewind, 1936); -Clib2Call(fgetpos, 1940); -Clib2Call(fsetpos, 1944); -Clib2Call(fgetc, 1948); -Clib2Call(getc, 1952); -Clib2Call(getchar, 1956); -Clib2Call(ungetc, 1960); -Clib2Call(fputc, 1964); -Clib2Call(putc, 1968); -Clib2Call(putchar, 1972); -Clib2Call(fgets, 1976); -Clib2Call(gets, 1980); -Clib2Call(fscanf, 1984); -Clib2Call(scanf, 1988); -Clib2Call(sscanf, 1992); -Clib2Call(fputs, 1996); -Clib2Call(puts, 2000); -Clib2Call(dprintf, 2004); -Clib2Call(fprintf, 2008); -Clib2Call(printf, 2012); -Clib2Call(sprintf, 2016); -Clib2Call(vdprintf, 2020); -Clib2Call(vfprintf, 2024); -Clib2Call(vprintf, 2028); -Clib2Call(vsprintf, 2032); -Clib2Call(fread, 2036); -Clib2Call(fwrite, 2040); -Clib2Call(feof, 2044); -Clib2Call(ferror, 2048); -Clib2Call(clearerr, 2052); -Clib2Call(rename, 2056); -Clib2Call(remove, 2060); -Clib2Call(tmpfile, 2064); -Clib2Call(tmpnam, 2068); -Clib2Call(tempnam, 2072); -Clib2Call(ctermid, 2076); -Clib2Call(__flush, 2080); -Clib2Call(__unlockfile, 2084); -Clib2Call(getc_unlocked, 2088); -Clib2Call(getchar_unlocked, 2092); -Clib2Call(putc_unlocked, 2096); -Clib2Call(putchar_unlocked, 2100); -Clib2Call(getline, 2104); -Clib2Call(getdelim, 2108); -Clib2Call(fdopen, 2112); -Clib2Call(fileno, 2116); -Clib2Call(asprintf, 2120); -Clib2Call(vsnprintf, 2124); -Clib2Call(pclose, 2128); -Clib2Call(popen, 2132); -Clib2Call(fseeko, 2136); -Clib2Call(ftello, 2140); -Clib2Call(flockfile, 2144); -Clib2Call(funlockfile, 2148); -Clib2Call(ftrylockfile, 2152); -Clib2Call(vasprintf, 2156); -Clib2Call(vfscanf, 2160); -Clib2Call(vsscanf, 2164); -Clib2Call(vscanf, 2168); -Clib2Call(snprintf, 2172); -Clib2Call(_flushlbf, 2176); -Clib2Call(__fsetlocking, 2180); -Clib2Call(__fwriting, 2184); -Clib2Call(__freading, 2188); -Clib2Call(__freadable, 2192); -Clib2Call(__fwritable, 2196); -Clib2Call(__flbf, 2200); -Clib2Call(__fbufsize, 2204); -Clib2Call(__fpending, 2208); -Clib2Call(__fpurge, 2212); -Clib2Call(fpurge, 2216); -Clib2Call(__fseterr, 2220); -Clib2Call(__freadahead, 2224); -Clib2Call(__freadptrinc, 2228); -Clib2Call(__mb_cur_max, 2232); -Clib2Call(__getprogname, 2236); -Clib2Call(mblen, 2240); -Clib2Call(mbtowc, 2244); -Clib2Call(_mbtowc_r, 2248); -Clib2Call(_mbstowcs_r, 2252); -Clib2Call(wctomb, 2256); -Clib2Call(_wctomb_r, 2260); -Clib2Call(mbstowcs, 2264); -Clib2Call(wcstombs, 2268); -Clib2Call(_wcstombs_r, 2272); -Clib2Call(malloc, 2276); -Clib2Call(calloc, 2280); -Clib2Call(free, 2284); -Clib2Call(realloc, 2288); -Clib2Call(valloc, 2292); -Clib2Call(aligned_alloc, 2296); -Clib2Call(posix_memalign, 2300); -Clib2Call(abs, 2304); -Clib2Call(labs, 2308); -Clib2Call(div, 2312); -Clib2Call(ldiv, 2316); -Clib2Call(rand, 2320); -Clib2Call(srand, 2324); -Clib2Call(random, 2328); -Clib2Call(srandom, 2332); -Clib2Call(initstate, 2336); -Clib2Call(setstate, 2340); -Clib2Call(l64a, 2344); -Clib2Call(a64l, 2348); -Clib2Call(setkey, 2352); -Clib2Call(drand48, 2356); -Clib2Call(erand48, 2360); -Clib2Call(lrand48, 2364); -Clib2Call(nrand48, 2368); -Clib2Call(mrand48, 2372); -Clib2Call(jrand48, 2376); -Clib2Call(srand48, 2380); -Clib2Call(seed48, 2384); -Clib2Call(lcong48, 2388); -Clib2Call(system, 2392); -Clib2Call(exit, 2396); -Clib2Call(abort, 2400); -Clib2Call(atexit, 2404); -Clib2Call(getenv, 2408); -Clib2Call(bsearch, 2412); -Clib2Call(qsort, 2416); -Clib2Call(strtod, 2420); -Clib2Call(strtol, 2424); -Clib2Call(strtoul, 2428); -Clib2Call(strtoq, 2432); -Clib2Call(atof, 2436); -Clib2Call(atoi, 2440); -Clib2Call(atol, 2444); -Clib2Call(itoa, 2448); -Clib2Call(lltoa, 2452); -Clib2Call(_exit, 2456); -Clib2Call(rand_r, 2460); -Clib2Call(mktemp, 2464); -Clib2Call(mkstemp, 2468); -Clib2Call(unsetenv, 2472); -Clib2Call(setenv, 2476); -Clib2Call(putenv, 2480); -Clib2Call(mkdtemp, 2484); -Clib2Call(getexecname, 2488); -Clib2Call(strtoll, 2492); -Clib2Call(strtold, 2496); -Clib2Call(strtoull, 2500); -Clib2Call(atoll, 2504); -Clib2Call(llabs, 2508); -Clib2Call(lldiv, 2512); -Clib2Call(strtof, 2516); -Clib2Call(atoff, 2520); -Clib2Call(_Exit, 2524); -Clib2Call(ecvt, 2528); -Clib2Call(fcvt, 2532); -Clib2Call(gcvt, 2536); -Clib2Call(secure_getenv, 2540); -Clib2Call(reallocarray, 2544); -Clib2Call(qsort_r, 2548); -Clib2Call(arc4random, 2552); -Clib2Call(arc4random_buf, 2556); -Clib2Call(arc4random_uniform, 2560); -Clib2Call(arc4random_stir, 2564); -Clib2Call(arc4random_addrandom, 2568); -Clib2Call(strerror, 2572); -Clib2Call(strcat, 2576); -Clib2Call(strncat, 2580); -Clib2Call(strcmp, 2584); -Clib2Call(strncmp, 2588); -Clib2Call(strcpy, 2592); -Clib2Call(strncpy, 2596); -Clib2Call(strnlen, 2600); -Clib2Call(strlen, 2604); -Clib2Call(strchr, 2608); -Clib2Call(strrchr, 2612); -Clib2Call(strspn, 2616); -Clib2Call(strcspn, 2620); -Clib2Call(strpbrk, 2624); -Clib2Call(strtok, 2628); -Clib2Call(strstr, 2632); -Clib2Call(strnstr, 2636); -Clib2Call(strsep, 2640); -Clib2Call(stpcpy, 2644); -Clib2Call(stpncpy, 2648); -Clib2Call(stccpy, 2652); -Clib2Call(strcoll, 2656); -Clib2Call(strxfrm, 2660); -Clib2Call(memmove, 2664); -Clib2Call(memchr, 2668); -Clib2Call(memcmp, 2672); -Clib2Call(memcpy, 2676); -Clib2Call(memset, 2680); -Clib2Call(strerror_r, 2684); -Clib2Call(strdup, 2688); -Clib2Call(strndup, 2692); -Clib2Call(bcopy, 2696); -Clib2Call(bzero, 2700); -Clib2Call(explicit_bzero, 2704); -Clib2Call(bcmp, 2708); -Clib2Call(strlcpy, 2712); -Clib2Call(strlcat, 2716); -Clib2Call(strtok_r, 2720); -Clib2Call(strsignal, 2724); -Clib2Call(memccpy, 2728); -Clib2Call(index, 2732); -Clib2Call(rindex, 2736); -Clib2Call(strverscmp, 2740); -Clib2Call(strchrnul, 2744); -Clib2Call(strcasestr, 2748); -Clib2Call(memmem, 2752); -Clib2Call(memrchr, 2756); -Clib2Call(mempcpy, 2760); -Clib2Call(strcasecmp, 2764); -Clib2Call(strncasecmp, 2768); -Clib2Call(ffs, 2772); -Clib2Call(ffsl, 2776); -Clib2Call(ffsll, 2780); -Clib2Call(tgetent, 2784); -Clib2Call(tgetnum, 2788); -Clib2Call(tgetflag, 2792); -Clib2Call(tgetstr, 2796); -Clib2Call(tputs, 2800); -Clib2Call(tparam, 2804); -Clib2Call(tgoto, 2808); -Clib2Call(tcgetattr, 2812); -Clib2Call(tcsetattr, 2816); -Clib2Call(tcsendbreak, 2820); -Clib2Call(tcdrain, 2824); -Clib2Call(tcflush, 2828); -Clib2Call(tcflow, 2832); -Clib2Call(cfmakeraw, 2836); -Clib2Call(cfgetispeed, 2840); -Clib2Call(cfgetospeed, 2844); -Clib2Call(cfsetispeed, 2848); -Clib2Call(cfsetospeed, 2852); -Clib2Call(clock, 2856); -Clib2Call(time, 2860); -Clib2Call(asctime, 2864); -Clib2Call(ctime, 2868); -Clib2Call(gmtime, 2872); -Clib2Call(localtime, 2876); -Clib2Call(mktime, 2880); -Clib2Call(difftime, 2884); -Clib2Call(strftime, 2888); -Clib2Call(strptime, 2892); -Clib2Call(asctime_r, 2896); -Clib2Call(ctime_r, 2900); -Clib2Call(gmtime_r, 2904); -Clib2Call(localtime_r, 2908); -Clib2Call(tzset, 2912); -Clib2Call(nanosleep, 2916); -Clib2Call(clock_gettime, 2920); -Clib2Call(clock_settime, 2924); -Clib2Call(clock_getres, 2928); -Clib2Call(clock_nanosleep, 2932); -Clib2Call(rdtsc, 2936); -Clib2Call(clock_gettime64, 2940); -Clib2Call(c16rtomb, 2944); -Clib2Call(mbrtoc16, 2948); -Clib2Call(c32rtomb, 2952); -Clib2Call(mbrtoc32, 2956); -Clib2Call(ulimit, 2960); -Clib2Call(__environ, 2964); -Clib2Call(isatty, 2968); -Clib2Call(dup, 2972); -Clib2Call(dup2, 2976); -Clib2Call(lseek, 2980); -Clib2Call(access, 2984); -Clib2Call(chown, 2988); -Clib2Call(fchown, 2992); -Clib2Call(lchown, 2996); -Clib2Call(truncate, 3000); -Clib2Call(ftruncate, 3004); -Clib2Call(getpagesize, 3008); -Clib2Call(ftruncate64, 3012); -Clib2Call(truncate64, 3016); -Clib2Call(lseek64, 3020); -Clib2Call(alarm, 3024); -Clib2Call(ualarm, 3028); -Clib2Call(link, 3032); -Clib2Call(unlink, 3036); -Clib2Call(symlink, 3040); -Clib2Call(readlink, 3044); -Clib2Call(chdir, 3048); -Clib2Call(fchdir, 3052); -Clib2Call(lockf, 3056); -Clib2Call(sleep, 3060); -Clib2Call(usleep, 3064); -Clib2Call(pause, 3068); -Clib2Call(getpid, 3072); -Clib2Call(getppid, 3076); -Clib2Call(getpgrp, 3080); -Clib2Call(tcgetpgrp, 3084); -Clib2Call(tcsetpgrp, 3088); -Clib2Call(realpath, 3092); -Clib2Call(fsync, 3096); -Clib2Call(fdatasync, 3100); -Clib2Call(ttyname, 3104); -Clib2Call(ttyname_r, 3108); -Clib2Call(execl, 3112); -Clib2Call(execle, 3116); -Clib2Call(execlp, 3120); -Clib2Call(execv, 3124); -Clib2Call(execve, 3128); -Clib2Call(execvp, 3132); -Clib2Call(encrypt, 3136); -Clib2Call(spawnv, 3140); -Clib2Call(spawnvp, 3144); -Clib2Call(sysconf, 3148); -Clib2Call(enableUnixPaths, 3152); -Clib2Call(disableUnixPaths, 3156); -Clib2Call(enableAltivec, 3160); -Clib2Call(disableAltivec, 3164); -Clib2Call(enableOptimizedFunctions, 3168); -Clib2Call(disableOptimizedFunctions, 3172); -Clib2Call(getcwd, 3176); -Clib2Call(getwd, 3180); -Clib2Call(get_current_dir_name, 3184); -Clib2Call(gethostid, 3188); -Clib2Call(gethostname, 3192); -Clib2Call(getdomainname, 3196); -Clib2Call(setdomainname, 3200); -Clib2Call(getlogin, 3204); -Clib2Call(getlogin_r, 3208); -Clib2Call(crypt, 3212); -Clib2Call(getegid, 3216); -Clib2Call(geteuid, 3220); -Clib2Call(getgid, 3224); -Clib2Call(getgroups, 3228); -Clib2Call(getpass, 3232); -Clib2Call(getuid, 3236); -Clib2Call(initgroups, 3240); -Clib2Call(setegid, 3244); -Clib2Call(seteuid, 3248); -Clib2Call(setgid, 3252); -Clib2Call(setgroups, 3256); -Clib2Call(setregid, 3260); -Clib2Call(setreuid, 3264); -Clib2Call(setsid, 3268); -Clib2Call(setuid, 3272); -Clib2Call(setlogin, 3276); -Clib2Call(pathconf, 3280); -Clib2Call(fpathconf, 3284); -Clib2Call(pipe, 3288); -Clib2Call(pipe2, 3292); -Clib2Call(pread, 3296); -Clib2Call(pwrite, 3300); -Clib2Call(pread64, 3304); -Clib2Call(pwrite64, 3308); -Clib2Call(utime, 3312); -Clib2Call(btowc, 3316); -Clib2Call(wctob, 3320); -Clib2Call(wcscat, 3324); -Clib2Call(wcsncat, 3328); -Clib2Call(wcscmp, 3332); -Clib2Call(wcsncmp, 3336); -Clib2Call(wcscpy, 3340); -Clib2Call(wcsncpy, 3344); -Clib2Call(wcslen, 3348); -Clib2Call(wcschr, 3352); -Clib2Call(wcsspn, 3356); -Clib2Call(wcspbrk, 3360); -Clib2Call(wcstok, 3364); -Clib2Call(wcsstr, 3368); -Clib2Call(wcswidth, 3372); -Clib2Call(wcwidth, 3376); -Clib2Call(wcstod, 3380); -Clib2Call(wcstol, 3384); -Clib2Call(wcstoul, 3388); -Clib2Call(wcstof, 3392); -Clib2Call(wscoll, 3396); -Clib2Call(wcsxfrm, 3400); -Clib2Call(wmemchr, 3404); -Clib2Call(wmemcmp, 3408); -Clib2Call(wmemcpy, 3412); -Clib2Call(wmemmove, 3416); -Clib2Call(wmemset, 3420); -Clib2Call(fwide, 3424); -Clib2Call(fgetwc, 3428); -Clib2Call(getwc, 3432); -Clib2Call(getwchar, 3436); -Clib2Call(ungetwc, 3440); -Clib2Call(fgetws, 3444); -Clib2Call(fwscanf, 3448); -Clib2Call(swscanf, 3452); -Clib2Call(vfwscanf, 3456); -Clib2Call(vswscanf, 3460); -Clib2Call(vwscanf, 3464); -Clib2Call(wscanf, 3468); -Clib2Call(fputwc, 3472); -Clib2Call(putwc, 3476); -Clib2Call(putwchar, 3480); -Clib2Call(fputws, 3484); -Clib2Call(fwprintf, 3488); -Clib2Call(swprintf, 3492); -Clib2Call(vfwprintf, 3496); -Clib2Call(vswprintf, 3500); -Clib2Call(vwprintf, 3504); -Clib2Call(wprintf, 3508); -Clib2Call(wcsftime, 3512); -Clib2Call(mbrlen, 3516); -Clib2Call(mbrtowc, 3520); -Clib2Call(mbsinit, 3524); -Clib2Call(mbsrtowcs, 3528); -Clib2Call(wcrtomb, 3532); -Clib2Call(wcscoll, 3536); -Clib2Call(wcscspn, 3540); -Clib2Call(wcsrchr, 3544); -Clib2Call(wcsrtombs, 3548); -Clib2Call(wcstoll, 3552); -Clib2Call(wcstoull, 3556); -Clib2Call(wcstold, 3560); -Clib2Call(mbsnrtowcs, 3564); -Clib2Call(wcsnrtombs, 3568); -Clib2Call(wcsdup, 3572); -Clib2Call(wcsnlen, 3576); -Clib2Call(wcpcpy, 3580); -Clib2Call(wcpncpy, 3584); -Clib2Call(wcscasecmp, 3588); -Clib2Call(wcscasecmp_l, 3592); -Clib2Call(wcsncasecmp, 3596); -Clib2Call(wcsncasecmp_l, 3600); -Clib2Call(wcscoll_l, 3604); -Clib2Call(wcsxfrm_l, 3608); -Clib2Call(iswalnum, 3612); -Clib2Call(iswalpha, 3616); -Clib2Call(iswcntrl, 3620); -Clib2Call(iswdigit, 3624); -Clib2Call(iswxdigit, 3628); -Clib2Call(iswgraph, 3632); -Clib2Call(iswpunct, 3636); -Clib2Call(iswprint, 3640); -Clib2Call(iswlower, 3644); -Clib2Call(iswupper, 3648); -Clib2Call(iswspace, 3652); -Clib2Call(iswblank, 3656); -Clib2Call(towlower, 3660); -Clib2Call(towupper, 3664); -Clib2Call(wctype, 3668); -Clib2Call(iswctype, 3672); -Clib2Call(wctrans, 3676); -Clib2Call(towctrans, 3680); -Clib2Call(inet_addr, 3684); -Clib2Call(inet_aton, 3688); -Clib2Call(inet_lnaof, 3692); -Clib2Call(inet_makeaddr, 3696); -Clib2Call(inet_netof, 3700); -Clib2Call(inet_network, 3704); -Clib2Call(inet_ntoa, 3708); -Clib2Call(inet_ntop, 3712); -Clib2Call(inet_pton, 3716); -Clib2Call(ns_get16, 3720); -Clib2Call(ns_get32, 3724); -Clib2Call(ns_put16, 3728); -Clib2Call(ns_put32, 3732); -Clib2Call(ns_initparse, 3736); -Clib2Call(ns_parserr, 3740); -Clib2Call(ns_skiprr, 3744); -Clib2Call(ns_name_uncompress, 3748); -Clib2Call(if_nametoindex, 3752); -Clib2Call(if_indextoname, 3756); -Clib2Call(bindresvport, 3760); -Clib2Call(bindresvport6, 3764); -Clib2Call(bswap16, 3768); -Clib2Call(bswap24, 3772); -Clib2Call(bswap32, 3776); -Clib2Call(bswap64, 3780); -Clib2Call(swab, 3784); -Clib2Call(swab24, 3788); -Clib2Call(swab32, 3792); -Clib2Call(swab64, 3796); -Clib2Call(flock, 3800); -Clib2Call(ioctl, 3804); -Clib2Call(ftok, 3808); -Clib2Call(mmap, 3812); -Clib2Call(munmap, 3816); -Clib2Call(msync, 3820); -Clib2Call(statfs, 3824); -Clib2Call(fstatfs, 3828); -Clib2Call(_msgctl, 3832); -Clib2Call(_msgget, 3836); -Clib2Call(_msgrcv, 3840); -Clib2Call(_msgsnd, 3844); -Clib2Call(_msgsnap, 3848); -Clib2Call(_msgids, 3852); -Clib2Call(getrlimit, 3856); -Clib2Call(setrlimit, 3860); -Clib2Call(getrusage, 3864); -Clib2Call(select, 3868); -Clib2Call(waitselect, 3872); -Clib2Call(_semctl, 3876); -Clib2Call(_semget, 3880); -Clib2Call(_semop, 3884); -Clib2Call(_semids, 3888); -Clib2Call(_semtimedop, 3892); -Clib2Call(_shmat, 3896); -Clib2Call(_shmctl, 3900); -Clib2Call(_shmdt, 3904); -Clib2Call(_shmget, 3908); -Clib2Call(_shmids, 3912); -Clib2Call(accept, 3916); -Clib2Call(bind, 3920); -Clib2Call(connect, 3924); -Clib2Call(getpeername, 3928); -Clib2Call(getsockname, 3932); -Clib2Call(getsockopt, 3936); -Clib2Call(listen, 3940); -Clib2Call(recv, 3944); -Clib2Call(recvfrom, 3948); -Clib2Call(recvmsg, 3952); -Clib2Call(send, 3956); -Clib2Call(sendmsg, 3960); -Clib2Call(sendto, 3964); -Clib2Call(setsockopt, 3968); -Clib2Call(shutdown, 3972); -Clib2Call(socket, 3976); -Clib2Call(socketpair, 3980); -Clib2Call(stat, 3984); -Clib2Call(fstat, 3988); -Clib2Call(lstat, 3992); -Clib2Call(chmod, 3996); -Clib2Call(fchmod, 4000); -Clib2Call(mkdir, 4004); -Clib2Call(rmdir, 4008); -Clib2Call(umask, 4012); -Clib2Call(statvfs, 4016); -Clib2Call(fstatvfs, 4020); -Clib2Call(closelog, 4024); -Clib2Call(openlog, 4028); -Clib2Call(setlogmask, 4032); -Clib2Call(syslog, 4036); -Clib2Call(vsyslog, 4040); -Clib2Call(sysinfo, 4044); -Clib2Call(gettimeofday, 4048); -Clib2Call(settimeofday, 4052); -Clib2Call(utimes, 4056); -Clib2Call(getitimer, 4060); -Clib2Call(setitimer, 4064); -Clib2Call(ftime, 4068); -Clib2Call(times, 4072); -Clib2Call(readv, 4076); -Clib2Call(writev, 4080); -Clib2Call(uname, 4084); +Clib4Call(argz_create, 116); +Clib4Call(argz_create_sep, 120); +Clib4Call(argz_count, 124); +Clib4Call(argz_extract, 128); +Clib4Call(argz_stringify, 132); +Clib4Call(argz_add, 136); +Clib4Call(argz_add_sep, 140); +Clib4Call(argz_append, 144); +Clib4Call(argz_delete, 148); +Clib4Call(argz_insert, 152); +Clib4Call(argz_next, 156); +Clib4Call(argz_replace, 160); +Clib4Call(__assertion_failure, 164); +Clib4Call(cacos, 168); +Clib4Call(cacosf, 172); +Clib4Call(cacosl, 176); +Clib4Call(casin, 180); +Clib4Call(casinf, 184); +Clib4Call(casinl, 188); +Clib4Call(catan, 192); +Clib4Call(catanf, 196); +Clib4Call(catanl, 200); +Clib4Call(ccos, 204); +Clib4Call(ccosf, 208); +Clib4Call(ccosl, 212); +Clib4Call(csin, 216); +Clib4Call(csinf, 220); +Clib4Call(csinl, 224); +Clib4Call(ctan, 228); +Clib4Call(ctanf, 232); +Clib4Call(ctanl, 236); +Clib4Call(cacosh, 240); +Clib4Call(cacoshf, 244); +Clib4Call(cacoshl, 248); +Clib4Call(casinh, 252); +Clib4Call(casinhf, 256); +Clib4Call(casinhl, 260); +Clib4Call(catanh, 264); +Clib4Call(catanhf, 268); +Clib4Call(catanhl, 272); +Clib4Call(ccosh, 276); +Clib4Call(ccoshf, 280); +Clib4Call(ccoshl, 284); +Clib4Call(csinh, 288); +Clib4Call(csinhf, 292); +Clib4Call(csinhl, 296); +Clib4Call(ctanh, 300); +Clib4Call(ctanhf, 304); +Clib4Call(ctanhl, 308); +Clib4Call(cexp, 312); +Clib4Call(cexpf, 316); +Clib4Call(cexpl, 320); +Clib4Call(clog, 324); +Clib4Call(clogf, 328); +Clib4Call(clogl, 332); +Clib4Call(cabs, 336); +Clib4Call(cabsf, 340); +Clib4Call(cabsl, 344); +Clib4Call(cpow, 348); +Clib4Call(cpowf, 352); +Clib4Call(cpowl, 356); +Clib4Call(csqrt, 360); +Clib4Call(csqrtf, 364); +Clib4Call(csqrtl, 368); +Clib4Call(carg, 372); +Clib4Call(cargf, 376); +Clib4Call(cargl, 380); +Clib4Call(conj, 384); +Clib4Call(conjf, 388); +Clib4Call(conjl, 392); +Clib4Call(cproj, 396); +Clib4Call(cprojf, 400); +Clib4Call(cprojl, 404); +Clib4Call(cimag, 408); +Clib4Call(cimagf, 412); +Clib4Call(cimagl, 416); +Clib4Call(creal, 420); +Clib4Call(crealf, 424); +Clib4Call(creall, 428); +Clib4Call(crypt_r, 432); +Clib4Call(isalnum, 436); +Clib4Call(isalpha, 440); +Clib4Call(iscntrl, 444); +Clib4Call(isdigit, 448); +Clib4Call(isgraph, 452); +Clib4Call(islower, 456); +Clib4Call(isprint, 460); +Clib4Call(ispunct, 464); +Clib4Call(isspace, 468); +Clib4Call(isupper, 472); +Clib4Call(isxdigit, 476); +Clib4Call(tolower, 480); +Clib4Call(toupper, 484); +Clib4Call(isblank, 488); +Clib4Call(isascii, 492); +Clib4Call(toascii, 496); +Clib4Call(opendir, 500); +Clib4Call(readdir, 504); +Clib4Call(rewinddir, 508); +Clib4Call(closedir, 512); +Clib4Call(fdopendir, 516); +Clib4Call(alphasort, 520); +Clib4Call(dirfd, 524); +Clib4Call(scandir, 528); +Clib4Call(readdir_r, 532); +Clib4Call(readdir64_r, 536); +Clib4Call(dlclose, 540); +Clib4Call(dlerror, 544); +Clib4Call(dlopen, 548); +Clib4Call(dlsym, 552); +Clib4Call(envz_entry, 556); +Clib4Call(envz_get, 560); +Clib4Call(envz_add, 564); +Clib4Call(envz_merge, 568); +Clib4Call(envz_remove, 572); +Clib4Call(envz_strip, 576); +Clib4Call(warn, 580); +Clib4Call(vwarn, 584); +Clib4Call(warnx, 588); +Clib4Call(vwarnx, 592); +Clib4Call(err, 596); +Clib4Call(verr, 600); +Clib4Call(errx, 604); +Clib4Call(verrx, 608); +Clib4Call(__errno, 612); +Clib4Call(__h_errno, 616); +Clib4Call(open, 620); +Clib4Call(openat, 624); +Clib4Call(creat, 628); +Clib4Call(close, 632); +Clib4Call(read, 636); +Clib4Call(write, 640); +Clib4Call(fcntl, 644); +Clib4Call(fnmatch, 648); +Clib4Call(ftw, 652); +Clib4Call(nftw, 656); +Clib4Call(glob, 660); +Clib4Call(globfree, 664); +Clib4Call(endgrent, 668); +Clib4Call(getgrent, 672); +Clib4Call(getgrgid, 676); +Clib4Call(getgrnam, 680); +Clib4Call(setgrent, 684); +Clib4Call(iconv_open, 688); +Clib4Call(iconv, 692); +Clib4Call(iconv_close, 696); +Clib4Call(getifaddrs, 700); +Clib4Call(freeifaddrs, 704); +Clib4Call(imaxabs, 708); +Clib4Call(imaxdiv, 712); +Clib4Call(strtoimax, 716); +Clib4Call(strtoumax, 720); +Clib4Call(wcstoimax, 724); +Clib4Call(wcstoumax, 728); +Clib4Call(nl_langinfo, 732); +Clib4Call(basename, 736); +Clib4Call(dirname, 740); +Clib4Call(setlocale, 744); +Clib4Call(localeconv, 748); +Clib4Call(memalign, 752); +Clib4Call(acos, 756); +Clib4Call(asin, 760); +Clib4Call(atan, 764); +Clib4Call(atan2, 768); +Clib4Call(ceil, 772); +Clib4Call(cos, 776); +Clib4Call(cosh, 780); +Clib4Call(sincos, 784); +Clib4Call(sincosf, 788); +Clib4Call(sincosl, 792); +Clib4Call(exp10, 796); +Clib4Call(exp10f, 800); +Clib4Call(exp10l, 804); +Clib4Call(exp, 808); +Clib4Call(fabs, 812); +Clib4Call(floor, 816); +Clib4Call(fmod, 820); +Clib4Call(frexp, 824); +Clib4Call(ldexp, 828); +Clib4Call(log, 832); +Clib4Call(log10, 836); +Clib4Call(modf, 840); +Clib4Call(pow, 844); +Clib4Call(pow10, 848); +Clib4Call(pow10f, 852); +Clib4Call(pow10l, 856); +Clib4Call(sin, 860); +Clib4Call(sinh, 864); +Clib4Call(sqrt, 868); +Clib4Call(tan, 872); +Clib4Call(tanh, 876); +Clib4Call(j0, 880); +Clib4Call(y0, 884); +Clib4Call(j0f, 888); +Clib4Call(y0f, 892); +Clib4Call(j1, 896); +Clib4Call(y1, 900); +Clib4Call(j1f, 904); +Clib4Call(y1f, 908); +Clib4Call(jn, 912); +Clib4Call(yn, 916); +Clib4Call(jnf, 920); +Clib4Call(ynf, 924); +Clib4Call(__fpclassify_float, 928); +Clib4Call(__fpclassify_double, 932); +Clib4Call(__fpclassify_long_double, 936); +Clib4Call(__signbit_float, 940); +Clib4Call(__signbit_double, 944); +Clib4Call(__signbit_long_double, 948); +Clib4Call(__signgam, 952); +Clib4Call(acosf, 956); +Clib4Call(asinf, 960); +Clib4Call(atanf, 964); +Clib4Call(atan2f, 968); +Clib4Call(ceilf, 972); +Clib4Call(cosf, 976); +Clib4Call(coshf, 980); +Clib4Call(expf, 984); +Clib4Call(fabsf, 988); +Clib4Call(floorf, 992); +Clib4Call(fmodf, 996); +Clib4Call(frexpf, 1000); +Clib4Call(ldexpf, 1004); +Clib4Call(logf, 1008); +Clib4Call(log10f, 1012); +Clib4Call(modff, 1016); +Clib4Call(powf, 1020); +Clib4Call(sinf, 1024); +Clib4Call(sinhf, 1028); +Clib4Call(sqrtf, 1032); +Clib4Call(tanf, 1036); +Clib4Call(tanhf, 1040); +Clib4Call(acoshf, 1044); +Clib4Call(asinhf, 1048); +Clib4Call(atanhf, 1052); +Clib4Call(cbrtf, 1056); +Clib4Call(copysignf, 1060); +Clib4Call(erfcf, 1064); +Clib4Call(erff, 1068); +Clib4Call(expm1f, 1072); +Clib4Call(fdimf, 1076); +Clib4Call(fmaf, 1080); +Clib4Call(fmaxf, 1084); +Clib4Call(fminf, 1088); +Clib4Call(hypotf, 1092); +Clib4Call(lgammaf, 1096); +Clib4Call(log1pf, 1100); +Clib4Call(logbf, 1104); +Clib4Call(llrintf, 1108); +Clib4Call(lrintf, 1112); +Clib4Call(lroundf, 1116); +Clib4Call(llround, 1120); +Clib4Call(llroundf, 1124); +Clib4Call(nanf, 1128); +Clib4Call(nearbyintf, 1132); +Clib4Call(nextafterf, 1136); +Clib4Call(nexttowardf, 1140); +Clib4Call(remainderf, 1144); +Clib4Call(remquof, 1148); +Clib4Call(rintf, 1152); +Clib4Call(roundf, 1156); +Clib4Call(scalblnf, 1160); +Clib4Call(scalbnf, 1164); +Clib4Call(tgammaf, 1168); +Clib4Call(truncf, 1172); +Clib4Call(ilogbf, 1176); +Clib4Call(finite, 1180); +Clib4Call(acosh, 1184); +Clib4Call(asinh, 1188); +Clib4Call(atanh, 1192); +Clib4Call(cbrt, 1196); +Clib4Call(copysign, 1200); +Clib4Call(erf, 1204); +Clib4Call(erfc, 1208); +Clib4Call(expm1, 1212); +Clib4Call(fdim, 1216); +Clib4Call(fma, 1220); +Clib4Call(fmax, 1224); +Clib4Call(fmin, 1228); +Clib4Call(hypot, 1232); +Clib4Call(lgamma, 1236); +Clib4Call(log1p, 1240); +Clib4Call(logb, 1244); +Clib4Call(llrint, 1248); +Clib4Call(lrint, 1252); +Clib4Call(lround, 1256); +Clib4Call(nan, 1260); +Clib4Call(nearbyint, 1264); +Clib4Call(nexttoward, 1268); +Clib4Call(nextafter, 1272); +Clib4Call(remainder, 1276); +Clib4Call(remquo, 1280); +Clib4Call(rint, 1284); +Clib4Call(round, 1288); +Clib4Call(scalbln, 1292); +Clib4Call(scalbn, 1296); +Clib4Call(tgamma, 1300); +Clib4Call(trunc, 1304); +Clib4Call(ilogb, 1308); +Clib4Call(exp2f, 1312); +Clib4Call(exp2, 1316); +Clib4Call(exp2l, 1320); +Clib4Call(log2, 1324); +Clib4Call(log2f, 1328); +Clib4Call(log2l, 1332); +Clib4Call(acosl, 1336); +Clib4Call(asinl, 1340); +Clib4Call(atanl, 1344); +Clib4Call(atan2l, 1348); +Clib4Call(ceill, 1352); +Clib4Call(cosl, 1356); +Clib4Call(coshl, 1360); +Clib4Call(expl, 1364); +Clib4Call(fabsl, 1368); +Clib4Call(floorl, 1372); +Clib4Call(fmodl, 1376); +Clib4Call(frexpl, 1380); +Clib4Call(ldexpl, 1384); +Clib4Call(logl, 1388); +Clib4Call(log10l, 1392); +Clib4Call(modfl, 1396); +Clib4Call(powl, 1400); +Clib4Call(sinl, 1404); +Clib4Call(sinhl, 1408); +Clib4Call(sqrtl, 1412); +Clib4Call(tanl, 1416); +Clib4Call(tanhl, 1420); +Clib4Call(acoshl, 1424); +Clib4Call(asinhl, 1428); +Clib4Call(atanhl, 1432); +Clib4Call(cbrtl, 1436); +Clib4Call(copysignl, 1440); +Clib4Call(erfcl, 1444); +Clib4Call(erfl, 1448); +Clib4Call(expm1l, 1452); +Clib4Call(fdiml, 1456); +Clib4Call(fmal, 1460); +Clib4Call(fmaxl, 1464); +Clib4Call(fminl, 1468); +Clib4Call(hypotl, 1472); +Clib4Call(lgammal, 1476); +Clib4Call(log1pl, 1480); +Clib4Call(logbl, 1484); +Clib4Call(llrintl, 1488); +Clib4Call(lrintl, 1492); +Clib4Call(llroundl, 1496); +Clib4Call(lroundl, 1500); +Clib4Call(nanl, 1504); +Clib4Call(nearbyintl, 1508); +Clib4Call(nextafterl, 1512); +Clib4Call(nexttowardl, 1516); +Clib4Call(remainderl, 1520); +Clib4Call(remquol, 1524); +Clib4Call(rintl, 1528); +Clib4Call(roundl, 1532); +Clib4Call(scalblnl, 1536); +Clib4Call(scalbnl, 1540); +Clib4Call(tgammal, 1544); +Clib4Call(truncl, 1548); +Clib4Call(ilogbl, 1552); +Clib4Call(gethostbyaddr, 1556); +Clib4Call(gethostbyname, 1560); +Clib4Call(getnetbyaddr, 1564); +Clib4Call(getnetbyname, 1568); +Clib4Call(getprotobyname, 1572); +Clib4Call(getprotobynumber, 1576); +Clib4Call(getservbyname, 1580); +Clib4Call(getservbyport, 1584); +Clib4Call(herror, 1588); +Clib4Call(hstrerror, 1592); +Clib4Call(gethostbyname_r, 1596); +Clib4Call(gethostbyname2_r, 1600); +Clib4Call(gethostbyname2, 1604); +Clib4Call(gethostbyaddr_r, 1608); +Clib4Call(getservbyport_r, 1612); +Clib4Call(getservbyname_r, 1616); +Clib4Call(gai_strerror, 1620); +Clib4Call(getaddrinfo, 1624); +Clib4Call(freeaddrinfo, 1628); +Clib4Call(getnameinfo, 1632); +Clib4Call(catopen, 1636); +Clib4Call(catgets, 1640); +Clib4Call(catclose, 1644); +Clib4Call(poll, 1648); +Clib4Call(endpwent, 1652); +Clib4Call(getpwent, 1656); +Clib4Call(getpwnam, 1660); +Clib4Call(getpwnam_r, 1664); +Clib4Call(getpwuid, 1668); +Clib4Call(getpwuid_r, 1672); +Clib4Call(setpwent, 1676); +Clib4Call(regcomp, 1680); +Clib4Call(regexec, 1684); +Clib4Call(regfree, 1688); +Clib4Call(regerror, 1692); +Clib4Call(__res_state, 1696); +Clib4Call(res_init, 1700); +Clib4Call(res_query, 1704); +Clib4Call(res_querydomain, 1708); +Clib4Call(res_search, 1712); +Clib4Call(res_mkquery, 1716); +Clib4Call(res_send, 1720); +Clib4Call(dn_comp, 1724); +Clib4Call(dn_expand, 1728); +Clib4Call(dn_skipname, 1732); +Clib4Call(hcreate, 1736); +Clib4Call(hdestroy, 1740); +Clib4Call(hsearch, 1744); +Clib4Call(hcreate_r, 1748); +Clib4Call(hdestroy_r, 1752); +Clib4Call(hsearch_r, 1756); +Clib4Call(lfind, 1760); +Clib4Call(lsearch, 1764); +Clib4Call(tdelete, 1768); +Clib4Call(tdestroy, 1772); +Clib4Call(tfind, 1776); +Clib4Call(tsearch, 1780); +Clib4Call(twalk, 1784); +Clib4Call(setjmp, 1788); +Clib4Call(__sigsetjmp, 1792); +Clib4Call(_setjmp, 1796); +Clib4Call(longjmp, 1800); +Clib4Call(_longjmp, 1804); +Clib4Call(siglongjmp, 1808); +Clib4Call(__sigjmp_save, 1812); +Clib4Call(signal, 1816); +Clib4Call(raise, 1820); +Clib4Call(sigmask, 1824); +Clib4Call(sigblock, 1828); +Clib4Call(sigsetmask, 1832); +Clib4Call(sigprocmask, 1836); +Clib4Call(sigismember, 1840); +Clib4Call(sigemptyset, 1844); +Clib4Call(sigfillset, 1848); +Clib4Call(sigdelset, 1852); +Clib4Call(sigaddset, 1856); +Clib4Call(kill, 1860); +Clib4Call(sigaction, 1864); +Clib4Call(perror, 1868); +Clib4Call(fdopen64, 1872); +Clib4Call(fopen64, 1876); +Clib4Call(freopen64, 1880); +Clib4Call(ftello64, 1884); +Clib4Call(fseeko64, 1888); +Clib4Call(fgetpos64, 1892); +Clib4Call(fsetpos64, 1896); +Clib4Call(tmpfile64, 1900); +Clib4Call(fopen, 1904); +Clib4Call(fclose, 1908); +Clib4Call(fflush, 1912); +Clib4Call(freopen, 1916); +Clib4Call(setvbuf, 1920); +Clib4Call(setbuf, 1924); +Clib4Call(fseek, 1928); +Clib4Call(ftell, 1932); +Clib4Call(rewind, 1936); +Clib4Call(fgetpos, 1940); +Clib4Call(fsetpos, 1944); +Clib4Call(fgetc, 1948); +Clib4Call(getc, 1952); +Clib4Call(getchar, 1956); +Clib4Call(ungetc, 1960); +Clib4Call(fputc, 1964); +Clib4Call(putc, 1968); +Clib4Call(putchar, 1972); +Clib4Call(fgets, 1976); +Clib4Call(gets, 1980); +Clib4Call(fscanf, 1984); +Clib4Call(scanf, 1988); +Clib4Call(sscanf, 1992); +Clib4Call(fputs, 1996); +Clib4Call(puts, 2000); +Clib4Call(dprintf, 2004); +Clib4Call(fprintf, 2008); +Clib4Call(printf, 2012); +Clib4Call(sprintf, 2016); +Clib4Call(vdprintf, 2020); +Clib4Call(vfprintf, 2024); +Clib4Call(vprintf, 2028); +Clib4Call(vsprintf, 2032); +Clib4Call(fread, 2036); +Clib4Call(fwrite, 2040); +Clib4Call(feof, 2044); +Clib4Call(ferror, 2048); +Clib4Call(clearerr, 2052); +Clib4Call(rename, 2056); +Clib4Call(remove, 2060); +Clib4Call(tmpfile, 2064); +Clib4Call(tmpnam, 2068); +Clib4Call(tempnam, 2072); +Clib4Call(ctermid, 2076); +Clib4Call(__flush, 2080); +Clib4Call(__unlockfile, 2084); +Clib4Call(getc_unlocked, 2088); +Clib4Call(getchar_unlocked, 2092); +Clib4Call(putc_unlocked, 2096); +Clib4Call(putchar_unlocked, 2100); +Clib4Call(getline, 2104); +Clib4Call(getdelim, 2108); +Clib4Call(fdopen, 2112); +Clib4Call(fileno, 2116); +Clib4Call(asprintf, 2120); +Clib4Call(vsnprintf, 2124); +Clib4Call(pclose, 2128); +Clib4Call(popen, 2132); +Clib4Call(fseeko, 2136); +Clib4Call(ftello, 2140); +Clib4Call(flockfile, 2144); +Clib4Call(funlockfile, 2148); +Clib4Call(ftrylockfile, 2152); +Clib4Call(vasprintf, 2156); +Clib4Call(vfscanf, 2160); +Clib4Call(vsscanf, 2164); +Clib4Call(vscanf, 2168); +Clib4Call(snprintf, 2172); +Clib4Call(_flushlbf, 2176); +Clib4Call(__fsetlocking, 2180); +Clib4Call(__fwriting, 2184); +Clib4Call(__freading, 2188); +Clib4Call(__freadable, 2192); +Clib4Call(__fwritable, 2196); +Clib4Call(__flbf, 2200); +Clib4Call(__fbufsize, 2204); +Clib4Call(__fpending, 2208); +Clib4Call(__fpurge, 2212); +Clib4Call(fpurge, 2216); +Clib4Call(__fseterr, 2220); +Clib4Call(__freadahead, 2224); +Clib4Call(__freadptrinc, 2228); +Clib4Call(__mb_cur_max, 2232); +Clib4Call(__getprogname, 2236); +Clib4Call(mblen, 2240); +Clib4Call(mbtowc, 2244); +Clib4Call(_mbtowc_r, 2248); +Clib4Call(_mbstowcs_r, 2252); +Clib4Call(wctomb, 2256); +Clib4Call(_wctomb_r, 2260); +Clib4Call(mbstowcs, 2264); +Clib4Call(wcstombs, 2268); +Clib4Call(_wcstombs_r, 2272); +Clib4Call(malloc, 2276); +Clib4Call(calloc, 2280); +Clib4Call(free, 2284); +Clib4Call(realloc, 2288); +Clib4Call(valloc, 2292); +Clib4Call(aligned_alloc, 2296); +Clib4Call(posix_memalign, 2300); +Clib4Call(abs, 2304); +Clib4Call(labs, 2308); +Clib4Call(div, 2312); +Clib4Call(ldiv, 2316); +Clib4Call(rand, 2320); +Clib4Call(srand, 2324); +Clib4Call(random, 2328); +Clib4Call(srandom, 2332); +Clib4Call(initstate, 2336); +Clib4Call(setstate, 2340); +Clib4Call(l64a, 2344); +Clib4Call(a64l, 2348); +Clib4Call(setkey, 2352); +Clib4Call(drand48, 2356); +Clib4Call(erand48, 2360); +Clib4Call(lrand48, 2364); +Clib4Call(nrand48, 2368); +Clib4Call(mrand48, 2372); +Clib4Call(jrand48, 2376); +Clib4Call(srand48, 2380); +Clib4Call(seed48, 2384); +Clib4Call(lcong48, 2388); +Clib4Call(system, 2392); +Clib4Call(exit, 2396); +Clib4Call(abort, 2400); +Clib4Call(atexit, 2404); +Clib4Call(getenv, 2408); +Clib4Call(bsearch, 2412); +Clib4Call(qsort, 2416); +Clib4Call(strtod, 2420); +Clib4Call(strtol, 2424); +Clib4Call(strtoul, 2428); +Clib4Call(strtoq, 2432); +Clib4Call(atof, 2436); +Clib4Call(atoi, 2440); +Clib4Call(atol, 2444); +Clib4Call(itoa, 2448); +Clib4Call(lltoa, 2452); +Clib4Call(_exit, 2456); +Clib4Call(rand_r, 2460); +Clib4Call(mktemp, 2464); +Clib4Call(mkstemp, 2468); +Clib4Call(unsetenv, 2472); +Clib4Call(setenv, 2476); +Clib4Call(putenv, 2480); +Clib4Call(mkdtemp, 2484); +Clib4Call(getexecname, 2488); +Clib4Call(strtoll, 2492); +Clib4Call(strtold, 2496); +Clib4Call(strtoull, 2500); +Clib4Call(atoll, 2504); +Clib4Call(llabs, 2508); +Clib4Call(lldiv, 2512); +Clib4Call(strtof, 2516); +Clib4Call(atoff, 2520); +Clib4Call(_Exit, 2524); +Clib4Call(ecvt, 2528); +Clib4Call(fcvt, 2532); +Clib4Call(gcvt, 2536); +Clib4Call(secure_getenv, 2540); +Clib4Call(reallocarray, 2544); +Clib4Call(qsort_r, 2548); +Clib4Call(arc4random, 2552); +Clib4Call(arc4random_buf, 2556); +Clib4Call(arc4random_uniform, 2560); +Clib4Call(arc4random_stir, 2564); +Clib4Call(arc4random_addrandom, 2568); +Clib4Call(strerror, 2572); +Clib4Call(strcat, 2576); +Clib4Call(strncat, 2580); +Clib4Call(strcmp, 2584); +Clib4Call(strncmp, 2588); +Clib4Call(strcpy, 2592); +Clib4Call(strncpy, 2596); +Clib4Call(strnlen, 2600); +Clib4Call(strlen, 2604); +Clib4Call(strchr, 2608); +Clib4Call(strrchr, 2612); +Clib4Call(strspn, 2616); +Clib4Call(strcspn, 2620); +Clib4Call(strpbrk, 2624); +Clib4Call(strtok, 2628); +Clib4Call(strstr, 2632); +Clib4Call(strnstr, 2636); +Clib4Call(strsep, 2640); +Clib4Call(stpcpy, 2644); +Clib4Call(stpncpy, 2648); +Clib4Call(stccpy, 2652); +Clib4Call(strcoll, 2656); +Clib4Call(strxfrm, 2660); +Clib4Call(memmove, 2664); +Clib4Call(memchr, 2668); +Clib4Call(memcmp, 2672); +Clib4Call(memcpy, 2676); +Clib4Call(memset, 2680); +Clib4Call(strerror_r, 2684); +Clib4Call(strdup, 2688); +Clib4Call(strndup, 2692); +Clib4Call(bcopy, 2696); +Clib4Call(bzero, 2700); +Clib4Call(explicit_bzero, 2704); +Clib4Call(bcmp, 2708); +Clib4Call(strlcpy, 2712); +Clib4Call(strlcat, 2716); +Clib4Call(strtok_r, 2720); +Clib4Call(strsignal, 2724); +Clib4Call(memccpy, 2728); +Clib4Call(index, 2732); +Clib4Call(rindex, 2736); +Clib4Call(strverscmp, 2740); +Clib4Call(strchrnul, 2744); +Clib4Call(strcasestr, 2748); +Clib4Call(memmem, 2752); +Clib4Call(memrchr, 2756); +Clib4Call(mempcpy, 2760); +Clib4Call(strcasecmp, 2764); +Clib4Call(strncasecmp, 2768); +Clib4Call(ffs, 2772); +Clib4Call(ffsl, 2776); +Clib4Call(ffsll, 2780); +Clib4Call(tgetent, 2784); +Clib4Call(tgetnum, 2788); +Clib4Call(tgetflag, 2792); +Clib4Call(tgetstr, 2796); +Clib4Call(tputs, 2800); +Clib4Call(tparam, 2804); +Clib4Call(tgoto, 2808); +Clib4Call(tcgetattr, 2812); +Clib4Call(tcsetattr, 2816); +Clib4Call(tcsendbreak, 2820); +Clib4Call(tcdrain, 2824); +Clib4Call(tcflush, 2828); +Clib4Call(tcflow, 2832); +Clib4Call(cfmakeraw, 2836); +Clib4Call(cfgetispeed, 2840); +Clib4Call(cfgetospeed, 2844); +Clib4Call(cfsetispeed, 2848); +Clib4Call(cfsetospeed, 2852); +Clib4Call(clock, 2856); +Clib4Call(time, 2860); +Clib4Call(asctime, 2864); +Clib4Call(ctime, 2868); +Clib4Call(gmtime, 2872); +Clib4Call(localtime, 2876); +Clib4Call(mktime, 2880); +Clib4Call(difftime, 2884); +Clib4Call(strftime, 2888); +Clib4Call(strptime, 2892); +Clib4Call(asctime_r, 2896); +Clib4Call(ctime_r, 2900); +Clib4Call(gmtime_r, 2904); +Clib4Call(localtime_r, 2908); +Clib4Call(tzset, 2912); +Clib4Call(nanosleep, 2916); +Clib4Call(clock_gettime, 2920); +Clib4Call(clock_settime, 2924); +Clib4Call(clock_getres, 2928); +Clib4Call(clock_nanosleep, 2932); +Clib4Call(rdtsc, 2936); +Clib4Call(clock_gettime64, 2940); +Clib4Call(c16rtomb, 2944); +Clib4Call(mbrtoc16, 2948); +Clib4Call(c32rtomb, 2952); +Clib4Call(mbrtoc32, 2956); +Clib4Call(ulimit, 2960); +Clib4Call(__environ, 2964); +Clib4Call(isatty, 2968); +Clib4Call(dup, 2972); +Clib4Call(dup2, 2976); +Clib4Call(lseek, 2980); +Clib4Call(access, 2984); +Clib4Call(chown, 2988); +Clib4Call(fchown, 2992); +Clib4Call(lchown, 2996); +Clib4Call(truncate, 3000); +Clib4Call(ftruncate, 3004); +Clib4Call(getpagesize, 3008); +Clib4Call(ftruncate64, 3012); +Clib4Call(truncate64, 3016); +Clib4Call(lseek64, 3020); +Clib4Call(alarm, 3024); +Clib4Call(ualarm, 3028); +Clib4Call(link, 3032); +Clib4Call(unlink, 3036); +Clib4Call(symlink, 3040); +Clib4Call(readlink, 3044); +Clib4Call(chdir, 3048); +Clib4Call(fchdir, 3052); +Clib4Call(lockf, 3056); +Clib4Call(sleep, 3060); +Clib4Call(usleep, 3064); +Clib4Call(pause, 3068); +Clib4Call(getpid, 3072); +Clib4Call(getppid, 3076); +Clib4Call(getpgrp, 3080); +Clib4Call(tcgetpgrp, 3084); +Clib4Call(tcsetpgrp, 3088); +Clib4Call(realpath, 3092); +Clib4Call(fsync, 3096); +Clib4Call(fdatasync, 3100); +Clib4Call(ttyname, 3104); +Clib4Call(ttyname_r, 3108); +Clib4Call(execl, 3112); +Clib4Call(execle, 3116); +Clib4Call(execlp, 3120); +Clib4Call(execv, 3124); +Clib4Call(execve, 3128); +Clib4Call(execvp, 3132); +Clib4Call(encrypt, 3136); +Clib4Call(spawnv, 3140); +Clib4Call(spawnvp, 3144); +Clib4Call(sysconf, 3148); +Clib4Call(enableUnixPaths, 3152); +Clib4Call(disableUnixPaths, 3156); +Clib4Call(enableAltivec, 3160); +Clib4Call(disableAltivec, 3164); +Clib4Call(enableOptimizedFunctions, 3168); +Clib4Call(disableOptimizedFunctions, 3172); +Clib4Call(getcwd, 3176); +Clib4Call(getwd, 3180); +Clib4Call(get_current_dir_name, 3184); +Clib4Call(gethostid, 3188); +Clib4Call(gethostname, 3192); +Clib4Call(getdomainname, 3196); +Clib4Call(setdomainname, 3200); +Clib4Call(getlogin, 3204); +Clib4Call(getlogin_r, 3208); +Clib4Call(crypt, 3212); +Clib4Call(getegid, 3216); +Clib4Call(geteuid, 3220); +Clib4Call(getgid, 3224); +Clib4Call(getgroups, 3228); +Clib4Call(getpass, 3232); +Clib4Call(getuid, 3236); +Clib4Call(initgroups, 3240); +Clib4Call(setegid, 3244); +Clib4Call(seteuid, 3248); +Clib4Call(setgid, 3252); +Clib4Call(setgroups, 3256); +Clib4Call(setregid, 3260); +Clib4Call(setreuid, 3264); +Clib4Call(setsid, 3268); +Clib4Call(setuid, 3272); +Clib4Call(setlogin, 3276); +Clib4Call(pathconf, 3280); +Clib4Call(fpathconf, 3284); +Clib4Call(pipe, 3288); +Clib4Call(pipe2, 3292); +Clib4Call(pread, 3296); +Clib4Call(pwrite, 3300); +Clib4Call(pread64, 3304); +Clib4Call(pwrite64, 3308); +Clib4Call(utime, 3312); +Clib4Call(btowc, 3316); +Clib4Call(wctob, 3320); +Clib4Call(wcscat, 3324); +Clib4Call(wcsncat, 3328); +Clib4Call(wcscmp, 3332); +Clib4Call(wcsncmp, 3336); +Clib4Call(wcscpy, 3340); +Clib4Call(wcsncpy, 3344); +Clib4Call(wcslen, 3348); +Clib4Call(wcschr, 3352); +Clib4Call(wcsspn, 3356); +Clib4Call(wcspbrk, 3360); +Clib4Call(wcstok, 3364); +Clib4Call(wcsstr, 3368); +Clib4Call(wcswidth, 3372); +Clib4Call(wcwidth, 3376); +Clib4Call(wcstod, 3380); +Clib4Call(wcstol, 3384); +Clib4Call(wcstoul, 3388); +Clib4Call(wcstof, 3392); +Clib4Call(wscoll, 3396); +Clib4Call(wcsxfrm, 3400); +Clib4Call(wmemchr, 3404); +Clib4Call(wmemcmp, 3408); +Clib4Call(wmemcpy, 3412); +Clib4Call(wmemmove, 3416); +Clib4Call(wmemset, 3420); +Clib4Call(fwide, 3424); +Clib4Call(fgetwc, 3428); +Clib4Call(getwc, 3432); +Clib4Call(getwchar, 3436); +Clib4Call(ungetwc, 3440); +Clib4Call(fgetws, 3444); +Clib4Call(fwscanf, 3448); +Clib4Call(swscanf, 3452); +Clib4Call(vfwscanf, 3456); +Clib4Call(vswscanf, 3460); +Clib4Call(vwscanf, 3464); +Clib4Call(wscanf, 3468); +Clib4Call(fputwc, 3472); +Clib4Call(putwc, 3476); +Clib4Call(putwchar, 3480); +Clib4Call(fputws, 3484); +Clib4Call(fwprintf, 3488); +Clib4Call(swprintf, 3492); +Clib4Call(vfwprintf, 3496); +Clib4Call(vswprintf, 3500); +Clib4Call(vwprintf, 3504); +Clib4Call(wprintf, 3508); +Clib4Call(wcsftime, 3512); +Clib4Call(mbrlen, 3516); +Clib4Call(mbrtowc, 3520); +Clib4Call(mbsinit, 3524); +Clib4Call(mbsrtowcs, 3528); +Clib4Call(wcrtomb, 3532); +Clib4Call(wcscoll, 3536); +Clib4Call(wcscspn, 3540); +Clib4Call(wcsrchr, 3544); +Clib4Call(wcsrtombs, 3548); +Clib4Call(wcstoll, 3552); +Clib4Call(wcstoull, 3556); +Clib4Call(wcstold, 3560); +Clib4Call(mbsnrtowcs, 3564); +Clib4Call(wcsnrtombs, 3568); +Clib4Call(wcsdup, 3572); +Clib4Call(wcsnlen, 3576); +Clib4Call(wcpcpy, 3580); +Clib4Call(wcpncpy, 3584); +Clib4Call(wcscasecmp, 3588); +Clib4Call(wcscasecmp_l, 3592); +Clib4Call(wcsncasecmp, 3596); +Clib4Call(wcsncasecmp_l, 3600); +Clib4Call(wcscoll_l, 3604); +Clib4Call(wcsxfrm_l, 3608); +Clib4Call(iswalnum, 3612); +Clib4Call(iswalpha, 3616); +Clib4Call(iswcntrl, 3620); +Clib4Call(iswdigit, 3624); +Clib4Call(iswxdigit, 3628); +Clib4Call(iswgraph, 3632); +Clib4Call(iswpunct, 3636); +Clib4Call(iswprint, 3640); +Clib4Call(iswlower, 3644); +Clib4Call(iswupper, 3648); +Clib4Call(iswspace, 3652); +Clib4Call(iswblank, 3656); +Clib4Call(towlower, 3660); +Clib4Call(towupper, 3664); +Clib4Call(wctype, 3668); +Clib4Call(iswctype, 3672); +Clib4Call(wctrans, 3676); +Clib4Call(towctrans, 3680); +Clib4Call(inet_addr, 3684); +Clib4Call(inet_aton, 3688); +Clib4Call(inet_lnaof, 3692); +Clib4Call(inet_makeaddr, 3696); +Clib4Call(inet_netof, 3700); +Clib4Call(inet_network, 3704); +Clib4Call(inet_ntoa, 3708); +Clib4Call(inet_ntop, 3712); +Clib4Call(inet_pton, 3716); +Clib4Call(ns_get16, 3720); +Clib4Call(ns_get32, 3724); +Clib4Call(ns_put16, 3728); +Clib4Call(ns_put32, 3732); +Clib4Call(ns_initparse, 3736); +Clib4Call(ns_parserr, 3740); +Clib4Call(ns_skiprr, 3744); +Clib4Call(ns_name_uncompress, 3748); +Clib4Call(if_nametoindex, 3752); +Clib4Call(if_indextoname, 3756); +Clib4Call(bindresvport, 3760); +Clib4Call(bindresvport6, 3764); +Clib4Call(bswap16, 3768); +Clib4Call(bswap24, 3772); +Clib4Call(bswap32, 3776); +Clib4Call(bswap64, 3780); +Clib4Call(swab, 3784); +Clib4Call(swab24, 3788); +Clib4Call(swab32, 3792); +Clib4Call(swab64, 3796); +Clib4Call(flock, 3800); +Clib4Call(ioctl, 3804); +Clib4Call(ftok, 3808); +Clib4Call(mmap, 3812); +Clib4Call(munmap, 3816); +Clib4Call(msync, 3820); +Clib4Call(statfs, 3824); +Clib4Call(fstatfs, 3828); +Clib4Call(_msgctl, 3832); +Clib4Call(_msgget, 3836); +Clib4Call(_msgrcv, 3840); +Clib4Call(_msgsnd, 3844); +Clib4Call(_msgsnap, 3848); +Clib4Call(_msgids, 3852); +Clib4Call(getrlimit, 3856); +Clib4Call(setrlimit, 3860); +Clib4Call(getrusage, 3864); +Clib4Call(select, 3868); +Clib4Call(waitselect, 3872); +Clib4Call(_semctl, 3876); +Clib4Call(_semget, 3880); +Clib4Call(_semop, 3884); +Clib4Call(_semids, 3888); +Clib4Call(_semtimedop, 3892); +Clib4Call(_shmat, 3896); +Clib4Call(_shmctl, 3900); +Clib4Call(_shmdt, 3904); +Clib4Call(_shmget, 3908); +Clib4Call(_shmids, 3912); +Clib4Call(accept, 3916); +Clib4Call(bind, 3920); +Clib4Call(connect, 3924); +Clib4Call(getpeername, 3928); +Clib4Call(getsockname, 3932); +Clib4Call(getsockopt, 3936); +Clib4Call(listen, 3940); +Clib4Call(recv, 3944); +Clib4Call(recvfrom, 3948); +Clib4Call(recvmsg, 3952); +Clib4Call(send, 3956); +Clib4Call(sendmsg, 3960); +Clib4Call(sendto, 3964); +Clib4Call(setsockopt, 3968); +Clib4Call(shutdown, 3972); +Clib4Call(socket, 3976); +Clib4Call(socketpair, 3980); +Clib4Call(stat, 3984); +Clib4Call(fstat, 3988); +Clib4Call(lstat, 3992); +Clib4Call(chmod, 3996); +Clib4Call(fchmod, 4000); +Clib4Call(mkdir, 4004); +Clib4Call(rmdir, 4008); +Clib4Call(umask, 4012); +Clib4Call(statvfs, 4016); +Clib4Call(fstatvfs, 4020); +Clib4Call(closelog, 4024); +Clib4Call(openlog, 4028); +Clib4Call(setlogmask, 4032); +Clib4Call(syslog, 4036); +Clib4Call(vsyslog, 4040); +Clib4Call(sysinfo, 4044); +Clib4Call(gettimeofday, 4048); +Clib4Call(settimeofday, 4052); +Clib4Call(utimes, 4056); +Clib4Call(getitimer, 4060); +Clib4Call(setitimer, 4064); +Clib4Call(ftime, 4068); +Clib4Call(times, 4072); +Clib4Call(readv, 4076); +Clib4Call(writev, 4080); +Clib4Call(uname, 4084); /* END OF CLIB2 VERSION 1.0 */ /* New function will go below */ -Clib2Call(futimens, 4088); -Clib2Call(utimensat, 4092); -Clib2Call(__isnan, 4096); -Clib2Call(__isnanf, 4100); -Clib2Call(__isnanl, 4104); -Clib2Call(__isinf, 4108); -Clib2Call(__isinff, 4112); -Clib2Call(__isinfl, 4116); -Clib2Call(__isnormal, 4120); -Clib2Call(__isnormalf, 4124); -Clib2Call(__isnormall, 4128); -Clib2Call(__isfinite_double, 4132); -Clib2Call(__isfinite_float, 4136); -Clib2Call(__isfinite_long_double, 4140); -Clib2Call(strtouq, 4144); +Clib4Call(futimens, 4088); +Clib4Call(utimensat, 4092); +Clib4Call(__isnan, 4096); +Clib4Call(__isnanf, 4100); +Clib4Call(__isnanl, 4104); +Clib4Call(__isinf, 4108); +Clib4Call(__isinff, 4112); +Clib4Call(__isinfl, 4116); +Clib4Call(__isnormal, 4120); +Clib4Call(__isnormalf, 4124); +Clib4Call(__isnormall, 4128); +Clib4Call(__isfinite_double, 4132); +Clib4Call(__isfinite_float, 4136); +Clib4Call(__isfinite_long_double, 4140); +Clib4Call(strtouq, 4144); -Clib2Call(gettext, 4148); -Clib2Call(dgettext, 4152); -Clib2Call(dcgettext, 4156); -Clib2Call(ngettext, 4160); -Clib2Call(dngettext, 4164); -Clib2Call(dcngettext, 4168); -Clib2Call(textdomain, 4172); -Clib2Call(bindtextdomain, 4176); -Clib2Call(bind_textdomain_codeset, 4180); +Clib4Call(gettext, 4148); +Clib4Call(dgettext, 4152); +Clib4Call(dcgettext, 4156); +Clib4Call(ngettext, 4160); +Clib4Call(dngettext, 4164); +Clib4Call(dcngettext, 4168); +Clib4Call(textdomain, 4172); +Clib4Call(bindtextdomain, 4176); +Clib4Call(bind_textdomain_codeset, 4180); -Clib2Call(ether_ntoa, 4184); -Clib2Call(ether_aton, 4188); -Clib2Call(ether_ntoa_r, 4192); -Clib2Call(ether_aton_r, 4196); -Clib2Call(ether_line, 4200); -Clib2Call(ether_ntohost, 4204); -Clib2Call(ether_hostton, 4208); +Clib4Call(ether_ntoa, 4184); +Clib4Call(ether_aton, 4188); +Clib4Call(ether_ntoa_r, 4192); +Clib4Call(ether_aton_r, 4196); +Clib4Call(ether_line, 4200); +Clib4Call(ether_ntohost, 4204); +Clib4Call(ether_hostton, 4208); -Clib2Call(getrandom, 4212); -Clib2Call(getentropy, 4216); +Clib4Call(getrandom, 4212); +Clib4Call(getentropy, 4216); -Clib2Call(timegm, 4220); -Clib2Call(stime, 4224); +Clib4Call(timegm, 4220); +Clib4Call(stime, 4224); -Clib2Call(dbm_clearerr, 4228); -Clib2Call(dbm_close, 4232); -Clib2Call(dbm_delete, 4236); -Clib2Call(dbm_error, 4240); -Clib2Call(dbm_fetch, 4244); -Clib2Call(dbm_firstkey, 4248); -Clib2Call(dbm_nextkey, 4252); -Clib2Call(dbm_open, 4256); -Clib2Call(dbm_store, 4260); -Clib2Call(dbm_dirfno, 4264); -Clib2Call(dbopen, 4268); -Clib2Call(mkostemp, 4272); -Clib2Call(mkostemps, 4276); +Clib4Call(dbm_clearerr, 4228); +Clib4Call(dbm_close, 4232); +Clib4Call(dbm_delete, 4236); +Clib4Call(dbm_error, 4240); +Clib4Call(dbm_fetch, 4244); +Clib4Call(dbm_firstkey, 4248); +Clib4Call(dbm_nextkey, 4252); +Clib4Call(dbm_open, 4256); +Clib4Call(dbm_store, 4260); +Clib4Call(dbm_dirfno, 4264); +Clib4Call(dbopen, 4268); +Clib4Call(mkostemp, 4272); +Clib4Call(mkostemps, 4276); -Clib2Call(strtof_l, 4280); -Clib2Call(strtod_l, 4284); +Clib4Call(strtof_l, 4280); +Clib4Call(strtod_l, 4284); -Clib2Call(fpgetround, 4288); -Clib2Call(fpsetround, 4292); -Clib2Call(fpgetmask, 4296); -Clib2Call(fpsetmask, 4300); -Clib2Call(fpgetsticky, 4304); +Clib4Call(fpgetround, 4288); +Clib4Call(fpsetround, 4292); +Clib4Call(fpgetmask, 4296); +Clib4Call(fpsetmask, 4300); +Clib4Call(fpgetsticky, 4304); -Clib2Call(fts_children, 4308); -Clib2Call(fts_close, 4312); -Clib2Call(fts_open, 4316); -Clib2Call(fts_read, 4320); -Clib2Call(fts_set, 4324); +Clib4Call(fts_children, 4308); +Clib4Call(fts_close, 4312); +Clib4Call(fts_open, 4316); +Clib4Call(fts_read, 4320); +Clib4Call(fts_set, 4324); diff --git a/library/shcrtbegin.c b/library/shcrtbegin.c index 0fd295d6..593f2a7c 100755 --- a/library/shcrtbegin.c +++ b/library/shcrtbegin.c @@ -1,5 +1,5 @@ /* - * $Id: shcrtbegin.c,v 1.1 2023-02-18 17:22:03 clib2devs Exp $ + * $Id: shcrtbegin.c,v 1.1 2023-02-18 17:22:03 clib4devs Exp $ */ #include diff --git a/library/shcrtend.c b/library/shcrtend.c index cdd0681d..2ae7b998 100755 --- a/library/shcrtend.c +++ b/library/shcrtend.c @@ -1,5 +1,5 @@ /* - * $Id: shcrtend.c,v 1.1 2023-02-18 19:35:03 clib2devs Exp $ + * $Id: shcrtend.c,v 1.1 2023-02-18 19:35:03 clib4devs Exp $ */ static void (*__CTOR_LIST__[1])(void) __attribute__((used, section(".ctors"))); diff --git a/library/socket/accept.c b/library/socket/accept.c index 84cf96da..dd8bc62b 100644 --- a/library/socket/accept.c +++ b/library/socket/accept.c @@ -1,5 +1,5 @@ /* - * $Id: socket_accept.c,v 1.17 2006-11-16 10:41:15 clib2devs Exp $ + * $Id: socket_accept.c,v 1.17 2006-11-16 10:41:15 clib4devs Exp $ */ #ifndef _SOCKET_HEADERS_H @@ -16,7 +16,7 @@ accept(int sockfd, struct sockaddr *cliaddr, socklen_t *addrlen) { LONG socket_fd; LONG new_socket_fd = -1; BOOL stdio_locked = FALSE; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); @@ -26,14 +26,14 @@ accept(int sockfd, struct sockaddr *cliaddr, socklen_t *addrlen) { DECLARE_SOCKETBASE(); - assert(sockfd >= 0 && sockfd < __clib2->__num_fd); - assert(__clib2->__fd[sockfd] != NULL); - assert(FLAG_IS_SET(__clib2->__fd[sockfd]->fd_Flags, FDF_IN_USE)); - assert(FLAG_IS_SET(__clib2->__fd[sockfd]->fd_Flags, FDF_IS_SOCKET)); + assert(sockfd >= 0 && sockfd < __clib4->__num_fd); + assert(__clib4->__fd[sockfd] != NULL); + assert(FLAG_IS_SET(__clib4->__fd[sockfd]->fd_Flags, FDF_IN_USE)); + assert(FLAG_IS_SET(__clib4->__fd[sockfd]->fd_Flags, FDF_IS_SOCKET)); /* We need to know which parameter to submit to the accept() call first. */ - __stdio_lock(__clib2); + __stdio_lock(__clib4); stdio_locked = TRUE; fd = __get_file_descriptor_socket(sockfd); @@ -45,7 +45,7 @@ accept(int sockfd, struct sockaddr *cliaddr, socklen_t *addrlen) { /* Now let go of the stdio lock, so that the only locking performed will be done inside the accept() call. */ - __stdio_unlock(__clib2); + __stdio_unlock(__clib4); stdio_locked = FALSE; /* Wait for the accept() to complete, then hook up the socket @@ -58,17 +58,17 @@ accept(int sockfd, struct sockaddr *cliaddr, socklen_t *addrlen) { /* OK, back to work: we'll need to manipulate the file descriptor tables. */ - __stdio_lock(__clib2); + __stdio_lock(__clib4); stdio_locked = TRUE; - new_fd_slot_number = __find_vacant_fd_entry(__clib2); + new_fd_slot_number = __find_vacant_fd_entry(__clib4); if (new_fd_slot_number < 0) { - if (__grow_fd_table(__clib2, 0) < 0) { + if (__grow_fd_table(__clib4, 0) < 0) { SHOWMSG("couldn't find a vacant fd slot and no memory to create one"); goto out; } - new_fd_slot_number = __find_vacant_fd_entry(__clib2); + new_fd_slot_number = __find_vacant_fd_entry(__clib4); assert(new_fd_slot_number >= 0); } lock = __create_semaphore(); @@ -77,7 +77,7 @@ accept(int sockfd, struct sockaddr *cliaddr, socklen_t *addrlen) { goto out; } - new_fd = __clib2->__fd[new_fd_slot_number]; + new_fd = __clib4->__fd[new_fd_slot_number]; __initialize_fd(new_fd, __socket_hook_entry, (BPTR) new_socket_fd, FDF_IN_USE | FDF_IS_SOCKET | FDF_READ | FDF_WRITE, lock); @@ -95,7 +95,7 @@ accept(int sockfd, struct sockaddr *cliaddr, socklen_t *addrlen) { } if (stdio_locked) - __stdio_unlock(__clib2); + __stdio_unlock(__clib4); __delete_semaphore(lock); diff --git a/library/socket/bind.c b/library/socket/bind.c index b2c31987..16a59e59 100644 --- a/library/socket/bind.c +++ b/library/socket/bind.c @@ -1,5 +1,5 @@ /* - * $Id: socket_bind.c,v 1.8 2006-11-16 10:41:15 clib2devs Exp $ + * $Id: socket_bind.c,v 1.8 2006-11-16 10:41:15 clib4devs Exp $ */ #ifndef _SOCKET_HEADERS_H @@ -18,7 +18,7 @@ int bind(int sockfd, const struct sockaddr *name, socklen_t namelen) { struct fd *fd; int result = ERROR; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); @@ -36,17 +36,17 @@ bind(int sockfd, const struct sockaddr *name, socklen_t namelen) { goto out; } - assert(sockfd >= 0 && sockfd < __clib2->__num_fd); - assert(__clib2->__fd[sockfd] != NULL); - assert(FLAG_IS_SET(__clib2->__fd[sockfd]->fd_Flags, FDF_IN_USE)); - assert(FLAG_IS_SET(__clib2->__fd[sockfd]->fd_Flags, FDF_IS_SOCKET)); + assert(sockfd >= 0 && sockfd < __clib4->__num_fd); + assert(__clib4->__fd[sockfd] != NULL); + assert(FLAG_IS_SET(__clib4->__fd[sockfd]->fd_Flags, FDF_IN_USE)); + assert(FLAG_IS_SET(__clib4->__fd[sockfd]->fd_Flags, FDF_IS_SOCKET)); fd = __get_file_descriptor_socket(sockfd); if (fd == NULL) goto out; if (((struct sockaddr_un *) name)->sun_family == AF_LOCAL) { - struct Clib2Resource *res = (APTR) OpenResource(RESOURCE_NAME); + struct Clib4Resource *res = (APTR) OpenResource(RESOURCE_NAME); if (res) { const char *socketName = ((struct sockaddr_un *) name)->sun_path; struct sockaddr_in serv_addr; diff --git a/library/socket/bindresvport.c b/library/socket/bindresvport.c index b73881c1..311c3beb 100644 --- a/library/socket/bindresvport.c +++ b/library/socket/bindresvport.c @@ -1,5 +1,5 @@ /* - * $Id: socket_bindresvport.c,v 1.0 2022-04-14 10:41:15 clib2devs Exp $ + * $Id: socket_bindresvport.c,v 1.0 2022-04-14 10:41:15 clib4devs Exp $ */ #ifndef _SOCKET_HEADERS_H diff --git a/library/socket/bindresvport6.c b/library/socket/bindresvport6.c index 092b86da..4022c443 100644 --- a/library/socket/bindresvport6.c +++ b/library/socket/bindresvport6.c @@ -1,5 +1,5 @@ /* - * $Id: socket_bindresvport6.c,v 1.0 2022-04-14 10:41:15 clib2devs Exp $ + * $Id: socket_bindresvport6.c,v 1.0 2022-04-14 10:41:15 clib4devs Exp $ */ #ifndef _SOCKET_HEADERS_H diff --git a/library/socket/closelog.c b/library/socket/closelog.c index 85d668f8..778144da 100644 --- a/library/socket/closelog.c +++ b/library/socket/closelog.c @@ -1,5 +1,5 @@ /* - * $Id: socket_closelog.c,v 1.0 2022-01-22 18:27:15 clib2devs Exp $ + * $Id: socket_closelog.c,v 1.0 2022-01-22 18:27:15 clib4devs Exp $ */ #ifndef _SOCKET_HEADERS_H @@ -9,11 +9,11 @@ void closelog(void) { ENTER(); - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; - if (__clib2->syslog_fd != NULL) { - fclose(__clib2->syslog_fd); - __clib2->syslog_fd = NULL; + if (__clib4->syslog_fd != NULL) { + fclose(__clib4->syslog_fd); + __clib4->syslog_fd = NULL; } __check_abort(); diff --git a/library/socket/connect.c b/library/socket/connect.c index 4a3c6de8..3a3f1272 100644 --- a/library/socket/connect.c +++ b/library/socket/connect.c @@ -1,5 +1,5 @@ /* - * $Id: socket_connect.c,v 1.9 2006-11-16 10:41:15 clib2devs Exp $ + * $Id: socket_connect.c,v 1.9 2006-11-16 10:41:15 clib4devs Exp $ */ #ifndef _SOCKET_HEADERS_H @@ -13,7 +13,7 @@ connect(int sockfd, const struct sockaddr *name, socklen_t namelen) { struct fd *fd; int result = ERROR; struct sockaddr *sa = name; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); @@ -32,17 +32,17 @@ connect(int sockfd, const struct sockaddr *name, socklen_t namelen) { goto out; } - assert(sockfd >= 0 && sockfd < __clib2->__num_fd); - assert(__clib2->__fd[sockfd] != NULL); - assert(FLAG_IS_SET(__clib2->__fd[sockfd]->fd_Flags, FDF_IN_USE)); - assert(FLAG_IS_SET(__clib2->__fd[sockfd]->fd_Flags, FDF_IS_SOCKET)); + assert(sockfd >= 0 && sockfd < __clib4->__num_fd); + assert(__clib4->__fd[sockfd] != NULL); + assert(FLAG_IS_SET(__clib4->__fd[sockfd]->fd_Flags, FDF_IN_USE)); + assert(FLAG_IS_SET(__clib4->__fd[sockfd]->fd_Flags, FDF_IS_SOCKET)); fd = __get_file_descriptor_socket(sockfd); if (fd == NULL) goto out; if (((struct sockaddr_un *) sa)->sun_family == AF_LOCAL) { - struct Clib2Resource *res = (APTR) OpenResource(RESOURCE_NAME); + struct Clib4Resource *res = (APTR) OpenResource(RESOURCE_NAME); if (res) { const char *socketName = ((struct sockaddr_un *) name)->sun_path; /* Check if we have an unix socket with this name otherwise raise an error */ diff --git a/library/socket/dn_comp.c b/library/socket/dn_comp.c index 2f61bc41..227be9b8 100644 --- a/library/socket/dn_comp.c +++ b/library/socket/dn_comp.c @@ -1,4 +1,4 @@ -/* $Id: socket_dn_comp.c,v 1.0 2022-03-14 10:44:15 clib2devs Exp $ +/* $Id: socket_dn_comp.c,v 1.0 2022-03-14 10:44:15 clib4devs Exp $ Copyright (C) 2005-2006, 2008-2020 Free Software Foundation, Inc. diff --git a/library/socket/dn_expand.c b/library/socket/dn_expand.c index 62dce59c..b00f920f 100644 --- a/library/socket/dn_expand.c +++ b/library/socket/dn_expand.c @@ -1,4 +1,4 @@ -/* $Id: socket_dn_expand.c,v 1.0 2022-03-14 10:44:15 clib2devs Exp $ +/* $Id: socket_dn_expand.c,v 1.0 2022-03-14 10:44:15 clib4devs Exp $ Copyright (C) 2005-2006, 2008-2020 Free Software Foundation, Inc. diff --git a/library/socket/dn_skipname.c b/library/socket/dn_skipname.c index 25ef3738..fcf69d1d 100644 --- a/library/socket/dn_skipname.c +++ b/library/socket/dn_skipname.c @@ -1,4 +1,4 @@ -/* $Id: socket_dn_skipname.c,v 1.0 2022-03-14 10:44:15 clib2devs Exp $ +/* $Id: socket_dn_skipname.c,v 1.0 2022-03-14 10:44:15 clib4devs Exp $ Copyright (C) 2005-2006, 2008-2020 Free Software Foundation, Inc. diff --git a/library/socket/ether_aton.c b/library/socket/ether_aton.c index 5ca4405a..92928f9b 100644 --- a/library/socket/ether_aton.c +++ b/library/socket/ether_aton.c @@ -1,5 +1,5 @@ /* - * $Id: socket_ether_aton.c,v 1.0 2023-06-10 12:04:24 clib2devs Exp $ + * $Id: socket_ether_aton.c,v 1.0 2023-06-10 12:04:24 clib4devs Exp $ */ #ifndef _SOCKET_HEADERS_H diff --git a/library/socket/ether_aton_r.c b/library/socket/ether_aton_r.c index 641c1e10..2da0e1c2 100644 --- a/library/socket/ether_aton_r.c +++ b/library/socket/ether_aton_r.c @@ -1,5 +1,5 @@ /* - * $Id: socket_ether_aton_r.c,v 1.0 2023-06-10 12:04:24 clib2devs Exp $ + * $Id: socket_ether_aton_r.c,v 1.0 2023-06-10 12:04:24 clib4devs Exp $ */ #ifndef _SOCKET_HEADERS_H diff --git a/library/socket/ether_hostton.c b/library/socket/ether_hostton.c index 0eaa35a0..28b74d8e 100644 --- a/library/socket/ether_hostton.c +++ b/library/socket/ether_hostton.c @@ -1,5 +1,5 @@ /* - * $Id: socket_ether_hostton.c,v 1.0 2023-06-10 12:04:24 clib2devs Exp $ + * $Id: socket_ether_hostton.c,v 1.0 2023-06-10 12:04:24 clib4devs Exp $ */ #ifndef _SOCKET_HEADERS_H diff --git a/library/socket/ether_line.c b/library/socket/ether_line.c index 6799d74b..4d230e1b 100644 --- a/library/socket/ether_line.c +++ b/library/socket/ether_line.c @@ -1,5 +1,5 @@ /* - * $Id: socket_ether_line.c,v 1.0 2023-06-10 12:04:24 clib2devs Exp $ + * $Id: socket_ether_line.c,v 1.0 2023-06-10 12:04:24 clib4devs Exp $ */ #ifndef _SOCKET_HEADERS_H diff --git a/library/socket/ether_ntoa.c b/library/socket/ether_ntoa.c index 7d0fbc11..a3bbdce4 100644 --- a/library/socket/ether_ntoa.c +++ b/library/socket/ether_ntoa.c @@ -1,5 +1,5 @@ /* - * $Id: socket_ether_ntoa.c,v 1.0 2023-06-10 12:04:24 clib2devs Exp $ + * $Id: socket_ether_ntoa.c,v 1.0 2023-06-10 12:04:24 clib4devs Exp $ */ #ifndef _SOCKET_HEADERS_H diff --git a/library/socket/ether_ntoa_r.c b/library/socket/ether_ntoa_r.c index a9efbb37..deb027ef 100644 --- a/library/socket/ether_ntoa_r.c +++ b/library/socket/ether_ntoa_r.c @@ -1,5 +1,5 @@ /* - * $Id: socket_ether_ntoa_r.c,v 1.0 2023-06-10 12:04:24 clib2devs Exp $ + * $Id: socket_ether_ntoa_r.c,v 1.0 2023-06-10 12:04:24 clib4devs Exp $ */ #ifndef _SOCKET_HEADERS_H diff --git a/library/socket/ether_ntohost.c b/library/socket/ether_ntohost.c index 8e787e1d..352ad449 100644 --- a/library/socket/ether_ntohost.c +++ b/library/socket/ether_ntohost.c @@ -1,5 +1,5 @@ /* - * $Id: socket_ether_ntohost.c,v 1.0 2023-06-10 12:04:24 clib2devs Exp $ + * $Id: socket_ether_ntohost.c,v 1.0 2023-06-10 12:04:24 clib4devs Exp $ */ #ifndef _SOCKET_HEADERS_H diff --git a/library/socket/freeaddrinfo.c b/library/socket/freeaddrinfo.c index f0d9e98b..ecfd08d7 100644 --- a/library/socket/freeaddrinfo.c +++ b/library/socket/freeaddrinfo.c @@ -1,5 +1,5 @@ /* - * $Id: socket_freeaddrinfo.c,v 1.0 2021-01-13 10:41:15 clib2devs Exp $ + * $Id: socket_freeaddrinfo.c,v 1.0 2021-01-13 10:41:15 clib4devs Exp $ */ #ifndef _SOCKET_HEADERS_H diff --git a/library/socket/freeifaddrs.c b/library/socket/freeifaddrs.c index 0f877319..14599722 100644 --- a/library/socket/freeifaddrs.c +++ b/library/socket/freeifaddrs.c @@ -1,5 +1,5 @@ /* - * $Id: getifaddrs.c,v 1.0 2022-02-10 17:02:58 clib2devs Exp $ + * $Id: getifaddrs.c,v 1.0 2022-02-10 17:02:58 clib4devs Exp $ */ #ifndef _UNISTD_HEADERS_H diff --git a/library/socket/gai_strerror.c b/library/socket/gai_strerror.c index a76b0a5a..af1e29a4 100644 --- a/library/socket/gai_strerror.c +++ b/library/socket/gai_strerror.c @@ -1,5 +1,5 @@ /* - * $Id: socket_getnameinfo.c,v 1.0 2021-01-13 11:31:35 clib2devs Exp $ + * $Id: socket_getnameinfo.c,v 1.0 2021-01-13 11:31:35 clib4devs Exp $ */ #ifndef _SOCKET_HEADERS_H diff --git a/library/socket/get_descriptor.c b/library/socket/get_descriptor.c index 9f9866e7..feecffff 100644 --- a/library/socket/get_descriptor.c +++ b/library/socket/get_descriptor.c @@ -1,5 +1,5 @@ /* - * $Id: socket_get_descriptor.c,v 1.5 2006-01-08 12:04:24 clib2devs Exp $ + * $Id: socket_get_descriptor.c,v 1.5 2006-01-08 12:04:24 clib4devs Exp $ */ #ifndef _SOCKET_HEADERS_H diff --git a/library/socket/getaddrinfo.c b/library/socket/getaddrinfo.c index 0d8b3ea1..1f93a35a 100644 --- a/library/socket/getaddrinfo.c +++ b/library/socket/getaddrinfo.c @@ -1,5 +1,5 @@ /* - * $Id: socket_getaddrinfo.c,v 1.0 2021-01-13 10:41:15 clib2devs Exp $ + * $Id: socket_getaddrinfo.c,v 1.0 2021-01-13 10:41:15 clib4devs Exp $ */ #ifndef _SOCKET_HEADERS_H diff --git a/library/socket/gethostbyaddr.c b/library/socket/gethostbyaddr.c index 00c9ffbc..8d7cdf34 100644 --- a/library/socket/gethostbyaddr.c +++ b/library/socket/gethostbyaddr.c @@ -1,5 +1,5 @@ /* - * $Id: socket_gethostbyaddr.c,v 1.7 2022-08-10 12:04:24 clib2devs Exp $ + * $Id: socket_gethostbyaddr.c,v 1.7 2022-08-10 12:04:24 clib4devs Exp $ */ #ifndef _SOCKET_HEADERS_H diff --git a/library/socket/gethostbyaddr_r.c b/library/socket/gethostbyaddr_r.c index 0dd4fa8f..ce2c1b08 100644 --- a/library/socket/gethostbyaddr_r.c +++ b/library/socket/gethostbyaddr_r.c @@ -1,5 +1,5 @@ /* - * $Id: socket_gethostbyaddr_r.c,v 1.0 2022-08-09 12:04:24 clib2devs Exp $ + * $Id: socket_gethostbyaddr_r.c,v 1.0 2022-08-09 12:04:24 clib4devs Exp $ */ #ifndef _SOCKET_HEADERS_H diff --git a/library/socket/gethostbyname.c b/library/socket/gethostbyname.c index 6febc7d3..18870988 100644 --- a/library/socket/gethostbyname.c +++ b/library/socket/gethostbyname.c @@ -1,5 +1,5 @@ /* - * $Id: socket_gethostbyname.c,v 1.5 2022-08-09 12:04:24 clib2devs Exp $ + * $Id: socket_gethostbyname.c,v 1.5 2022-08-09 12:04:24 clib4devs Exp $ */ #ifndef _SOCKET_HEADERS_H diff --git a/library/socket/gethostbyname2.c b/library/socket/gethostbyname2.c index 1459b587..8e33752a 100644 --- a/library/socket/gethostbyname2.c +++ b/library/socket/gethostbyname2.c @@ -1,5 +1,5 @@ /* - * $Id: socket_gethostbyname2.c,v 1.0 2022-08-09 12:04:24 clib2devs Exp $ + * $Id: socket_gethostbyname2.c,v 1.0 2022-08-09 12:04:24 clib4devs Exp $ */ #ifndef _SOCKET_HEADERS_H diff --git a/library/socket/gethostbyname2_r.c b/library/socket/gethostbyname2_r.c index 02c521cb..946d613a 100644 --- a/library/socket/gethostbyname2_r.c +++ b/library/socket/gethostbyname2_r.c @@ -1,5 +1,5 @@ /* - * $Id: socket_gethostbyname2_r.c,v 1.0 2022-08-09 12:04:24 clib2devs Exp $ + * $Id: socket_gethostbyname2_r.c,v 1.0 2022-08-09 12:04:24 clib4devs Exp $ */ #ifndef _SOCKET_HEADERS_H diff --git a/library/socket/gethostbyname_r.c b/library/socket/gethostbyname_r.c index 28fe7f66..292081f7 100644 --- a/library/socket/gethostbyname_r.c +++ b/library/socket/gethostbyname_r.c @@ -1,5 +1,5 @@ /* - * $Id: socket_gethostbyname_r.c,v 1.0 2022-08-09 12:04:24 clib2devs Exp $ + * $Id: socket_gethostbyname_r.c,v 1.0 2022-08-09 12:04:24 clib4devs Exp $ */ #ifndef _SOCKET_HEADERS_H diff --git a/library/socket/gethostid.c b/library/socket/gethostid.c index 53b4013e..904628c9 100644 --- a/library/socket/gethostid.c +++ b/library/socket/gethostid.c @@ -1,5 +1,5 @@ /* - * $Id: socket_gethostid.c,v 1.3 2006-01-08 12:04:24 clib2devs Exp $ + * $Id: socket_gethostid.c,v 1.3 2006-01-08 12:04:24 clib4devs Exp $ */ #ifndef _UNISTD_HEADERS_H diff --git a/library/socket/gethostname.c b/library/socket/gethostname.c index 7b4858ac..14839842 100644 --- a/library/socket/gethostname.c +++ b/library/socket/gethostname.c @@ -1,5 +1,5 @@ /* - * $Id: socket_gethostname.c,v 1.6 2006-01-08 12:04:24 clib2devs Exp $ + * $Id: socket_gethostname.c,v 1.6 2006-01-08 12:04:24 clib4devs Exp $ */ #ifndef _SOCKET_HEADERS_H diff --git a/library/socket/getifaddrs.c b/library/socket/getifaddrs.c index 40bcdbae..7fd5cf69 100644 --- a/library/socket/getifaddrs.c +++ b/library/socket/getifaddrs.c @@ -1,5 +1,5 @@ /* - * $Id: getifaddrs.c,v 1.0 2022-02-10 17:02:58 clib2devs Exp $ + * $Id: getifaddrs.c,v 1.0 2022-02-10 17:02:58 clib4devs Exp $ */ #ifndef _UNISTD_HEADERS_H diff --git a/library/socket/getnameinfo.c b/library/socket/getnameinfo.c index 8a1fd3c0..bac4cb8b 100644 --- a/library/socket/getnameinfo.c +++ b/library/socket/getnameinfo.c @@ -1,5 +1,5 @@ /* - * $Id: socket_getnameinfo.c,v 1.0 2021-01-13 11:31:35 clib2devs Exp $ + * $Id: socket_getnameinfo.c,v 1.0 2021-01-13 11:31:35 clib4devs Exp $ */ #ifndef _SOCKET_HEADERS_H diff --git a/library/socket/getnetbyaddr.c b/library/socket/getnetbyaddr.c index fcb1933f..653b61a5 100644 --- a/library/socket/getnetbyaddr.c +++ b/library/socket/getnetbyaddr.c @@ -1,5 +1,5 @@ /* - * $Id: socket_getnetbyaddr.c,v 1.4 2006-01-08 12:04:24 clib2devs Exp $ + * $Id: socket_getnetbyaddr.c,v 1.4 2006-01-08 12:04:24 clib4devs Exp $ */ #ifndef _SOCKET_HEADERS_H diff --git a/library/socket/getnetbyname.c b/library/socket/getnetbyname.c index bf463ad8..879862b4 100644 --- a/library/socket/getnetbyname.c +++ b/library/socket/getnetbyname.c @@ -1,5 +1,5 @@ /* - * $Id: socket_getnetbyname.c,v 1.4 2006-01-08 12:04:24 clib2devs Exp $ + * $Id: socket_getnetbyname.c,v 1.4 2006-01-08 12:04:24 clib4devs Exp $ */ #ifndef _SOCKET_HEADERS_H diff --git a/library/socket/getpeername.c b/library/socket/getpeername.c index d8b4ce34..422eda1e 100644 --- a/library/socket/getpeername.c +++ b/library/socket/getpeername.c @@ -1,5 +1,5 @@ /* - * $Id: socket_getpeername.c,v 1.8 2006-11-16 10:41:15 clib2devs Exp $ + * $Id: socket_getpeername.c,v 1.8 2006-11-16 10:41:15 clib4devs Exp $ */ #ifndef _SOCKET_HEADERS_H @@ -10,7 +10,7 @@ int getpeername(int sockfd, struct sockaddr *name, socklen_t *namelen) { struct fd *fd; int result = ERROR; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); @@ -28,10 +28,10 @@ getpeername(int sockfd, struct sockaddr *name, socklen_t *namelen) { goto out; } - assert(sockfd >= 0 && sockfd < __clib2->__num_fd); - assert(__clib2->__fd[sockfd] != NULL); - assert(FLAG_IS_SET(__clib2->__fd[sockfd]->fd_Flags, FDF_IN_USE)); - assert(FLAG_IS_SET(__clib2->__fd[sockfd]->fd_Flags, FDF_IS_SOCKET)); + assert(sockfd >= 0 && sockfd < __clib4->__num_fd); + assert(__clib4->__fd[sockfd] != NULL); + assert(FLAG_IS_SET(__clib4->__fd[sockfd]->fd_Flags, FDF_IN_USE)); + assert(FLAG_IS_SET(__clib4->__fd[sockfd]->fd_Flags, FDF_IS_SOCKET)); fd = __get_file_descriptor_socket(sockfd); if (fd == NULL) diff --git a/library/socket/getprotobyname.c b/library/socket/getprotobyname.c index 222aaeaa..3f95cb66 100644 --- a/library/socket/getprotobyname.c +++ b/library/socket/getprotobyname.c @@ -1,5 +1,5 @@ /* - * $Id: socket_getprotobyname.c,v 1.4 2006-01-08 12:04:24 clib2devs Exp $ + * $Id: socket_getprotobyname.c,v 1.4 2006-01-08 12:04:24 clib4devs Exp $ */ #ifndef _SOCKET_HEADERS_H diff --git a/library/socket/getprotobynumber.c b/library/socket/getprotobynumber.c index 632ead3d..4d1bcafa 100644 --- a/library/socket/getprotobynumber.c +++ b/library/socket/getprotobynumber.c @@ -1,5 +1,5 @@ /* - * $Id: socket_getprotobynumber.c,v 1.3 2006-01-08 12:04:24 clib2devs Exp $ + * $Id: socket_getprotobynumber.c,v 1.3 2006-01-08 12:04:24 clib4devs Exp $ */ #ifndef _SOCKET_HEADERS_H diff --git a/library/socket/getservbyname.c b/library/socket/getservbyname.c index 6875dd3b..95ea9c1e 100644 --- a/library/socket/getservbyname.c +++ b/library/socket/getservbyname.c @@ -1,5 +1,5 @@ /* - * $Id: socket_getservbyname.c,v 1.5 2022-08-09 12:04:24 clib2devs Exp $ + * $Id: socket_getservbyname.c,v 1.5 2022-08-09 12:04:24 clib4devs Exp $ */ #ifndef _SOCKET_HEADERS_H diff --git a/library/socket/getservbyname_r.c b/library/socket/getservbyname_r.c index 66e087bd..1b104990 100644 --- a/library/socket/getservbyname_r.c +++ b/library/socket/getservbyname_r.c @@ -1,5 +1,5 @@ /* - * $Id: socket_getservbyname_r.c,v 1.0 2022-08-09 12:04:24 clib2devs Exp $ + * $Id: socket_getservbyname_r.c,v 1.0 2022-08-09 12:04:24 clib4devs Exp $ */ #ifndef _SOCKET_HEADERS_H diff --git a/library/socket/getservbyport.c b/library/socket/getservbyport.c index 66f7951a..4513c5d6 100644 --- a/library/socket/getservbyport.c +++ b/library/socket/getservbyport.c @@ -1,5 +1,5 @@ /* - * $Id: socket_getservbyport.c,v 1.5 2022-08-09 12:04:24 clib2devs Exp $ + * $Id: socket_getservbyport.c,v 1.5 2022-08-09 12:04:24 clib4devs Exp $ */ #ifndef _SOCKET_HEADERS_H diff --git a/library/socket/getservbyport_r.c b/library/socket/getservbyport_r.c index fdc58aee..31df963d 100644 --- a/library/socket/getservbyport_r.c +++ b/library/socket/getservbyport_r.c @@ -1,5 +1,5 @@ /* - * $Id: socket_getservbyport_r.c,v 1.0 2022-08-09 12:04:24 clib2devs Exp $ + * $Id: socket_getservbyport_r.c,v 1.0 2022-08-09 12:04:24 clib4devs Exp $ */ #ifndef _SOCKET_HEADERS_H diff --git a/library/socket/getsockname.c b/library/socket/getsockname.c index d05c75c5..b8cf7e76 100644 --- a/library/socket/getsockname.c +++ b/library/socket/getsockname.c @@ -1,5 +1,5 @@ /* - * $Id: socket_getsockname.c,v 1.8 2006-11-16 10:41:15 clib2devs Exp $ + * $Id: socket_getsockname.c,v 1.8 2006-11-16 10:41:15 clib4devs Exp $ */ #ifndef _SOCKET_HEADERS_H @@ -10,7 +10,7 @@ int getsockname(int sockfd, struct sockaddr *name, socklen_t *namelen) { struct fd *fd; int result = ERROR; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); @@ -28,10 +28,10 @@ getsockname(int sockfd, struct sockaddr *name, socklen_t *namelen) { goto out; } - assert(sockfd >= 0 && sockfd < __clib2->__num_fd); - assert(__clib2->__fd[sockfd] != NULL); - assert(FLAG_IS_SET(__clib2->__fd[sockfd]->fd_Flags, FDF_IN_USE)); - assert(FLAG_IS_SET(__clib2->__fd[sockfd]->fd_Flags, FDF_IS_SOCKET)); + assert(sockfd >= 0 && sockfd < __clib4->__num_fd); + assert(__clib4->__fd[sockfd] != NULL); + assert(FLAG_IS_SET(__clib4->__fd[sockfd]->fd_Flags, FDF_IN_USE)); + assert(FLAG_IS_SET(__clib4->__fd[sockfd]->fd_Flags, FDF_IS_SOCKET)); fd = __get_file_descriptor_socket(sockfd); if (fd == NULL) { diff --git a/library/socket/getsockopt.c b/library/socket/getsockopt.c index 52f18073..01787546 100644 --- a/library/socket/getsockopt.c +++ b/library/socket/getsockopt.c @@ -1,5 +1,5 @@ /* - * $Id: socket_getsockopt.c,v 1.8 2006-11-16 10:41:15 clib2devs Exp $ + * $Id: socket_getsockopt.c,v 1.8 2006-11-16 10:41:15 clib4devs Exp $ */ #ifndef _SOCKET_HEADERS_H @@ -9,7 +9,7 @@ int getsockopt(int sockfd, int level, int optname, void *optval, socklen_t *optlen) { struct fd *fd; int result = ERROR; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); @@ -29,10 +29,10 @@ int getsockopt(int sockfd, int level, int optname, void *optval, socklen_t *optl goto out; } - assert(sockfd >= 0 && sockfd < __clib2->__num_fd); - assert(__clib2->__fd[sockfd] != NULL); - assert(FLAG_IS_SET(__clib2->__fd[sockfd]->fd_Flags, FDF_IN_USE)); - assert(FLAG_IS_SET(__clib2->__fd[sockfd]->fd_Flags, FDF_IS_SOCKET)); + assert(sockfd >= 0 && sockfd < __clib4->__num_fd); + assert(__clib4->__fd[sockfd] != NULL); + assert(FLAG_IS_SET(__clib4->__fd[sockfd]->fd_Flags, FDF_IN_USE)); + assert(FLAG_IS_SET(__clib4->__fd[sockfd]->fd_Flags, FDF_IS_SOCKET)); fd = __get_file_descriptor_socket(sockfd); if (fd == NULL) diff --git a/library/socket/herror.c b/library/socket/herror.c index 8363555a..fa2f03a6 100644 --- a/library/socket/herror.c +++ b/library/socket/herror.c @@ -1,5 +1,5 @@ /* - * $Id: socket_herror.c,v 1.0 2022-08-09 12:04:24 clib2devs Exp $ + * $Id: socket_herror.c,v 1.0 2022-08-09 12:04:24 clib4devs Exp $ */ #ifndef _SOCKET_HEADERS_H diff --git a/library/socket/hook_entry.c b/library/socket/hook_entry.c index c36ce4ed..1f0b48a0 100644 --- a/library/socket/hook_entry.c +++ b/library/socket/hook_entry.c @@ -1,5 +1,5 @@ /* - * $Id: socket_hook_entry.c,v 1.19 2021-01-231 13:12:58 clib2devs Exp $ + * $Id: socket_hook_entry.c,v 1.19 2021-01-231 13:12:58 clib4devs Exp $ */ #ifndef _SOCKET_HEADERS_H @@ -7,11 +7,11 @@ #endif /* _SOCKET_HEADERS_H */ #include -#include "../shared_library/clib2.h" +#include "../shared_library/clib4.h" #include "../misc/map.h" int64_t -__socket_hook_entry(struct _clib2 *__clib2, struct fd *fd, struct file_action_message *fam) { +__socket_hook_entry(struct _clib4 *__clib4, struct fd *fd, struct file_action_message *fam) { struct ExamineData *fib; BOOL is_aliased; int result; @@ -23,7 +23,7 @@ __socket_hook_entry(struct _clib2 *__clib2, struct fd *fd, struct file_action_me table and therefore needs to obtain the stdio lock before it locks this particular descriptor entry. */ if (fam->fam_Action == file_action_close) - __stdio_lock(__clib2); + __stdio_lock(__clib4); __fd_lock(fd); @@ -70,7 +70,7 @@ __socket_hook_entry(struct _clib2 *__clib2, struct fd *fd, struct file_action_me /* Are we permitted to close this file? */ if (FLAG_IS_CLEAR(fd->fd_Flags, FDF_NO_CLOSE)) { /* Check for unix socket */ - struct Clib2Resource *res = (APTR) OpenResource(RESOURCE_NAME); + struct Clib4Resource *res = (APTR) OpenResource(RESOURCE_NAME); if (res) { size_t iter = 0; void *item; @@ -134,7 +134,7 @@ __socket_hook_entry(struct _clib2 *__clib2, struct fd *fd, struct file_action_me __fd_unlock(fd); if (fam->fam_Action == file_action_close) - __stdio_unlock(__clib2); + __stdio_unlock(__clib4); RETURN(result); return (result); diff --git a/library/socket/hstrerror.c b/library/socket/hstrerror.c index 8df81342..3099e8fd 100644 --- a/library/socket/hstrerror.c +++ b/library/socket/hstrerror.c @@ -1,5 +1,5 @@ /* - * $Id: socket_hstrerror.c,v 1.5 2006-01-08 12:04:24 clib2devs Exp $ + * $Id: socket_hstrerror.c,v 1.5 2006-01-08 12:04:24 clib4devs Exp $ */ #ifndef _SOCKET_HEADERS_H diff --git a/library/socket/if_indextoname.c b/library/socket/if_indextoname.c index b0e255af..1852590f 100644 --- a/library/socket/if_indextoname.c +++ b/library/socket/if_indextoname.c @@ -1,5 +1,5 @@ /* - * $Id: if_if_indextoname.c,v 1.0 2021-01-24 19:34:26 clib2devs Exp $ + * $Id: if_if_indextoname.c,v 1.0 2021-01-24 19:34:26 clib4devs Exp $ */ #include diff --git a/library/socket/if_nametoindex.c b/library/socket/if_nametoindex.c index dd25af82..fe3418a0 100644 --- a/library/socket/if_nametoindex.c +++ b/library/socket/if_nametoindex.c @@ -1,5 +1,5 @@ /* - * $Id: if_if_nametoindex.c,v 1.0 2021-01-24 18:59:58 clib2devs Exp $ + * $Id: if_if_nametoindex.c,v 1.0 2021-01-24 18:59:58 clib4devs Exp $ */ #ifndef _UNISTD_HEADERS_H diff --git a/library/socket/in6addr_any.c b/library/socket/in6addr_any.c index d1fec0a4..f58eeef7 100644 --- a/library/socket/in6addr_any.c +++ b/library/socket/in6addr_any.c @@ -1,5 +1,5 @@ /* - * $Id: socket_in6addr_any.c,v 1.0 2022-08-22 18:59:58 clib2devs Exp $ + * $Id: socket_in6addr_any.c,v 1.0 2022-08-22 18:59:58 clib4devs Exp $ */ #include diff --git a/library/socket/inet_addr.c b/library/socket/inet_addr.c index cdf6ed1f..fc1e2735 100644 --- a/library/socket/inet_addr.c +++ b/library/socket/inet_addr.c @@ -1,5 +1,5 @@ /* - * $Id: socket_inet_addr.c,v 1.5 2022-09-16 12:04:24 clib2devs Exp $ + * $Id: socket_inet_addr.c,v 1.5 2022-09-16 12:04:24 clib4devs Exp $ */ #ifndef _SOCKET_HEADERS_H diff --git a/library/socket/inet_aton.c b/library/socket/inet_aton.c index f0bd530b..f041b3e5 100644 --- a/library/socket/inet_aton.c +++ b/library/socket/inet_aton.c @@ -1,5 +1,5 @@ /* - * $Id: socket_inet_aton.c,v 1.4 2006-01-08 12:04:24 clib2devs Exp $ + * $Id: socket_inet_aton.c,v 1.4 2006-01-08 12:04:24 clib4devs Exp $ */ #ifndef _SOCKET_HEADERS_H diff --git a/library/socket/inet_lnaof.c b/library/socket/inet_lnaof.c index 97185a97..98a2e894 100644 --- a/library/socket/inet_lnaof.c +++ b/library/socket/inet_lnaof.c @@ -1,5 +1,5 @@ /* - * $Id: socket_inet_lnaof.c,v 1.4 2022-08-10 12:04:24 clib2devs Exp $ + * $Id: socket_inet_lnaof.c,v 1.4 2022-08-10 12:04:24 clib4devs Exp $ */ #ifndef _SOCKET_HEADERS_H diff --git a/library/socket/inet_makeaddr.c b/library/socket/inet_makeaddr.c index 09d15ffd..8f4982f9 100644 --- a/library/socket/inet_makeaddr.c +++ b/library/socket/inet_makeaddr.c @@ -1,5 +1,5 @@ /* - * $Id: socket_inet_makeaddr.c,v 1.5 2022-08-10 12:04:24 clib2devs Exp $ + * $Id: socket_inet_makeaddr.c,v 1.5 2022-08-10 12:04:24 clib4devs Exp $ */ #ifndef _SOCKET_HEADERS_H diff --git a/library/socket/inet_netof.c b/library/socket/inet_netof.c index c93929b4..e2eb30ba 100644 --- a/library/socket/inet_netof.c +++ b/library/socket/inet_netof.c @@ -1,5 +1,5 @@ /* - * $Id: socket_inet_netof.c,v 1.5 2022-08-10 12:04:24 clib2devs Exp $ + * $Id: socket_inet_netof.c,v 1.5 2022-08-10 12:04:24 clib4devs Exp $ */ #ifndef _SOCKET_HEADERS_H diff --git a/library/socket/inet_network.c b/library/socket/inet_network.c index 4e9a4073..ffd74df9 100644 --- a/library/socket/inet_network.c +++ b/library/socket/inet_network.c @@ -1,5 +1,5 @@ /* - * $Id: socket_inet_network.c,v 1.6 2022-08-10 12:04:24 clib2devs Exp $ + * $Id: socket_inet_network.c,v 1.6 2022-08-10 12:04:24 clib4devs Exp $ */ #ifndef _SOCKET_HEADERS_H diff --git a/library/socket/inet_ntoa.c b/library/socket/inet_ntoa.c index eec7147a..77bea4f6 100644 --- a/library/socket/inet_ntoa.c +++ b/library/socket/inet_ntoa.c @@ -1,5 +1,5 @@ /* - * $Id: socket_inet_ntoa.c,v 1.4 2022-08-10 12:04:24 clib2devs Exp $ + * $Id: socket_inet_ntoa.c,v 1.4 2022-08-10 12:04:24 clib4devs Exp $ */ #ifndef _SOCKET_HEADERS_H diff --git a/library/socket/inet_ntop.c b/library/socket/inet_ntop.c index bd14ba9d..6b5b5564 100644 --- a/library/socket/inet_ntop.c +++ b/library/socket/inet_ntop.c @@ -1,4 +1,4 @@ -/* $Id: socket_inet_ntop.c,v 1.0 2021-11-16 10:41:15 clib2devs Exp $ +/* $Id: socket_inet_ntop.c,v 1.0 2021-11-16 10:41:15 clib4devs Exp $ */ #ifndef _SOCKET_HEADERS_H diff --git a/library/socket/inet_pton.c b/library/socket/inet_pton.c index 2020ae35..0ceb4e13 100644 --- a/library/socket/inet_pton.c +++ b/library/socket/inet_pton.c @@ -1,5 +1,5 @@ /* - * $Id: socket_inet_pton.c,v 1.0 2021-01-12 09:55:00 clib2devs Exp $ + * $Id: socket_inet_pton.c,v 1.0 2021-01-12 09:55:00 clib4devs Exp $ */ #ifndef _SOCKET_HEADERS_H diff --git a/library/socket/init_exit.c b/library/socket/init_exit.c index 1d366aff..85371035 100644 --- a/library/socket/init_exit.c +++ b/library/socket/init_exit.c @@ -1,5 +1,5 @@ /* - * $Id: socket_init_exit.c,v 1.26 2006-04-05 08:39:45 clib2devs Exp $ + * $Id: socket_init_exit.c,v 1.26 2006-04-05 08:39:45 clib4devs Exp $ */ #ifndef _SOCKET_HEADERS_H @@ -64,10 +64,10 @@ STATIC struct Hook error_hook = { SOCKET_DESTRUCTOR(socket_exit) { ENTER(); - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; /* Disable ^C checking. */ - if (__clib2->__SocketBase != NULL) { + if (__clib4->__SocketBase != NULL) { struct TagItem tags[2]; tags[0].ti_Tag = SBTM_SETVAL(SBTC_BREAKMASK); @@ -83,14 +83,14 @@ SOCKET_DESTRUCTOR(socket_exit) { * does not happen, the stdio cleanup function will * crash (with bells on). */ - __close_all_files(__clib2); - if (__clib2->__ISocket != NULL) { - DropInterface((struct Interface *) __clib2->__ISocket); - __clib2->__ISocket = NULL; + __close_all_files(__clib4); + if (__clib4->__ISocket != NULL) { + DropInterface((struct Interface *) __clib4->__ISocket); + __clib4->__ISocket = NULL; } - if (__clib2->__SocketBase != NULL) { - CloseLibrary(__clib2->__SocketBase); - __clib2->__SocketBase = NULL; + if (__clib4->__SocketBase != NULL) { + CloseLibrary(__clib4->__SocketBase); + __clib4->__SocketBase = NULL; } LEAVE(); @@ -100,21 +100,21 @@ SOCKET_CONSTRUCTOR(socket_init) { struct TagItem tags[5]; BOOL success = FALSE; LONG status; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); /* bsdsocket.library V3 is sufficient for all the tasks we may have to perform. */ - __clib2->__SocketBase = OpenLibrary("bsdsocket.library", 3); - if (__clib2->__SocketBase != NULL) { - __clib2->__ISocket = (struct SocketIFace *) GetInterface(__clib2->__SocketBase, "main", 1, 0); - if (__clib2->__ISocket == NULL) { - CloseLibrary(__clib2->__SocketBase); - __clib2->__SocketBase = NULL; + __clib4->__SocketBase = OpenLibrary("bsdsocket.library", 3); + if (__clib4->__SocketBase != NULL) { + __clib4->__ISocket = (struct SocketIFace *) GetInterface(__clib4->__SocketBase, "main", 1, 0); + if (__clib4->__ISocket == NULL) { + CloseLibrary(__clib4->__SocketBase); + __clib4->__SocketBase = NULL; } } - if (__clib2->__SocketBase == NULL) { + if (__clib4->__SocketBase == NULL) { SHOWMSG("bsdsocket.library V3 didn't open"); __show_error("\"bsdsocket.library\" V3 could not be opened."); goto out; @@ -127,10 +127,10 @@ SOCKET_CONSTRUCTOR(socket_init) { /* Also enable ^C checking if desired. */ tags[1].ti_Tag = SBTM_SETVAL(SBTC_BREAKMASK); - tags[1].ti_Data = __clib2->__break_signal_mask; + tags[1].ti_Data = __clib4->__break_signal_mask; tags[2].ti_Tag = SBTM_SETVAL(SBTC_LOGTAGPTR); - tags[2].ti_Data = (ULONG)__clib2->__progname; + tags[2].ti_Data = (ULONG)__clib4->__progname; /* Wire the library's h_errno variable to our local h_errno. */ tags[3].ti_Tag = SBTM_SETVAL(SBTC_HERRNOLONGPTR); @@ -153,23 +153,23 @@ SOCKET_CONSTRUCTOR(socket_init) { hook. If either of these features are supported can be checked by looking at the global __can_share_socket_library_base and __thread_safe_errno_h_errno variables. */ - if (__clib2->__SocketBase->lib_Version >= 4) { + if (__clib4->__SocketBase->lib_Version >= 4) { tags[0].ti_Tag = SBTM_SETVAL(SBTC_CAN_SHARE_LIBRARY_BASES); tags[0].ti_Data = TRUE; tags[1].ti_Tag = TAG_END; if (__SocketBaseTagList(tags) == 0) - __clib2->__can_share_socket_library_base = TRUE; + __clib4->__can_share_socket_library_base = TRUE; - if (__clib2->__can_share_socket_library_base) { + if (__clib4->__can_share_socket_library_base) { tags[0].ti_Tag = SBTM_SETVAL(SBTC_ERROR_HOOK); tags[0].ti_Data = (ULONG) &error_hook; tags[1].ti_Tag = TAG_END; if (__SocketBaseTagList(tags) == 0) - __clib2->__thread_safe_errno_h_errno = TRUE; + __clib4->__thread_safe_errno_h_errno = TRUE; } } diff --git a/library/socket/ioctl.c b/library/socket/ioctl.c index 39a2b638..94f2f7e3 100644 --- a/library/socket/ioctl.c +++ b/library/socket/ioctl.c @@ -1,5 +1,5 @@ /* - * $Id: socket_ioctl.c,v 1.14 2006-11-16 10:41:15 clib2devs Exp $ + * $Id: socket_ioctl.c,v 1.14 2006-11-16 10:41:15 clib4devs Exp $ */ #ifndef _SOCKET_HEADERS_H @@ -79,7 +79,7 @@ ioctl(int sockfd, int request, ... /* char *arg */) { char *param; struct fd *fd = NULL; int result = ERROR; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); @@ -90,10 +90,10 @@ ioctl(int sockfd, int request, ... /* char *arg */) { DECLARE_SOCKETBASE(); if (request != TIOCGWINSZ && request != TIOCSWINSZ) { - if (FLAG_IS_SET(__clib2->__fd[sockfd]->fd_Flags, FDF_IS_SOCKET)) { - assert(sockfd >= 0 && sockfd < __clib2->__num_fd); - assert(__clib2->__fd[sockfd] != NULL); - assert(FLAG_IS_SET(__clib2->__fd[sockfd]->fd_Flags, FDF_IN_USE)); + if (FLAG_IS_SET(__clib4->__fd[sockfd]->fd_Flags, FDF_IS_SOCKET)) { + assert(sockfd >= 0 && sockfd < __clib4->__num_fd); + assert(__clib4->__fd[sockfd] != NULL); + assert(FLAG_IS_SET(__clib4->__fd[sockfd]->fd_Flags, FDF_IN_USE)); fd = __get_file_descriptor_socket(sockfd); if (fd == NULL) diff --git a/library/socket/listen.c b/library/socket/listen.c index 775c6bf0..37d5f04d 100644 --- a/library/socket/listen.c +++ b/library/socket/listen.c @@ -1,5 +1,5 @@ /* - * $Id: socket_listen.c,v 1.6 2006-11-16 10:41:15 clib2devs Exp $ + * $Id: socket_listen.c,v 1.6 2006-11-16 10:41:15 clib4devs Exp $ */ #ifndef _SOCKET_HEADERS_H @@ -9,7 +9,7 @@ int listen(int sockfd, int backlog) { struct fd *fd; int result = ERROR; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); @@ -18,10 +18,10 @@ int listen(int sockfd, int backlog) { DECLARE_SOCKETBASE(); - assert(sockfd >= 0 && sockfd < __clib2->__num_fd); - assert(__clib2->__fd[sockfd] != NULL); - assert(FLAG_IS_SET(__clib2->__fd[sockfd]->fd_Flags, FDF_IN_USE)); - assert(FLAG_IS_SET(__clib2->__fd[sockfd]->fd_Flags, FDF_IS_SOCKET)); + assert(sockfd >= 0 && sockfd < __clib4->__num_fd); + assert(__clib4->__fd[sockfd] != NULL); + assert(FLAG_IS_SET(__clib4->__fd[sockfd]->fd_Flags, FDF_IN_USE)); + assert(FLAG_IS_SET(__clib4->__fd[sockfd]->fd_Flags, FDF_IS_SOCKET)); fd = __get_file_descriptor_socket(sockfd); if (fd == NULL) diff --git a/library/socket/ns_parse.c b/library/socket/ns_parse.c index 4f9b1d5e..1844f745 100644 --- a/library/socket/ns_parse.c +++ b/library/socket/ns_parse.c @@ -1,4 +1,4 @@ -/* $Id: socket_ns_parse.c,v 1.0 2022-03-14 10:44:15 clib2devs Exp $ +/* $Id: socket_ns_parse.c,v 1.0 2022-03-14 10:44:15 clib4devs Exp $ Copyright (C) 2005-2006, 2008-2020 Free Software Foundation, Inc. diff --git a/library/socket/openlog.c b/library/socket/openlog.c index ca363873..41de34ce 100644 --- a/library/socket/openlog.c +++ b/library/socket/openlog.c @@ -1,5 +1,5 @@ /* - * $Id: socket_openlog.c,v 1.0 2022-01-22 18:27:15 clib2devs Exp $ + * $Id: socket_openlog.c,v 1.0 2022-01-22 18:27:15 clib4devs Exp $ */ #ifndef _SOCKET_HEADERS_H @@ -9,12 +9,12 @@ void openlog(const char *ident, int opt, int facility) { ENTER(); - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; - __clib2->syslog_openlog_flags = opt; - __clib2->syslog_facility = facility; + __clib4->syslog_openlog_flags = opt; + __clib4->syslog_facility = facility; - if (__clib2->syslog_fd == NULL) { + if (__clib4->syslog_fd == NULL) { if (strlen(ident) + 3 > 35) { SHOWMSG("ident is too long"); @@ -23,14 +23,14 @@ openlog(const char *ident, int opt, int facility) { } if (ident) - snprintf(__clib2->syslog_ident, sizeof(__clib2->syslog_ident), "%s%s", _PATH_LOG, ident); + snprintf(__clib4->syslog_ident, sizeof(__clib4->syslog_ident), "%s%s", _PATH_LOG, ident); else - snprintf(__clib2->syslog_ident, sizeof(__clib2->syslog_ident), "%sDUMMY", _PATH_LOG, ident); + snprintf(__clib4->syslog_ident, sizeof(__clib4->syslog_ident), "%sDUMMY", _PATH_LOG, ident); - if ((__clib2->syslog_fd = fopen(__clib2->syslog_ident, "a+")) == NULL) { + if ((__clib4->syslog_fd = fopen(__clib4->syslog_ident, "a+")) == NULL) { SHOWMSG("Error opening syslog file"); - if (__clib2->syslog_openlog_flags & LOG_CONS) { - fprintf(stderr, "Error opening syslog file %s\n", __clib2->syslog_ident); + if (__clib4->syslog_openlog_flags & LOG_CONS) { + fprintf(stderr, "Error opening syslog file %s\n", __clib4->syslog_ident); } } } diff --git a/library/socket/recv.c b/library/socket/recv.c index 2769409e..4fc7b1aa 100644 --- a/library/socket/recv.c +++ b/library/socket/recv.c @@ -1,5 +1,5 @@ /* - * $Id: socket_recv.c,v 1.7 2006-11-16 10:41:15 clib2devs Exp $ + * $Id: socket_recv.c,v 1.7 2006-11-16 10:41:15 clib4devs Exp $ */ #ifndef _SOCKET_HEADERS_H diff --git a/library/socket/recvfrom.c b/library/socket/recvfrom.c index d7efac09..d6969598 100644 --- a/library/socket/recvfrom.c +++ b/library/socket/recvfrom.c @@ -1,5 +1,5 @@ /* - * $Id: socket_recvfrom.c,v 1.9 2006-11-16 10:41:15 clib2devs Exp $ + * $Id: socket_recvfrom.c,v 1.9 2006-11-16 10:41:15 clib4devs Exp $ */ #ifndef _SOCKET_HEADERS_H @@ -10,7 +10,7 @@ ssize_t recvfrom(int sockfd, void *buff, size_t len, int flags, struct sockaddr *from, socklen_t *fromlen) { struct fd *fd; int result = ERROR; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); @@ -31,10 +31,10 @@ recvfrom(int sockfd, void *buff, size_t len, int flags, struct sockaddr *from, s goto out; } - assert(sockfd >= 0 && sockfd < __clib2->__num_fd); - assert(__clib2->__fd[sockfd] != NULL); - assert(FLAG_IS_SET(__clib2->__fd[sockfd]->fd_Flags, FDF_IN_USE)); - assert(FLAG_IS_SET(__clib2->__fd[sockfd]->fd_Flags, FDF_IS_SOCKET)); + assert(sockfd >= 0 && sockfd < __clib4->__num_fd); + assert(__clib4->__fd[sockfd] != NULL); + assert(FLAG_IS_SET(__clib4->__fd[sockfd]->fd_Flags, FDF_IN_USE)); + assert(FLAG_IS_SET(__clib4->__fd[sockfd]->fd_Flags, FDF_IS_SOCKET)); fd = __get_file_descriptor_socket(sockfd); if (fd == NULL) diff --git a/library/socket/recvmsg.c b/library/socket/recvmsg.c index c37e96e4..c502ec32 100644 --- a/library/socket/recvmsg.c +++ b/library/socket/recvmsg.c @@ -1,5 +1,5 @@ /* - * $Id: socket_recvmsg.c,v 1.7 2006-11-16 10:41:15 clib2devs Exp $ + * $Id: socket_recvmsg.c,v 1.7 2006-11-16 10:41:15 clib4devs Exp $ */ #ifndef _SOCKET_HEADERS_H @@ -10,7 +10,7 @@ int recvmsg(int sockfd, struct msghdr *msg, int flags) { struct fd *fd; int result = ERROR; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); @@ -28,10 +28,10 @@ recvmsg(int sockfd, struct msghdr *msg, int flags) { goto out; } - assert(sockfd >= 0 && sockfd < __clib2->__num_fd); - assert(__clib2->__fd[sockfd] != NULL); - assert(FLAG_IS_SET(__clib2->__fd[sockfd]->fd_Flags, FDF_IN_USE)); - assert(FLAG_IS_SET(__clib2->__fd[sockfd]->fd_Flags, FDF_IS_SOCKET)); + assert(sockfd >= 0 && sockfd < __clib4->__num_fd); + assert(__clib4->__fd[sockfd] != NULL); + assert(FLAG_IS_SET(__clib4->__fd[sockfd]->fd_Flags, FDF_IN_USE)); + assert(FLAG_IS_SET(__clib4->__fd[sockfd]->fd_Flags, FDF_IS_SOCKET)); fd = __get_file_descriptor_socket(sockfd); if (fd == NULL) diff --git a/library/socket/select.c b/library/socket/select.c index 04212d3e..d3b3bed1 100644 --- a/library/socket/select.c +++ b/library/socket/select.c @@ -1,5 +1,5 @@ /* - * $Id: socket_select.c,v 1.16 2006-04-05 07:53:24 clib2devs Exp $ + * $Id: socket_select.c,v 1.16 2006-04-05 07:53:24 clib4devs Exp $ */ #ifndef _SOCKET_HEADERS_H diff --git a/library/socket/select_signal.c b/library/socket/select_signal.c index 954eb3f3..6f32f795 100644 --- a/library/socket/select_signal.c +++ b/library/socket/select_signal.c @@ -1,5 +1,5 @@ /* - * $Id: socket_select_signal.c,v 1.7 2022-08-20 14:39:23 clib2devs Exp $ + * $Id: socket_select_signal.c,v 1.7 2022-08-20 14:39:23 clib4devs Exp $ */ #ifndef _SOCKET_HEADERS_H @@ -104,16 +104,16 @@ static struct fd * get_file_descriptor(int file_descriptor) { struct fd *result = NULL; struct fd *fd; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; - __stdio_lock(__clib2); + __stdio_lock(__clib4); - if (file_descriptor < 0 || file_descriptor >= __clib2->__num_fd) + if (file_descriptor < 0 || file_descriptor >= __clib4->__num_fd) goto out; - assert(__clib2->__fd != NULL); + assert(__clib4->__fd != NULL); - fd = __clib2->__fd[file_descriptor]; + fd = __clib4->__fd[file_descriptor]; assert(fd != NULL); @@ -124,7 +124,7 @@ get_file_descriptor(int file_descriptor) { out: - __stdio_unlock(__clib2); + __stdio_unlock(__clib4); return (result); } @@ -268,7 +268,7 @@ remap_descriptor_sets( fd_set *output_fds, int num_output_fds) { ENTER(); - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; SHOWPOINTER(socket_fds); SHOWVALUE(num_socket_fds); @@ -302,7 +302,7 @@ remap_descriptor_sets( fd = get_file_descriptor(output_fd); if (fd != NULL && FLAG_IS_SET(fd->fd_Flags, FDF_IS_SOCKET) && fd->fd_Socket == socket_fd) { assert(output_fd < num_output_fds); - assert(FLAG_IS_SET(__clib2->__fd[output_fd]->fd_Flags, FDF_IS_SOCKET)); + assert(FLAG_IS_SET(__clib4->__fd[output_fd]->fd_Flags, FDF_IS_SOCKET)); D(("setting file %ld for socket #%ld", output_fd, socket_fd)); @@ -322,7 +322,7 @@ remap_descriptor_sets( int output_fd = file_fd; assert(output_fd < num_output_fds); - assert(FLAG_IS_CLEAR(__clib2->__fd[output_fd]->fd_Flags, FDF_IS_SOCKET)); + assert(FLAG_IS_CLEAR(__clib4->__fd[output_fd]->fd_Flags, FDF_IS_SOCKET)); D(("setting file %ld", file_fd)); @@ -395,7 +395,7 @@ __select(int num_fds, fd_set *read_fds, fd_set *write_fds, fd_set *except_fds, s int num_file_used; int i; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); @@ -484,13 +484,13 @@ __select(int num_fds, fd_set *read_fds, fd_set *write_fds, fd_set *except_fds, s /* Translate from the tables the caller provided to us to the local copies, * which take the files and sockets into account. */ - __stdio_lock(__clib2); + __stdio_lock(__clib4); map_descriptor_sets(read_fds, num_fds, socket_read_fds, num_socket_used, &total_socket_fd, file_read_fds, num_file_used, &total_file_fd); map_descriptor_sets(write_fds, num_fds, socket_write_fds, num_socket_used, &total_socket_fd, file_write_fds, num_file_used, &total_file_fd); map_descriptor_sets(except_fds, num_fds, socket_except_fds, num_socket_used, &total_socket_fd, NULL, 0, &total_file_fd); - __stdio_unlock(__clib2); + __stdio_unlock(__clib4); /* Wait for socket input? */ if (total_socket_fd > 0) { @@ -607,20 +607,20 @@ __select(int num_fds, fd_set *read_fds, fd_set *write_fds, fd_set *except_fds, s /* Signals to stop on; we want to stop when a break signal arrives. */ break_mask = signal_mask; - if (__clib2->__check_abort_enabled) - break_mask |= __clib2->__break_signal_mask; + if (__clib4->__check_abort_enabled) + break_mask |= __clib4->__break_signal_mask; /* Check for socket input. */ result = __WaitSelect(total_socket_fd, socket_read_fds, socket_write_fds, socket_except_fds, (struct timeval *) &zero, &break_mask); /* Stop if a break signal arrives. */ - if ((result < 0 && __get_errno() == EINTR) || FLAG_IS_SET(break_mask, __clib2->__break_signal_mask)) { - SetSignal(__clib2->__break_signal_mask, __clib2->__break_signal_mask); + if ((result < 0 && __get_errno() == EINTR) || FLAG_IS_SET(break_mask, __clib4->__break_signal_mask)) { + SetSignal(__clib4->__break_signal_mask, __clib4->__break_signal_mask); __check_abort(); } if (0 == result && signal_mask_ptr) { - *signal_mask_ptr = break_mask & ~__clib2->__break_signal_mask; + *signal_mask_ptr = break_mask & ~__clib4->__break_signal_mask; break; } @@ -755,12 +755,12 @@ __select(int num_fds, fd_set *read_fds, fd_set *write_fds, fd_set *except_fds, s break_mask = signal_mask; - if (__clib2->__check_abort_enabled) - break_mask |= __clib2->__break_signal_mask; + if (__clib4->__check_abort_enabled) + break_mask |= __clib4->__break_signal_mask; result = __WaitSelect(total_socket_fd, socket_read_fds, socket_write_fds, socket_except_fds, (struct timeval *) timeout, &break_mask); - if ((result < 0 && __get_errno() == EINTR) || FLAG_IS_SET(break_mask, __clib2->__break_signal_mask)) { - SetSignal(__clib2->__break_signal_mask, __clib2->__break_signal_mask); + if ((result < 0 && __get_errno() == EINTR) || FLAG_IS_SET(break_mask, __clib4->__break_signal_mask)) { + SetSignal(__clib4->__break_signal_mask, __clib4->__break_signal_mask); __check_abort(); } @@ -913,7 +913,7 @@ __select(int num_fds, fd_set *read_fds, fd_set *write_fds, fd_set *except_fds, s standard break signal bit, then we must not clear the break signal. The ^C checking depends upon it to remain set. */ - (*signal_mask_ptr) = signal_mask & SetSignal(0, signal_mask & ~__clib2->__break_signal_mask); + (*signal_mask_ptr) = signal_mask & SetSignal(0, signal_mask & ~__clib4->__break_signal_mask); break; } @@ -939,13 +939,13 @@ __select(int num_fds, fd_set *read_fds, fd_set *write_fds, fd_set *except_fds, s if (result >= 0) { SHOWMSG("remapping fd_sets"); - __stdio_lock(__clib2); + __stdio_lock(__clib4); remap_descriptor_sets(socket_read_fds, total_socket_fd, file_read_fds, total_file_fd, read_fds, num_fds); remap_descriptor_sets(socket_write_fds, total_socket_fd, file_write_fds, total_file_fd, write_fds, num_fds); remap_descriptor_sets(socket_except_fds, total_socket_fd, NULL, 0, except_fds, num_fds); - __stdio_unlock(__clib2); + __stdio_unlock(__clib4); } __check_abort(); diff --git a/library/socket/send.c b/library/socket/send.c index 4cf0e332..c92406e4 100644 --- a/library/socket/send.c +++ b/library/socket/send.c @@ -1,5 +1,5 @@ /* - * $Id: socket_send.c,v 1.9 2006-11-16 10:41:15 clib2devs Exp $ + * $Id: socket_send.c,v 1.9 2006-11-16 10:41:15 clib4devs Exp $ */ #ifndef _SOCKET_HEADERS_H @@ -10,7 +10,7 @@ int send(int sockfd, const void *buff, size_t nbytes, int flags) { struct fd *fd; int result = ERROR; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); @@ -30,10 +30,10 @@ send(int sockfd, const void *buff, size_t nbytes, int flags) { goto out; } - assert(sockfd >= 0 && sockfd < __clib2->__num_fd); - assert(__clib2->__fd[sockfd] != NULL); - assert(FLAG_IS_SET(__clib2->__fd[sockfd]->fd_Flags, FDF_IN_USE)); - assert(FLAG_IS_SET(__clib2->__fd[sockfd]->fd_Flags, FDF_IS_SOCKET)); + assert(sockfd >= 0 && sockfd < __clib4->__num_fd); + assert(__clib4->__fd[sockfd] != NULL); + assert(FLAG_IS_SET(__clib4->__fd[sockfd]->fd_Flags, FDF_IN_USE)); + assert(FLAG_IS_SET(__clib4->__fd[sockfd]->fd_Flags, FDF_IS_SOCKET)); fd = __get_file_descriptor_socket(sockfd); if (fd == NULL) diff --git a/library/socket/sendmsg.c b/library/socket/sendmsg.c index bc9e3591..8277987a 100644 --- a/library/socket/sendmsg.c +++ b/library/socket/sendmsg.c @@ -1,5 +1,5 @@ /* - * $Id: socket_sendmsg.c,v 1.8 2006-11-16 10:41:15 clib2devs Exp $ + * $Id: socket_sendmsg.c,v 1.8 2006-11-16 10:41:15 clib4devs Exp $ */ #ifndef _SOCKET_HEADERS_H @@ -10,7 +10,7 @@ int sendmsg(int sockfd, const struct msghdr *msg, int flags) { struct fd *fd; int result = ERROR; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); @@ -28,10 +28,10 @@ sendmsg(int sockfd, const struct msghdr *msg, int flags) { goto out; } - assert(sockfd >= 0 && sockfd < __clib2->__num_fd); - assert(__clib2->__fd[sockfd] != NULL); - assert(FLAG_IS_SET(__clib2->__fd[sockfd]->fd_Flags, FDF_IN_USE)); - assert(FLAG_IS_SET(__clib2->__fd[sockfd]->fd_Flags, FDF_IS_SOCKET)); + assert(sockfd >= 0 && sockfd < __clib4->__num_fd); + assert(__clib4->__fd[sockfd] != NULL); + assert(FLAG_IS_SET(__clib4->__fd[sockfd]->fd_Flags, FDF_IN_USE)); + assert(FLAG_IS_SET(__clib4->__fd[sockfd]->fd_Flags, FDF_IS_SOCKET)); fd = __get_file_descriptor_socket(sockfd); if (fd == NULL) diff --git a/library/socket/sendto.c b/library/socket/sendto.c index 05a7f984..6882b161 100644 --- a/library/socket/sendto.c +++ b/library/socket/sendto.c @@ -1,5 +1,5 @@ /* - * $Id: socket_sendto.c,v 1.11 2006-11-16 10:41:15 clib2devs Exp $ + * $Id: socket_sendto.c,v 1.11 2006-11-16 10:41:15 clib4devs Exp $ */ #ifndef _SOCKET_HEADERS_H @@ -10,7 +10,7 @@ int sendto(int sockfd, const void *buff, size_t len, int flags, const struct sockaddr *to, socklen_t tolen) { struct fd *fd; int result = ERROR; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); @@ -31,10 +31,10 @@ sendto(int sockfd, const void *buff, size_t len, int flags, const struct sockadd goto out; } - assert(sockfd >= 0 && sockfd < __clib2->__num_fd); - assert(__clib2->__fd[sockfd] != NULL); - assert(FLAG_IS_SET(__clib2->__fd[sockfd]->fd_Flags, FDF_IN_USE)); - assert(FLAG_IS_SET(__clib2->__fd[sockfd]->fd_Flags, FDF_IS_SOCKET)); + assert(sockfd >= 0 && sockfd < __clib4->__num_fd); + assert(__clib4->__fd[sockfd] != NULL); + assert(FLAG_IS_SET(__clib4->__fd[sockfd]->fd_Flags, FDF_IN_USE)); + assert(FLAG_IS_SET(__clib4->__fd[sockfd]->fd_Flags, FDF_IS_SOCKET)); fd = __get_file_descriptor_socket(sockfd); if (fd == NULL) diff --git a/library/socket/set_h_errno.c b/library/socket/set_h_errno.c index d07253c2..9f1e398d 100644 --- a/library/socket/set_h_errno.c +++ b/library/socket/set_h_errno.c @@ -1,5 +1,5 @@ /* - * $Id: socket_set_h_errno.c,v 1.2 2006-01-08 12:04:24 clib2devs Exp $ + * $Id: socket_set_h_errno.c,v 1.2 2006-01-08 12:04:24 clib4devs Exp $ */ #ifndef _SOCKET_HEADERS_H diff --git a/library/socket/setlogmask.c b/library/socket/setlogmask.c index 6561a9f4..fbfa4e4b 100644 --- a/library/socket/setlogmask.c +++ b/library/socket/setlogmask.c @@ -1,5 +1,5 @@ /* - * $Id: socket_setlogmask.c,v 1.0 2022-01-22 18:27:15 clib2devs Exp $ + * $Id: socket_setlogmask.c,v 1.0 2022-01-22 18:27:15 clib4devs Exp $ */ #ifndef _SOCKET_HEADERS_H @@ -13,11 +13,11 @@ setlogmask(int maskpri) { ENTER(); SHOWVALUE(maskpri); - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; - int ret = __clib2->syslog_mask; + int ret = __clib4->syslog_mask; if (maskpri) - __clib2->syslog_mask = maskpri; + __clib4->syslog_mask = maskpri; RETURN(ret); return ret; diff --git a/library/socket/setsockopt.c b/library/socket/setsockopt.c index acd98d4d..93aca050 100644 --- a/library/socket/setsockopt.c +++ b/library/socket/setsockopt.c @@ -1,5 +1,5 @@ /* - * $Id: socket_setsockopt.c,v 1.10 2006-11-16 10:41:15 clib2devs Exp $ + * $Id: socket_setsockopt.c,v 1.10 2006-11-16 10:41:15 clib4devs Exp $ */ #ifndef _SOCKET_HEADERS_H @@ -10,7 +10,7 @@ int setsockopt(int sockfd, int level, int optname, const void *optval, socklen_t optlen) { struct fd *fd; int result = ERROR; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); @@ -30,10 +30,10 @@ setsockopt(int sockfd, int level, int optname, const void *optval, socklen_t opt goto out; } - assert(sockfd >= 0 && sockfd < __clib2->__num_fd); - assert(__clib2->__fd[sockfd] != NULL); - assert(FLAG_IS_SET(__clib2->__fd[sockfd]->fd_Flags, FDF_IN_USE)); - assert(FLAG_IS_SET(__clib2->__fd[sockfd]->fd_Flags, FDF_IS_SOCKET)); + assert(sockfd >= 0 && sockfd < __clib4->__num_fd); + assert(__clib4->__fd[sockfd] != NULL); + assert(FLAG_IS_SET(__clib4->__fd[sockfd]->fd_Flags, FDF_IN_USE)); + assert(FLAG_IS_SET(__clib4->__fd[sockfd]->fd_Flags, FDF_IS_SOCKET)); fd = __get_file_descriptor_socket(sockfd); if (fd == NULL) diff --git a/library/socket/shutdown.c b/library/socket/shutdown.c index a7aa7fd9..030b95a3 100644 --- a/library/socket/shutdown.c +++ b/library/socket/shutdown.c @@ -1,5 +1,5 @@ /* - * $Id: socket_shutdown.c,v 1.6 2006-11-16 10:41:15 clib2devs Exp $ + * $Id: socket_shutdown.c,v 1.6 2006-11-16 10:41:15 clib4devs Exp $ */ #ifndef _SOCKET_HEADERS_H @@ -10,7 +10,7 @@ int shutdown(int sockfd, int how) { struct fd *fd; int result = ERROR; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); @@ -19,10 +19,10 @@ shutdown(int sockfd, int how) { DECLARE_SOCKETBASE(); - assert(sockfd >= 0 && sockfd < __clib2->__num_fd); - assert(__clib2->__fd[sockfd] != NULL); - assert(FLAG_IS_SET(__clib2->__fd[sockfd]->fd_Flags, FDF_IN_USE)); - assert(FLAG_IS_SET(__clib2->__fd[sockfd]->fd_Flags, FDF_IS_SOCKET)); + assert(sockfd >= 0 && sockfd < __clib4->__num_fd); + assert(__clib4->__fd[sockfd] != NULL); + assert(FLAG_IS_SET(__clib4->__fd[sockfd]->fd_Flags, FDF_IN_USE)); + assert(FLAG_IS_SET(__clib4->__fd[sockfd]->fd_Flags, FDF_IS_SOCKET)); fd = __get_file_descriptor_socket(sockfd); if (fd == NULL) diff --git a/library/socket/socket.c b/library/socket/socket.c index 7401e514..12c74fa3 100644 --- a/library/socket/socket.c +++ b/library/socket/socket.c @@ -1,5 +1,5 @@ /* - * $Id: socket_socket.c,v 1.10 2006-01-08 12:04:24 clib2devs Exp $ + * $Id: socket_socket.c,v 1.10 2006-01-08 12:04:24 clib4devs Exp $ */ #ifndef _SOCKET_HEADERS_H @@ -13,7 +13,7 @@ socket(int domain, int type, int protocol) { struct fd *fd; int fd_slot_number; LONG socket_fd; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); @@ -21,16 +21,16 @@ socket(int domain, int type, int protocol) { SHOWVALUE(type); SHOWVALUE(protocol); - __stdio_lock(__clib2); + __stdio_lock(__clib4); - fd_slot_number = __find_vacant_fd_entry(__clib2); + fd_slot_number = __find_vacant_fd_entry(__clib4); if (fd_slot_number < 0) { - if (__grow_fd_table(__clib2, 0) < 0) { + if (__grow_fd_table(__clib4, 0) < 0) { SHOWMSG("couldn't find a vacant fd slot and no memory to create one"); goto out; } - fd_slot_number = __find_vacant_fd_entry(__clib2); + fd_slot_number = __find_vacant_fd_entry(__clib4); assert(fd_slot_number >= 0); } @@ -58,7 +58,7 @@ socket(int domain, int type, int protocol) { goto out; } - fd = __clib2->__fd[fd_slot_number]; + fd = __clib4->__fd[fd_slot_number]; __initialize_fd(fd, __socket_hook_entry, (BPTR) socket_fd, FDF_IN_USE | FDF_IS_SOCKET | FDF_READ | FDF_WRITE, lock); @@ -68,7 +68,7 @@ socket(int domain, int type, int protocol) { out: - __stdio_unlock(__clib2); + __stdio_unlock(__clib4); __delete_semaphore(lock); __check_abort(); diff --git a/library/socket/socket_headers.h b/library/socket/socket_headers.h index 5804dbeb..f2f46f76 100755 --- a/library/socket/socket_headers.h +++ b/library/socket/socket_headers.h @@ -1,5 +1,5 @@ /* - * $Id: socket_headers.h,v 1.14 2006-04-05 07:53:24 clib2devs Exp $ + * $Id: socket_headers.h,v 1.14 2006-04-05 07:53:24 clib4devs Exp $ */ #ifndef _SOCKET_HEADERS_H @@ -53,8 +53,8 @@ #include #endif -#ifndef _CLIB2_H -#include +#ifndef _CLIB4_H +#include #endif #ifndef _PATH_ETHERS @@ -98,68 +98,68 @@ struct UnixSocket { #define SBTC_ERROR_HOOK 68 /* Error hook pointer */ #define DECLARE_SOCKETBASE() \ - struct Library UNUSED *SocketBase = __CLIB2->__SocketBase; \ - struct SocketIFace *ISocket = __CLIB2->__ISocket + struct Library UNUSED *SocketBase = __CLIB4->__SocketBase; \ + struct SocketIFace *ISocket = __CLIB4->__ISocket extern int h_errno; extern struct fd * __get_file_descriptor_socket(int socket_descriptor); -extern int64_t __socket_hook_entry(struct _clib2 *__clib2, struct fd * fd,struct file_action_message * fam); +extern int64_t __socket_hook_entry(struct _clib4 *__clib4, struct fd * fd,struct file_action_message * fam); extern void __set_h_errno(int new_h_errno); extern int __select(int num_fds,fd_set *read_fds,fd_set *write_fds,fd_set *except_fds,struct timeval *timeout,ULONG * signal_mask_ptr); #include -#define __socket(domain, type, protocol) __CLIB2->__ISocket->socket(domain , type , protocol) -#define __bind(sock, name, namelen) __CLIB2->__ISocket->bind(sock , name , namelen) -#define __listen(sock, backlog) __CLIB2->__ISocket->listen(sock , backlog) -#define __accept(sock, addr, addrlen) __CLIB2->__ISocket->accept(sock , addr , addrlen) -#define __connect(sock, name, namelen) __CLIB2->__ISocket->connect(sock , name , namelen) -#define __sendto(sock, buf, len, flags, to, tolen) __CLIB2->__ISocket->sendto(sock , buf , len , flags , to , tolen) -#define __send(sock, buf, len, flags) __CLIB2->__ISocket->send(sock , buf , len , flags) -#define __recvfrom(sock, buf, len, flags, addr, addrlen) __CLIB2->__ISocket->recvfrom(sock , buf , len , flags , addr , addrlen) -#define __recv(sock, buf, len, flags) __CLIB2->__ISocket->recv(sock , buf , len , flags) -#define __shutdown(sock, how) __CLIB2->__ISocket->shutdown(sock , how) -#define __setsockopt(sock, level, optname, optval, optlen) __CLIB2->__ISocket->setsockopt(sock , level , optname , optval , optlen) -#define __getsockopt(sock, level, optname, optval, optlen) __CLIB2->__ISocket->getsockopt(sock , level , optname , optval , optlen) -#define __getsockname(sock, name, namelen) __CLIB2->__ISocket->getsockname(sock , name , namelen) -#define __getpeername(sock, name, namelen) __CLIB2->__ISocket->getpeername(sock , name , namelen) -#define __IoctlSocket(sock, req, argp) __CLIB2->__ISocket->IoctlSocket(sock , req , argp) -#define __CloseSocket(sock) __CLIB2->__ISocket->CloseSocket(sock) -#define __WaitSelect(nfds, read_fds, write_fds, except_fds, timeout, signals) __CLIB2->__ISocket->WaitSelect(nfds , read_fds , write_fds , except_fds , timeout , signals) -#define __SetSocketSignals(int_mask, io_mask, urgent_mask) __CLIB2->__ISocket->SetSocketSignals(int_mask , io_mask , urgent_mask) -#define __getdtablesize() __CLIB2->__ISocket->getdtablesize() -#define __ObtainSocket(id, domain, type, protocol) __CLIB2->__ISocket->ObtainSocket(id , domain , type , protocol) -#define __ReleaseSocket(sock, id) __CLIB2->__ISocket->ReleaseSocket(sock , id) -#define __ReleaseCopyOfSocket(sock, id) __CLIB2->__ISocket->ReleaseCopyOfSocket(sock , id) -#define __Errno() __CLIB2->__ISocket->Errno() -#define __SetErrnoPtr(errno_ptr, size) __CLIB2->__ISocket->SetErrnoPtr(errno_ptr , size) -//#define __Inet_NtoA(ip) __CLIB2->__ISocket->Inet_NtoA(ip) -//#define __Inet_AtoN(cp, ip) __CLIB2->__ISocket->inet_aton(cp, ip) -//#define __inet_addr(cp) __CLIB2->__ISocket->inet_addr(cp) -//#define __Inet_LnaOf(in) __CLIB2->__ISocket->Inet_LnaOf(in) -//#define __Inet_NetOf(in) __CLIB2->__ISocket->Inet_NetOf(in) -//#define __Inet_MakeAddr(net, host) __CLIB2->__ISocket->Inet_MakeAddr(net , host) -//#define __inet_network(cp) __CLIB2->__ISocket->inet_network(cp) -//#define __gethostbyname(name) __CLIB2->__ISocket->gethostbyname(name) -//#define __gethostbyaddr(addr, len, type) __CLIB2->__ISocket->gethostbyaddr(addr , len , type) -#define __getnetbyname(name) __CLIB2->__ISocket->getnetbyname(name) -#define __getnetbyaddr(net, type) __CLIB2->__ISocket->getnetbyaddr(net , type) -//#define __getservbyname(name, proto) __CLIB2->__ISocket->getservbyname(name , proto) -//#define __getservbyport(port, proto) __CLIB2->__ISocket->getservbyport(port , proto) -#define __getprotobyname(name) __CLIB2->__ISocket->getprotobyname(name) -#define __getprotobynumber(proto) __CLIB2->__ISocket->getprotobynumber(proto) -#define __vsyslog(pri, msg, args) __CLIB2->__ISocket->vsyslog(pri , msg , args) -#define __syslog(pri, msg, tag1...) __CLIB2->__ISocket->syslog(pri , msg , ## tag1) -#define __Dup2Socket(old_socket, new_socket) __CLIB2->__ISocket->Dup2Socket(old_socket , new_socket) -#define __sendmsg(sock, msg, flags) __CLIB2->__ISocket->sendmsg(sock , msg , flags) -#define __recvmsg(sock, msg, flags) __CLIB2->__ISocket->recvmsg(sock , msg , flags) -#define __gethostname(name, namelen) __CLIB2->__ISocket->gethostname(name , namelen) -#define __gethostid() __CLIB2->__ISocket->gethostid() -#define __SocketBaseTagList(tags) __CLIB2->__ISocket->SocketBaseTagList(tags) -#define __SocketBaseTags(tag1...) __CLIB2->__ISocket->SocketBaseTags(## tag1) -#define __ProcessIsServer(pr) __CLIB2->__ISocket->ProcessIsServer(pr) -#define __getdomainname(buffer, size) __CLIB2->__ISocket->GetDefaultDomainName(buffer, size) -#define __setdomainname(buffer) __CLIB2->__ISocket->SetDefaultDomainName(buffer) +#define __socket(domain, type, protocol) __CLIB4->__ISocket->socket(domain , type , protocol) +#define __bind(sock, name, namelen) __CLIB4->__ISocket->bind(sock , name , namelen) +#define __listen(sock, backlog) __CLIB4->__ISocket->listen(sock , backlog) +#define __accept(sock, addr, addrlen) __CLIB4->__ISocket->accept(sock , addr , addrlen) +#define __connect(sock, name, namelen) __CLIB4->__ISocket->connect(sock , name , namelen) +#define __sendto(sock, buf, len, flags, to, tolen) __CLIB4->__ISocket->sendto(sock , buf , len , flags , to , tolen) +#define __send(sock, buf, len, flags) __CLIB4->__ISocket->send(sock , buf , len , flags) +#define __recvfrom(sock, buf, len, flags, addr, addrlen) __CLIB4->__ISocket->recvfrom(sock , buf , len , flags , addr , addrlen) +#define __recv(sock, buf, len, flags) __CLIB4->__ISocket->recv(sock , buf , len , flags) +#define __shutdown(sock, how) __CLIB4->__ISocket->shutdown(sock , how) +#define __setsockopt(sock, level, optname, optval, optlen) __CLIB4->__ISocket->setsockopt(sock , level , optname , optval , optlen) +#define __getsockopt(sock, level, optname, optval, optlen) __CLIB4->__ISocket->getsockopt(sock , level , optname , optval , optlen) +#define __getsockname(sock, name, namelen) __CLIB4->__ISocket->getsockname(sock , name , namelen) +#define __getpeername(sock, name, namelen) __CLIB4->__ISocket->getpeername(sock , name , namelen) +#define __IoctlSocket(sock, req, argp) __CLIB4->__ISocket->IoctlSocket(sock , req , argp) +#define __CloseSocket(sock) __CLIB4->__ISocket->CloseSocket(sock) +#define __WaitSelect(nfds, read_fds, write_fds, except_fds, timeout, signals) __CLIB4->__ISocket->WaitSelect(nfds , read_fds , write_fds , except_fds , timeout , signals) +#define __SetSocketSignals(int_mask, io_mask, urgent_mask) __CLIB4->__ISocket->SetSocketSignals(int_mask , io_mask , urgent_mask) +#define __getdtablesize() __CLIB4->__ISocket->getdtablesize() +#define __ObtainSocket(id, domain, type, protocol) __CLIB4->__ISocket->ObtainSocket(id , domain , type , protocol) +#define __ReleaseSocket(sock, id) __CLIB4->__ISocket->ReleaseSocket(sock , id) +#define __ReleaseCopyOfSocket(sock, id) __CLIB4->__ISocket->ReleaseCopyOfSocket(sock , id) +#define __Errno() __CLIB4->__ISocket->Errno() +#define __SetErrnoPtr(errno_ptr, size) __CLIB4->__ISocket->SetErrnoPtr(errno_ptr , size) +//#define __Inet_NtoA(ip) __CLIB4->__ISocket->Inet_NtoA(ip) +//#define __Inet_AtoN(cp, ip) __CLIB4->__ISocket->inet_aton(cp, ip) +//#define __inet_addr(cp) __CLIB4->__ISocket->inet_addr(cp) +//#define __Inet_LnaOf(in) __CLIB4->__ISocket->Inet_LnaOf(in) +//#define __Inet_NetOf(in) __CLIB4->__ISocket->Inet_NetOf(in) +//#define __Inet_MakeAddr(net, host) __CLIB4->__ISocket->Inet_MakeAddr(net , host) +//#define __inet_network(cp) __CLIB4->__ISocket->inet_network(cp) +//#define __gethostbyname(name) __CLIB4->__ISocket->gethostbyname(name) +//#define __gethostbyaddr(addr, len, type) __CLIB4->__ISocket->gethostbyaddr(addr , len , type) +#define __getnetbyname(name) __CLIB4->__ISocket->getnetbyname(name) +#define __getnetbyaddr(net, type) __CLIB4->__ISocket->getnetbyaddr(net , type) +//#define __getservbyname(name, proto) __CLIB4->__ISocket->getservbyname(name , proto) +//#define __getservbyport(port, proto) __CLIB4->__ISocket->getservbyport(port , proto) +#define __getprotobyname(name) __CLIB4->__ISocket->getprotobyname(name) +#define __getprotobynumber(proto) __CLIB4->__ISocket->getprotobynumber(proto) +#define __vsyslog(pri, msg, args) __CLIB4->__ISocket->vsyslog(pri , msg , args) +#define __syslog(pri, msg, tag1...) __CLIB4->__ISocket->syslog(pri , msg , ## tag1) +#define __Dup2Socket(old_socket, new_socket) __CLIB4->__ISocket->Dup2Socket(old_socket , new_socket) +#define __sendmsg(sock, msg, flags) __CLIB4->__ISocket->sendmsg(sock , msg , flags) +#define __recvmsg(sock, msg, flags) __CLIB4->__ISocket->recvmsg(sock , msg , flags) +#define __gethostname(name, namelen) __CLIB4->__ISocket->gethostname(name , namelen) +#define __gethostid() __CLIB4->__ISocket->gethostid() +#define __SocketBaseTagList(tags) __CLIB4->__ISocket->SocketBaseTagList(tags) +#define __SocketBaseTags(tag1...) __CLIB4->__ISocket->SocketBaseTags(## tag1) +#define __ProcessIsServer(pr) __CLIB4->__ISocket->ProcessIsServer(pr) +#define __getdomainname(buffer, size) __CLIB4->__ISocket->GetDefaultDomainName(buffer, size) +#define __setdomainname(buffer) __CLIB4->__ISocket->SetDefaultDomainName(buffer) #endif /* _SOCKET_HEADERS_H */ diff --git a/library/socket/socketpair.c b/library/socket/socketpair.c index a8422795..0778fe78 100644 --- a/library/socket/socketpair.c +++ b/library/socket/socketpair.c @@ -1,5 +1,5 @@ /* - * $Id: socket_socketpair.c,v 1.0 2021-01-24 18:27:15 clib2devs Exp $ + * $Id: socket_socketpair.c,v 1.0 2021-01-24 18:27:15 clib4devs Exp $ */ #ifndef _SOCKET_HEADERS_H diff --git a/library/socket/syslog.c b/library/socket/syslog.c index bad09f94..12c320e5 100644 --- a/library/socket/syslog.c +++ b/library/socket/syslog.c @@ -1,5 +1,5 @@ /* - * $Id: socket_syslog.c,v 1.0 2022-01-22 18:27:15 clib2devs Exp $ + * $Id: socket_syslog.c,v 1.0 2022-01-22 18:27:15 clib4devs Exp $ */ #ifndef _SOCKET_HEADERS_H diff --git a/library/socket/vsyslog.c b/library/socket/vsyslog.c index 67cbaec5..bed45418 100644 --- a/library/socket/vsyslog.c +++ b/library/socket/vsyslog.c @@ -1,5 +1,5 @@ /* - * $Id: socket_vsyslog.c,v 1.0 2022-01-22 18:27:15 clib2devs Exp $ + * $Id: socket_vsyslog.c,v 1.0 2022-01-22 18:27:15 clib4devs Exp $ */ #define SYSLOG_NAMES @@ -21,9 +21,9 @@ vsyslog(int priority, const char *message, va_list args) { SHOWVALUE(priority); SHOWSTRING(message); - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; - if (!(__clib2->syslog_mask & LOG_MASK(priority & 7)) || (priority & ~0x3ff)) + if (!(__clib4->syslog_mask & LOG_MASK(priority & 7)) || (priority & ~0x3ff)) return; int l, l2, hlen, pid; @@ -33,13 +33,13 @@ vsyslog(int priority, const char *message, va_list args) { char buf[1024] = {0}; if (!(priority & LOG_FACMASK)) - priority |= __clib2->syslog_facility; + priority |= __clib4->syslog_facility; now = time(NULL); gmtime_r(&now, &tm); strftime(timebuf, sizeof timebuf, "%b %e %T", &tm); - pid = (__clib2->syslog_openlog_flags & LOG_PID) ? getpid() : 0; - l = snprintf(buf, sizeof buf, "<%s>\t%s %n%s%s%.0d%s: ", prioritynames[priority].c_name, timebuf, &hlen, __clib2->syslog_ident, "[" + !pid, pid, "]" + !pid); + pid = (__clib4->syslog_openlog_flags & LOG_PID) ? getpid() : 0; + l = snprintf(buf, sizeof buf, "<%s>\t%s %n%s%s%.0d%s: ", prioritynames[priority].c_name, timebuf, &hlen, __clib4->syslog_ident, "[" + !pid, pid, "]" + !pid); l2 = vsnprintf(buf + l, sizeof buf - l, message, args); if (l2 >= 0) { @@ -49,8 +49,8 @@ vsyslog(int priority, const char *message, va_list args) { l += l2; if (buf[l - 1] != '\n') buf[l++] = '\n'; - if (__clib2->syslog_fd != NULL) { - fprintf(__clib2->syslog_fd, "%s", &buf); + if (__clib4->syslog_fd != NULL) { + fprintf(__clib4->syslog_fd, "%s", &buf); } else { __vsyslog(priority, (char *) message, args); diff --git a/library/socket/wait_select.c b/library/socket/wait_select.c index 58f904b5..294f7ced 100644 --- a/library/socket/wait_select.c +++ b/library/socket/wait_select.c @@ -1,5 +1,5 @@ /* - * $Id: socket_wait_select.c,v 1.4 2008-04-16 07:53:40 clib2devs Exp $ + * $Id: socket_wait_select.c,v 1.4 2008-04-16 07:53:40 clib4devs Exp $ */ #ifndef _SOCKET_HEADERS_H diff --git a/library/stat/chmod.c b/library/stat/chmod.c index 5986c8f0..c7a77236 100644 --- a/library/stat/chmod.c +++ b/library/stat/chmod.c @@ -1,5 +1,5 @@ /* - * $Id: stat_chmod.c,v 1.8 2006-01-08 12:04:24 clib2devs Exp $ + * $Id: stat_chmod.c,v 1.8 2006-01-08 12:04:24 clib4devs Exp $ */ #ifndef _STAT_HEADERS_H @@ -14,7 +14,7 @@ chmod(const char *path_name, mode_t mode) { ULONG protection; LONG status; int result = ERROR; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); @@ -32,7 +32,7 @@ chmod(const char *path_name, mode_t mode) { goto out; } - if (__clib2->__unix_path_semantics) { + if (__clib4->__unix_path_semantics) { if (path_name[0] == '\0') { SHOWMSG("no name given"); diff --git a/library/stat/convertfileinfo.c b/library/stat/convertfileinfo.c index 9482f614..c0c278bd 100644 --- a/library/stat/convertfileinfo.c +++ b/library/stat/convertfileinfo.c @@ -1,5 +1,5 @@ /* - * $Id: stat_convertfileinfo.c,v 1.9 2006-09-20 19:46:57 clib2devs Exp $ + * $Id: stat_convertfileinfo.c,v 1.9 2006-09-20 19:46:57 clib4devs Exp $ */ #ifndef _STAT_HEADERS_H diff --git a/library/stat/fchmod.c b/library/stat/fchmod.c index 9e9c5be3..b0249a7b 100755 --- a/library/stat/fchmod.c +++ b/library/stat/fchmod.c @@ -1,5 +1,5 @@ /* - * $Id: stat_fchmod.c,v 1.14 2021-01-31 14:39:23 clib2devs Exp $ + * $Id: stat_fchmod.c,v 1.14 2021-01-31 14:39:23 clib4devs Exp $ */ #ifndef _STAT_HEADERS_H @@ -16,20 +16,20 @@ fchmod(int file_descriptor, mode_t mode) { int result = ERROR; struct fd *fd = NULL; LONG success; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); SHOWVALUE(file_descriptor); SHOWVALUE(mode); - assert(file_descriptor >= 0 && file_descriptor < __clib2->__num_fd); - assert(__clib2->__fd[file_descriptor] != NULL); - assert(FLAG_IS_SET(__clib2->__fd[file_descriptor]->fd_Flags, FDF_IN_USE)); + assert(file_descriptor >= 0 && file_descriptor < __clib4->__num_fd); + assert(__clib4->__fd[file_descriptor] != NULL); + assert(FLAG_IS_SET(__clib4->__fd[file_descriptor]->fd_Flags, FDF_IN_USE)); __check_abort(); - __stdio_lock(__clib2); + __stdio_lock(__clib4); fd = __get_file_descriptor(file_descriptor); if (fd == NULL) { @@ -115,7 +115,7 @@ fchmod(int file_descriptor, mode_t mode) { out: __fd_unlock(fd); - __stdio_unlock(__clib2); + __stdio_unlock(__clib4); if (current_dir_changed) SetCurrentDir(old_current_dir); diff --git a/library/stat/fstat.c b/library/stat/fstat.c index 61be1321..16d7e0a8 100644 --- a/library/stat/fstat.c +++ b/library/stat/fstat.c @@ -1,5 +1,5 @@ /* - * $Id: stat_fstat.c,v 1.11 2021-01-31 12:04:24 clib2devs Exp $ + * $Id: stat_fstat.c,v 1.11 2021-01-31 12:04:24 clib4devs Exp $ */ #ifndef _STAT_HEADERS_H @@ -12,7 +12,7 @@ fstat(int file_descriptor, struct stat *buffer) { struct ExamineData fib; struct fd *fd = NULL; int result = ERROR; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); @@ -23,7 +23,7 @@ fstat(int file_descriptor, struct stat *buffer) { __check_abort(); - __stdio_lock(__clib2); + __stdio_lock(__clib4); if (buffer == NULL) { SHOWMSG("invalid buffer parameter"); @@ -32,9 +32,9 @@ fstat(int file_descriptor, struct stat *buffer) { goto out; } - assert(file_descriptor >= 0 && file_descriptor < __clib2->__num_fd); - assert(__clib2->__fd[file_descriptor] != NULL); - assert(FLAG_IS_SET(__clib2->__fd[file_descriptor]->fd_Flags, FDF_IN_USE)); + assert(file_descriptor >= 0 && file_descriptor < __clib4->__num_fd); + assert(__clib4->__fd[file_descriptor] != NULL); + assert(FLAG_IS_SET(__clib4->__fd[file_descriptor]->fd_Flags, FDF_IN_USE)); fd = __get_file_descriptor(file_descriptor); if (fd == NULL) { @@ -52,7 +52,7 @@ fstat(int file_descriptor, struct stat *buffer) { assert(fd->fd_Action != NULL); - if ((*fd->fd_Action)(__clib2, fd, &fam) < 0) { + if ((*fd->fd_Action)(__clib4, fd, &fam) < 0) { __set_errno(fam.fam_Error); goto out; } @@ -73,7 +73,7 @@ fstat(int file_descriptor, struct stat *buffer) { out: __fd_unlock(fd); - __stdio_unlock(__clib2); + __stdio_unlock(__clib4); RETURN(result); return (result); diff --git a/library/stat/futimens.c b/library/stat/futimens.c index bf1e1edc..d5d7cb9d 100644 --- a/library/stat/futimens.c +++ b/library/stat/futimens.c @@ -1,5 +1,5 @@ /* - * $Id: stat_futimens.c,v 1.0 2023-05-26 12:04:24 clib2devs Exp $ + * $Id: stat_futimens.c,v 1.0 2023-05-26 12:04:24 clib4devs Exp $ */ #ifndef _STAT_HEADERS_H diff --git a/library/stat/lock.c b/library/stat/lock.c index 1c489c6a..81e40ae2 100644 --- a/library/stat/lock.c +++ b/library/stat/lock.c @@ -1,5 +1,5 @@ /* - * $Id: stat_lock.c,v 1.1 2006-11-13 09:25:28 clib2devs Exp $ + * $Id: stat_lock.c,v 1.1 2006-11-13 09:25:28 clib4devs Exp $ */ #ifndef _STAT_HEADERS_H diff --git a/library/stat/lstat.c b/library/stat/lstat.c index 3727286b..8adbe333 100755 --- a/library/stat/lstat.c +++ b/library/stat/lstat.c @@ -1,5 +1,5 @@ /* - * $Id: stat_lstat.c,v 1.16 2021-01-31 09:25:28 clib2devs Exp $ + * $Id: stat_lstat.c,v 1.16 2021-01-31 09:25:28 clib4devs Exp $ */ #ifndef _STAT_HEADERS_H @@ -22,7 +22,7 @@ lstat(const char *path_name, struct stat *st) { struct ExamineData *fib = NULL; BPTR file_lock = BZERO; int link_length = -1; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); @@ -40,7 +40,7 @@ lstat(const char *path_name, struct stat *st) { goto out; } - if (__clib2->__unix_path_semantics) { + if (__clib4->__unix_path_semantics) { if (path_name[0] == '\0') { SHOWMSG("no name given"); diff --git a/library/stat/mkdir.c b/library/stat/mkdir.c index bdda88d7..033c8fb3 100644 --- a/library/stat/mkdir.c +++ b/library/stat/mkdir.c @@ -1,5 +1,5 @@ /* - * $Id: stat_mkdir.c,v 1.7 2006-01-08 12:04:24 clib2devs Exp $ + * $Id: stat_mkdir.c,v 1.7 2006-01-08 12:04:24 clib4devs Exp $ */ #ifndef _STAT_HEADERS_H @@ -13,7 +13,7 @@ int mkdir(const char *path_name, mode_t mode) { ULONG protection; int result = ERROR; BPTR dir_lock; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); @@ -31,7 +31,7 @@ int mkdir(const char *path_name, mode_t mode) { goto out; } - if (__clib2->__unix_path_semantics) { + if (__clib4->__unix_path_semantics) { if (__translate_unix_to_amiga_path_name(&path_name, &path_name_nti) != 0) goto out; diff --git a/library/stat/rmdir.c b/library/stat/rmdir.c index 8438166f..ef7d4a0c 100755 --- a/library/stat/rmdir.c +++ b/library/stat/rmdir.c @@ -1,5 +1,5 @@ /* - * $Id: stat_rmdir.c,v 1.9 2021-01-31 12:04:24 clib2devs Exp $ + * $Id: stat_rmdir.c,v 1.9 2021-01-31 12:04:24 clib4devs Exp $ */ #ifndef _STAT_HEADERS_H @@ -13,7 +13,7 @@ rmdir(const char *path_name) { int result = ERROR; struct ExamineData *fib = NULL; LONG status; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); @@ -30,7 +30,7 @@ rmdir(const char *path_name) { goto out; } - if (__clib2->__unix_path_semantics) { + if (__clib4->__unix_path_semantics) { if (path_name[0] == '\0') { SHOWMSG("no name given"); diff --git a/library/stat/stat.c b/library/stat/stat.c index 5d2d26c9..b7395c97 100755 --- a/library/stat/stat.c +++ b/library/stat/stat.c @@ -1,5 +1,5 @@ /* - * $Id: stat_stat.c,v 1.11 2021-01-31 12:04:24 clib2devs Exp $ + * $Id: stat_stat.c,v 1.11 2021-01-31 12:04:24 clib4devs Exp $ */ #ifndef _STAT_HEADERS_H @@ -21,7 +21,7 @@ stat(const char *path_name, struct stat *st) { struct Lock *fl; int result = ERROR; BPTR file_lock = BZERO; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); @@ -39,7 +39,7 @@ stat(const char *path_name, struct stat *st) { goto out; } - if (__clib2->__unix_path_semantics) { + if (__clib4->__unix_path_semantics) { if (path_name[0] == '\0') { SHOWMSG("no name given"); diff --git a/library/stat/stat_headers.h b/library/stat/stat_headers.h index 7e41aeeb..a02bb503 100755 --- a/library/stat/stat_headers.h +++ b/library/stat/stat_headers.h @@ -1,5 +1,5 @@ /* - * $Id: stat_headers.h,v 1.7 2006-11-13 09:25:28 clib2devs Exp $ + * $Id: stat_headers.h,v 1.7 2006-11-13 09:25:28 clib4devs Exp $ */ #ifndef _STAT_HEADERS_H diff --git a/library/stat/umask.c b/library/stat/umask.c index 9b0428da..842076ea 100644 --- a/library/stat/umask.c +++ b/library/stat/umask.c @@ -1,5 +1,5 @@ /* - * $Id: stat_umask.c,v 1.7 2006-01-08 12:04:24 clib2devs Exp $ + * $Id: stat_umask.c,v 1.7 2006-01-08 12:04:24 clib4devs Exp $ */ #ifndef _STAT_HEADERS_H diff --git a/library/stat/utimensat.c b/library/stat/utimensat.c index 84e2a34a..04560f40 100644 --- a/library/stat/utimensat.c +++ b/library/stat/utimensat.c @@ -1,5 +1,5 @@ /* - * $Id: stat_utimensat.c,v 2.0 2023-05-26 12:04:24 clib2devs Exp $ + * $Id: stat_utimensat.c,v 2.0 2023-05-26 12:04:24 clib4devs Exp $ */ #ifndef _STAT_HEADERS_H @@ -18,7 +18,7 @@ int utimensat(int fd, const char *path, const struct timespec times[2], int flag ENTER(); SHOWVALUE(fd); - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; int result = -1; struct DateStamp ds0; BOOL setToCurrentTime = FALSE; @@ -83,7 +83,7 @@ int utimensat(int fd, const char *path, const struct timespec times[2], int flag if (path != NULL) { /* Check for relative path */ - if (__clib2->__unix_path_semantics) { + if (__clib4->__unix_path_semantics) { if (path[0] == '/') absolute = TRUE; diff --git a/library/stdio/asprintf.c b/library/stdio/asprintf.c index 5cb0ebca..c12dd5c6 100644 --- a/library/stdio/asprintf.c +++ b/library/stdio/asprintf.c @@ -1,5 +1,5 @@ /* - * $Id: stdio_asprintf.c,v 1.7 2006-01-08 12:04:24 clib2devs Exp $ + * $Id: stdio_asprintf.c,v 1.7 2006-01-08 12:04:24 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H diff --git a/library/stdio/change_fd_action.c b/library/stdio/change_fd_action.c index c4dffc21..63c32506 100644 --- a/library/stdio/change_fd_action.c +++ b/library/stdio/change_fd_action.c @@ -1,5 +1,5 @@ /* - * $Id: stdio_change_fd_action.c,v 1.1 2006-11-15 09:17:04 clib2devs Exp $ + * $Id: stdio_change_fd_action.c,v 1.1 2006-11-15 09:17:04 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H @@ -15,12 +15,12 @@ __change_fd_action( _file_action_fd_t *old_action_ptr) { int result = -1; struct fd *fd; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; if (old_action_ptr != NULL) (*old_action_ptr) = NULL; - __stdio_lock(__clib2); + __stdio_lock(__clib4); fd = __get_file_descriptor(file_descriptor); if (fd != NULL) { @@ -36,7 +36,7 @@ __change_fd_action( result = 0; } - __stdio_unlock(__clib2); + __stdio_unlock(__clib4); return (result); } diff --git a/library/stdio/change_fd_user_data.c b/library/stdio/change_fd_user_data.c index a071e4dc..66495c47 100644 --- a/library/stdio/change_fd_user_data.c +++ b/library/stdio/change_fd_user_data.c @@ -1,5 +1,5 @@ /* - * $Id: stdio_change_fd_user_data.c,v 1.1 2006-11-15 09:17:04 clib2devs Exp $ + * $Id: stdio_change_fd_user_data.c,v 1.1 2006-11-15 09:17:04 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H @@ -13,12 +13,12 @@ __change_fd_user_data( void **old_user_data_ptr) { int result = -1; struct fd *fd; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; if (old_user_data_ptr != NULL) (*old_user_data_ptr) = NULL; - __stdio_lock(__clib2); + __stdio_lock(__clib4); fd = __get_file_descriptor(file_descriptor); if (fd != NULL) { @@ -34,7 +34,7 @@ __change_fd_user_data( result = 0; } - __stdio_unlock(__clib2); + __stdio_unlock(__clib4); return (result); } diff --git a/library/stdio/clearerr.c b/library/stdio/clearerr.c index a496fa0e..5a897a1f 100644 --- a/library/stdio/clearerr.c +++ b/library/stdio/clearerr.c @@ -1,5 +1,5 @@ /* - * $Id: stdio_clearerr.c,v 1.5 2006-01-08 12:04:24 clib2devs Exp $ + * $Id: stdio_clearerr.c,v 1.5 2006-01-08 12:04:24 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H @@ -11,7 +11,7 @@ void clearerr(FILE *stream) { struct iob *file = (struct iob *) stream; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); @@ -24,7 +24,7 @@ clearerr(FILE *stream) { goto out; } - assert(__is_valid_iob(__clib2, file)); + assert(__is_valid_iob(__clib4, file)); flockfile(stream); diff --git a/library/stdio/ctermid.c b/library/stdio/ctermid.c index f9c050c1..4abe6498 100644 --- a/library/stdio/ctermid.c +++ b/library/stdio/ctermid.c @@ -1,5 +1,5 @@ /* - * $Id: stdio_ctermid.c,v 1.2 2006-01-08 12:04:24 clib2devs Exp $ + * $Id: stdio_ctermid.c,v 1.2 2006-01-08 12:04:24 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H diff --git a/library/stdio/dprintf.c b/library/stdio/dprintf.c index 90f2b92c..b9329d5f 100644 --- a/library/stdio/dprintf.c +++ b/library/stdio/dprintf.c @@ -1,5 +1,5 @@ /* - * $Id: uuid.c,v 1.00 2023-07-01 12:09:49 clib2devs Exp $ + * $Id: uuid.c,v 1.00 2023-07-01 12:09:49 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H diff --git a/library/stdio/dropiobreadbuffer.c b/library/stdio/dropiobreadbuffer.c index 4bd5e33d..f56aef18 100644 --- a/library/stdio/dropiobreadbuffer.c +++ b/library/stdio/dropiobreadbuffer.c @@ -1,5 +1,5 @@ /* - * $Id: stdio_dropiobreadbuffer.c,v 1.9 2006-01-08 12:04:24 clib2devs Exp $ + * $Id: stdio_dropiobreadbuffer.c,v 1.9 2006-01-08 12:04:24 clib4devs Exp $ */ /* This would otherwise generate far too much (useless) debug output. */ @@ -12,7 +12,7 @@ #endif /* _STDIO_HEADERS_H */ int -__drop_iob_read_buffer(struct _clib2 *__clib2, struct iob *file) { +__drop_iob_read_buffer(struct _clib4 *__clib4, struct iob *file) { int result = OK; ENTER(); @@ -48,7 +48,7 @@ __drop_iob_read_buffer(struct _clib2 *__clib2, struct iob *file) { assert(file->iob_Action != NULL); - position = (*file->iob_Action)(__clib2, file, &fam); + position = (*file->iob_Action)(__clib4, file, &fam); if (fam.fam_Error != OK) { SHOWMSG("that didn't work"); diff --git a/library/stdio/duplicate_fd.c b/library/stdio/duplicate_fd.c index d213c033..3c39715c 100644 --- a/library/stdio/duplicate_fd.c +++ b/library/stdio/duplicate_fd.c @@ -1,5 +1,5 @@ /* - * $Id: stdio_duplicate_fd.c,v 1.6 2006-10-10 13:39:26 clib2devs Exp $ + * $Id: stdio_duplicate_fd.c,v 1.6 2006-10-10 13:39:26 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H diff --git a/library/stdio/err.c b/library/stdio/err.c index eb796551..d27fb89c 100644 --- a/library/stdio/err.c +++ b/library/stdio/err.c @@ -1,5 +1,5 @@ /* - * $Id: stdio_err.c,v 1.0 2022-07-13 12:04:24 clib2devs Exp $ + * $Id: stdio_err.c,v 1.0 2022-07-13 12:04:24 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H @@ -13,7 +13,7 @@ #include void vwarn(const char *fmt, va_list ap) { - fprintf(stderr, "%s: ", __CLIB2->__progname); + fprintf(stderr, "%s: ", __CLIB4->__progname); if (fmt) { vfprintf(stderr, fmt, ap); fputs(": ", stderr); @@ -22,7 +22,7 @@ void vwarn(const char *fmt, va_list ap) { } void vwarnx(const char *fmt, va_list ap) { - fprintf(stderr, "%s: ", __CLIB2->__progname); + fprintf(stderr, "%s: ", __CLIB4->__progname); if (fmt) vfprintf(stderr, fmt, ap); putc('\n', stderr); } diff --git a/library/stdio/fclose.c b/library/stdio/fclose.c index 3fd1ffca..d64dfc12 100644 --- a/library/stdio/fclose.c +++ b/library/stdio/fclose.c @@ -1,5 +1,5 @@ /* - * $Id: stdio_fclose.c,v 1.12 2006-01-08 12:04:24 clib2devs Exp $ + * $Id: stdio_fclose.c,v 1.12 2006-01-08 12:04:24 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H @@ -15,7 +15,7 @@ fclose(FILE *stream) { struct iob *file = (struct iob *) stream; struct file_action_message fam; int result = OK; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); @@ -36,7 +36,7 @@ fclose(FILE *stream) { goto out; } - assert(__is_valid_iob(__clib2, file)); + assert(__is_valid_iob(__clib4, file)); assert(FLAG_IS_SET(file->iob_Flags, IOBF_IN_USE)); assert(file->iob_BufferSize > 0); @@ -50,7 +50,7 @@ fclose(FILE *stream) { } /* Push back any buffered data to the stream. */ - if (__iob_write_buffer_is_valid(file) && __flush_iob_write_buffer(__clib2, file) < 0) + if (__iob_write_buffer_is_valid(file) && __flush_iob_write_buffer(__clib4, file) < 0) result = EOF; /* Make sure that the stream is closed. */ @@ -60,7 +60,7 @@ fclose(FILE *stream) { assert(file->iob_Action != NULL); - if ((*file->iob_Action)(__clib2, file, &fam) < 0 && result != EOF) { + if ((*file->iob_Action)(__clib4, file, &fam) < 0 && result != EOF) { result = EOF; __set_errno(fam.fam_Error); diff --git a/library/stdio/fdhookentry.c b/library/stdio/fdhookentry.c index ee7e5fc5..82204045 100755 --- a/library/stdio/fdhookentry.c +++ b/library/stdio/fdhookentry.c @@ -1,5 +1,5 @@ /* - * $Id: stdio_fdhookentry.c,v 1.37 2022-08-11 17:12:23 clib2devs Exp $ + * $Id: stdio_fdhookentry.c,v 1.37 2022-08-11 17:12:23 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H @@ -21,7 +21,7 @@ #include #include -int64_t __fd_hook_entry(struct _clib2 *__clib2, struct fd *fd, struct file_action_message *fam) { +int64_t __fd_hook_entry(struct _clib4 *__clib4, struct fd *fd, struct file_action_message *fam) { struct ExamineData *exd = NULL; BOOL fib_is_valid = FALSE; struct FileHandle *fh; @@ -37,13 +37,13 @@ int64_t __fd_hook_entry(struct _clib2 *__clib2, struct fd *fd, struct file_actio ENTER(); assert(fam != NULL && fd != NULL); - assert(__is_valid_fd(__clib2, fd)); + assert(__is_valid_fd(__clib4, fd)); /* Careful: file_action_close has to monkey with the file descriptor table and therefore needs to obtain the stdio lock before it locks this particular descriptor entry. */ if (fam->fam_Action == file_action_close) - __stdio_lock(__clib2); + __stdio_lock(__clib4); __fd_lock(fd); @@ -201,7 +201,7 @@ int64_t __fd_hook_entry(struct _clib2 *__clib2, struct fd *fd, struct file_actio if (fd->fd_File) fd->fd_File = BZERO; - if (__clib2->__unix_path_semantics) { + if (__clib4->__unix_path_semantics) { DECLARE_UTILITYBASE(); assert(UtilityBase != NULL); @@ -216,10 +216,10 @@ int64_t __fd_hook_entry(struct _clib2 *__clib2, struct fd *fd, struct file_actio struct UnlinkNode *uln; BOOL file_deleted = FALSE; - assert(__clib2->__unlink_list.mlh_Head != NULL); + assert(__clib4->__unlink_list.mlh_Head != NULL); /* Check all files to be unlinked when this program exits. */ - for (uln = (struct UnlinkNode *) __clib2->__unlink_list.mlh_Head; + for (uln = (struct UnlinkNode *) __clib4->__unlink_list.mlh_Head; (uln_next = (struct UnlinkNode *) uln->uln_MinNode.mln_Succ) != NULL; uln = uln_next) { node = NULL; @@ -387,7 +387,7 @@ int64_t __fd_hook_entry(struct _clib2 *__clib2, struct fd *fd, struct file_actio if (position == CHANGE_FILE_ERROR) { fam->fam_Error = __translate_io_error_to_errno(IoErr()); - if (__clib2->__unix_path_semantics) { + if (__clib4->__unix_path_semantics) { /* Check if this operation failed because the file is shorter than the new file position. First, we need to find out if the file is really shorter than required. If not, then it must have @@ -531,7 +531,7 @@ int64_t __fd_hook_entry(struct _clib2 *__clib2, struct fd *fd, struct file_actio __fd_unlock(fd); if (fam->fam_Action == file_action_close) - __stdio_unlock(__clib2); + __stdio_unlock(__clib4); if (buffer != NULL) free(buffer); diff --git a/library/stdio/feof.c b/library/stdio/feof.c index 6938ee4a..ff0348ce 100644 --- a/library/stdio/feof.c +++ b/library/stdio/feof.c @@ -1,5 +1,5 @@ /* - * $Id: stdio_feof.c,v 1.5 2006-01-08 12:04:24 clib2devs Exp $ + * $Id: stdio_feof.c,v 1.5 2006-01-08 12:04:24 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H @@ -12,7 +12,7 @@ int feof(FILE *stream) { struct iob *file = (struct iob *) stream; int result; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); @@ -30,7 +30,7 @@ feof(FILE *stream) { goto out; } - assert(__is_valid_iob(__clib2, file)); + assert(__is_valid_iob(__clib4, file)); assert(FLAG_IS_SET(file->iob_Flags, IOBF_IN_USE)); flockfile(stream); diff --git a/library/stdio/ferror.c b/library/stdio/ferror.c index 636d59d2..a0c1e9cb 100644 --- a/library/stdio/ferror.c +++ b/library/stdio/ferror.c @@ -1,5 +1,5 @@ /* - * $Id: stdio_ferror.c,v 1.5 2006-01-08 12:04:24 clib2devs Exp $ + * $Id: stdio_ferror.c,v 1.5 2006-01-08 12:04:24 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H @@ -12,7 +12,7 @@ int ferror(FILE *stream) { struct iob *file = (struct iob *) stream; int result; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); @@ -30,7 +30,7 @@ ferror(FILE *stream) { goto out; } - assert(__is_valid_iob(__clib2, file)); + assert(__is_valid_iob(__clib4, file)); flockfile(stream); diff --git a/library/stdio/fflush.c b/library/stdio/fflush.c index 0b497b5e..300cb234 100644 --- a/library/stdio/fflush.c +++ b/library/stdio/fflush.c @@ -1,5 +1,5 @@ /* - * $Id: stdio_fflush.c,v 1.11 2006-01-08 12:04:24 clib2devs Exp $ + * $Id: stdio_fflush.c,v 1.11 2006-01-08 12:04:24 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H @@ -9,7 +9,7 @@ int fflush(FILE *stream) { int result = EOF; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); @@ -19,33 +19,33 @@ fflush(FILE *stream) { if (stream != NULL) { struct iob *file = (struct iob *) stream; - assert(__is_valid_iob(__clib2, file)); + assert(__is_valid_iob(__clib4, file)); flockfile(stream); - if (__iob_write_buffer_is_valid(file) && __flush_iob_write_buffer(__clib2, file) < 0) + if (__iob_write_buffer_is_valid(file) && __flush_iob_write_buffer(__clib4, file) < 0) goto out; } else { int failed_iob = -1; int i; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; - __stdio_lock(__clib2); + __stdio_lock(__clib4); /* Flush all streams which still have unwritten data in the buffer. */ - for (i = 0; i < __clib2->__num_iob; i++) { - if (__clib2->__iob[i] != NULL && - FLAG_IS_SET(__clib2->__iob[i]->iob_Flags, IOBF_IN_USE) && - FLAG_IS_SET(__clib2->__iob[i]->iob_Flags, IOBF_WRITE) && - __iob_write_buffer_is_valid(__clib2->__iob[i])) { - if (__flush_iob_write_buffer(__clib2, __clib2->__iob[i]) < 0) { + for (i = 0; i < __clib4->__num_iob; i++) { + if (__clib4->__iob[i] != NULL && + FLAG_IS_SET(__clib4->__iob[i]->iob_Flags, IOBF_IN_USE) && + FLAG_IS_SET(__clib4->__iob[i]->iob_Flags, IOBF_WRITE) && + __iob_write_buffer_is_valid(__clib4->__iob[i])) { + if (__flush_iob_write_buffer(__clib4, __clib4->__iob[i]) < 0) { failed_iob = i; break; } } } - __stdio_unlock(__clib2); + __stdio_unlock(__clib4); if (failed_iob >= 0) goto out; diff --git a/library/stdio/fgetc.c b/library/stdio/fgetc.c index 465920e6..bad04d59 100644 --- a/library/stdio/fgetc.c +++ b/library/stdio/fgetc.c @@ -1,5 +1,5 @@ /* - * $Id: stdio_fgetc.c,v 1.8 2006-01-08 12:04:24 clib2devs Exp $ + * $Id: stdio_fgetc.c,v 1.8 2006-01-08 12:04:24 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H @@ -10,21 +10,21 @@ int __fgetc(FILE *stream) { struct iob *file = (struct iob *) stream; int result = EOF; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); SHOWPOINTER(stream); assert(stream != NULL); - assert(__is_valid_iob(__clib2, file)); + assert(__is_valid_iob(__clib4, file)); assert(FLAG_IS_SET(file->iob_Flags, IOBF_IN_USE)); assert(file->iob_BufferSize > 0); if (__iob_read_buffer_is_empty(file)) { __check_abort(); - if (__fill_iob_read_buffer(__clib2, file) < 0) + if (__fill_iob_read_buffer(__clib4, file) < 0) goto out; if (__iob_read_buffer_is_empty(file)) { @@ -46,7 +46,7 @@ int __fgetc_check(FILE *stream) { struct iob *file = (struct iob *) stream; int result = EOF; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; assert(stream != NULL); @@ -74,7 +74,7 @@ __fgetc_check(FILE *stream) { goto out; } - if (__iob_write_buffer_is_valid(file) && __flush_iob_write_buffer(__clib2, file) < 0) + if (__iob_write_buffer_is_valid(file) && __flush_iob_write_buffer(__clib4, file) < 0) goto out; result = OK; diff --git a/library/stdio/fgetpos.c b/library/stdio/fgetpos.c index feece028..46896be3 100644 --- a/library/stdio/fgetpos.c +++ b/library/stdio/fgetpos.c @@ -1,5 +1,5 @@ /* - * $Id: stdio_fgetpos.c,v 1.8 2006-01-08 12:04:24 clib2devs Exp $ + * $Id: stdio_fgetpos.c,v 1.8 2006-01-08 12:04:24 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H diff --git a/library/stdio/fgetpos64.c b/library/stdio/fgetpos64.c index adbe3550..297c59a4 100644 --- a/library/stdio/fgetpos64.c +++ b/library/stdio/fgetpos64.c @@ -1,5 +1,5 @@ /* - * $Id: stdio_fgetpos64.c,v 1.0 2021-02-05 17:36:32 clib2devs Exp $ + * $Id: stdio_fgetpos64.c,v 1.0 2021-02-05 17:36:32 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H diff --git a/library/stdio/fgets.c b/library/stdio/fgets.c index b5869219..3f7d6f19 100644 --- a/library/stdio/fgets.c +++ b/library/stdio/fgets.c @@ -1,5 +1,5 @@ /* - * $Id: stdio_fgets.c,v 1.7 2022-03-27 12:04:24 clib2devs Exp $ + * $Id: stdio_fgets.c,v 1.7 2022-03-27 12:04:24 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H diff --git a/library/stdio/file_init.c b/library/stdio/file_init.c index 03fa7785..917f125e 100644 --- a/library/stdio/file_init.c +++ b/library/stdio/file_init.c @@ -1,5 +1,5 @@ /* - * $Id: stdio_file_init.c,v 1.13 2008-09-04 12:07:58 clib2devs Exp $ + * $Id: stdio_file_init.c,v 1.13 2008-09-04 12:07:58 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H @@ -22,55 +22,55 @@ FILE_DESTRUCTOR(workbench_exit) { ENTER(); - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; /* Now clean up after the streams set up for Workbench startup... */ - if (__clib2->restore_console_task) { - SetConsolePort(__clib2->old_console_task); - __clib2->old_console_task = NULL; - __clib2->restore_console_task = FALSE; + if (__clib4->restore_console_task) { + SetConsolePort(__clib4->old_console_task); + __clib4->old_console_task = NULL; + __clib4->restore_console_task = FALSE; } - if (__clib2->restore_streams) { - SelectInput(__clib2->old_input); - __clib2->old_input = BZERO; + if (__clib4->restore_streams) { + SelectInput(__clib4->old_input); + __clib4->old_input = BZERO; - SelectOutput(__clib2->old_output); - __clib2->old_output = BZERO; + SelectOutput(__clib4->old_output); + __clib4->old_output = BZERO; - SelectErrorOutput(__clib2->old_error); - __clib2->old_error = BZERO; + SelectErrorOutput(__clib4->old_error); + __clib4->old_error = BZERO; - __clib2->restore_streams = FALSE; + __clib4->restore_streams = FALSE; } - if (__clib2->input != BZERO) { - Close(__clib2->input); - __clib2->input = BZERO; + if (__clib4->input != BZERO) { + Close(__clib4->input); + __clib4->input = BZERO; } - if (__clib2->output != BZERO) { - Close(__clib2->output); - __clib2->output = BZERO; + if (__clib4->output != BZERO) { + Close(__clib4->output); + __clib4->output = BZERO; } - if (__clib2->error != BZERO) { - Close(__clib2->error); - __clib2->error = BZERO; + if (__clib4->error != BZERO) { + Close(__clib4->error); + __clib4->error = BZERO; } LEAVE(); } static int -wb_file_init(struct _clib2 *__clib2) { +wb_file_init(struct _clib4 *__clib4) { int result = ERROR; - __clib2->__original_current_directory = SetCurrentDir(__clib2->__WBenchMsg->sm_ArgList[0].wa_Lock); - __clib2->__current_directory_changed = TRUE; + __clib4->__original_current_directory = SetCurrentDir(__clib4->__WBenchMsg->sm_ArgList[0].wa_Lock); + __clib4->__current_directory_changed = TRUE; - if (__clib2->__WBenchMsg->sm_ToolWindow != NULL) { - __clib2->input = Open(__clib2->__WBenchMsg->sm_ToolWindow, MODE_NEWFILE); + if (__clib4->__WBenchMsg->sm_ToolWindow != NULL) { + __clib4->input = Open(__clib4->__WBenchMsg->sm_ToolWindow, MODE_NEWFILE); } else { static const char console_prefix[] = "CON:20/20/600/150/"; static const char console_suffix[] = " Output/AUTO/CLOSE/WAIT"; @@ -78,7 +78,7 @@ wb_file_init(struct _clib2 *__clib2) { STRPTR tool_name; size_t len; - tool_name = (STRPTR) FilePart(__clib2->__WBenchMsg->sm_ArgList[0].wa_Name); + tool_name = (STRPTR) FilePart(__clib4->__WBenchMsg->sm_ArgList[0].wa_Name); len = strlen(console_prefix) + strlen(tool_name) + strlen(console_suffix); @@ -90,42 +90,42 @@ wb_file_init(struct _clib2 *__clib2) { strcat(window_specifier, tool_name); strcat(window_specifier, console_suffix); - __clib2->input = Open(window_specifier, MODE_NEWFILE); + __clib4->input = Open(window_specifier, MODE_NEWFILE); FreeVec(window_specifier); } - if (__clib2->input == BZERO) - __clib2->input = Open("NIL:", MODE_NEWFILE); + if (__clib4->input == BZERO) + __clib4->input = Open("NIL:", MODE_NEWFILE); - if (__clib2->input != BZERO) { - struct FileHandle *fh = BADDR(__clib2->input); + if (__clib4->input != BZERO) { + struct FileHandle *fh = BADDR(__clib4->input); - __clib2->old_console_task = SetConsolePort(fh->fh_MsgPort); + __clib4->old_console_task = SetConsolePort(fh->fh_MsgPort); - __clib2->output = Open("CONSOLE:", MODE_NEWFILE); - if (__clib2->output != BZERO) - __clib2->restore_console_task = TRUE; + __clib4->output = Open("CONSOLE:", MODE_NEWFILE); + if (__clib4->output != BZERO) + __clib4->restore_console_task = TRUE; else - SetConsolePort(__clib2->old_console_task); + SetConsolePort(__clib4->old_console_task); - __clib2->error = Open("CONSOLE:", MODE_NEWFILE); - if (__clib2->error != BZERO) - __clib2->restore_console_task = TRUE; + __clib4->error = Open("CONSOLE:", MODE_NEWFILE); + if (__clib4->error != BZERO) + __clib4->restore_console_task = TRUE; else - SetConsolePort(__clib2->old_console_task); + SetConsolePort(__clib4->old_console_task); } - if (__clib2->output == BZERO) - __clib2->output = Open("NIL:", MODE_NEWFILE); + if (__clib4->output == BZERO) + __clib4->output = Open("NIL:", MODE_NEWFILE); - if (__clib2->input == BZERO || __clib2->output == BZERO || __clib2->error == BZERO) + if (__clib4->input == BZERO || __clib4->output == BZERO || __clib4->error == BZERO) goto out; - __clib2->old_input = SelectInput(__clib2->input); - __clib2->old_output = SelectOutput(__clib2->output); - __clib2->old_error = SelectErrorOutput(__clib2->error); - __clib2->restore_streams = TRUE; + __clib4->old_input = SelectInput(__clib4->input); + __clib4->old_output = SelectOutput(__clib4->output); + __clib4->old_error = SelectErrorOutput(__clib4->error); + __clib4->restore_streams = TRUE; result = OK; @@ -143,7 +143,7 @@ FILE_CONSTRUCTOR(stdio_file_init) { char *buffer; char *aligned_buffer; int i; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); @@ -151,14 +151,14 @@ FILE_CONSTRUCTOR(stdio_file_init) { GetCPUInfoTags(GCIT_CacheLineSize, &physical_alignment, TAG_DONE); SHOWVALUE(physical_alignment); - if (__clib2->__cache_line_size < physical_alignment) { - __clib2->__cache_line_size = physical_alignment; + if (__clib4->__cache_line_size < physical_alignment) { + __clib4->__cache_line_size = physical_alignment; } /* If we were invoked from Workbench, set up the standard I/O streams. */ - if (__clib2->__WBenchMsg != NULL) { + if (__clib4->__WBenchMsg != NULL) { SHOWMSG("set up the standard I/O streams"); - if (wb_file_init(__clib2) < 0) { + if (wb_file_init(__clib4) < 0) { goto out; } } @@ -191,7 +191,7 @@ FILE_CONSTRUCTOR(stdio_file_init) { } /* Allocate a little more memory than necessary. */ - buffer = AllocVecTags(BUFSIZ + (__clib2->__cache_line_size - 1), AVT_Type, MEMF_SHARED, AVT_ClearWithValue, 0, TAG_DONE); + buffer = AllocVecTags(BUFSIZ + (__clib4->__cache_line_size - 1), AVT_Type, MEMF_SHARED, AVT_ClearWithValue, 0, TAG_DONE); if (buffer == NULL) goto out; @@ -212,10 +212,10 @@ FILE_CONSTRUCTOR(stdio_file_init) { fd_flags |= FDF_NO_CLOSE | FDF_STDIO; /* Align the buffer start address to a cache line boundary. */ - aligned_buffer = (char *) ((ULONG)(buffer + (__clib2->__cache_line_size - 1)) & ~(__clib2->__cache_line_size - 1)); + aligned_buffer = (char *) ((ULONG)(buffer + (__clib4->__cache_line_size - 1)) & ~(__clib4->__cache_line_size - 1)); D(("File %ld", i)); - __initialize_fd(__clib2->__fd[i], __fd_hook_entry, default_file, fd_flags, fd_lock); - __initialize_iob(__clib2->__iob[i], + __initialize_fd(__clib4->__fd[i], __fd_hook_entry, default_file, fd_flags, fd_lock); + __initialize_iob(__clib4->__iob[i], __iob_hook_entry, buffer, aligned_buffer, @@ -224,7 +224,7 @@ FILE_CONSTRUCTOR(stdio_file_init) { i, iob_flags, stdio_lock); - SHOWPOINTER(__clib2->__iob[i]); + SHOWPOINTER(__clib4->__iob[i]); } success = TRUE; diff --git a/library/stdio/filliobreadbuffer.c b/library/stdio/filliobreadbuffer.c index fe19e8f6..b6208dbb 100644 --- a/library/stdio/filliobreadbuffer.c +++ b/library/stdio/filliobreadbuffer.c @@ -1,5 +1,5 @@ /* - * $Id: stdio_filliobreadbuffer.c,v 1.12 2006-09-22 09:02:51 clib2devs Exp $ + * $Id: stdio_filliobreadbuffer.c,v 1.12 2006-09-22 09:02:51 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H @@ -7,7 +7,7 @@ #endif /* _STDIO_HEADERS_H */ int -__fill_iob_read_buffer(struct _clib2 *__clib2, struct iob *file) { +__fill_iob_read_buffer(struct _clib4 *__clib4, struct iob *file) { struct file_action_message fam; int num_bytes_read; int result = ERROR; @@ -38,7 +38,7 @@ __fill_iob_read_buffer(struct _clib2 *__clib2, struct iob *file) { assert(file->iob_Action != NULL); - num_bytes_read = (*file->iob_Action)(__clib2, file, &fam); + num_bytes_read = (*file->iob_Action)(__clib4, file, &fam); if (num_bytes_read == EOF) { D(("got error %ld", fam.fam_Error)); diff --git a/library/stdio/findvacantfdentry.c b/library/stdio/findvacantfdentry.c index 5e59ce35..75040687 100644 --- a/library/stdio/findvacantfdentry.c +++ b/library/stdio/findvacantfdentry.c @@ -1,5 +1,5 @@ /* - * $Id: stdio_findvacantfdentry.c,v 1.5 2006-01-08 12:04:24 clib2devs Exp $ + * $Id: stdio_findvacantfdentry.c,v 1.5 2006-01-08 12:04:24 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H @@ -9,23 +9,23 @@ #ifndef NDEBUG BOOL -__is_valid_fd(struct _clib2 *__clib2, struct fd *fd) { +__is_valid_fd(struct _clib4 *__clib4, struct fd *fd) { BOOL result = FALSE; - __stdio_lock(__clib2); + __stdio_lock(__clib4); - if (__clib2->__fd != NULL && __clib2->__num_fd > 0) { + if (__clib4->__fd != NULL && __clib4->__num_fd > 0) { int i; - for (i = 0; i < __clib2->__num_fd; i++) { - if (__clib2->__fd[i] == fd) { + for (i = 0; i < __clib4->__num_fd; i++) { + if (__clib4->__fd[i] == fd) { result = TRUE; break; } } } - __stdio_unlock(__clib2); + __stdio_unlock(__clib4); return (result); } @@ -33,14 +33,14 @@ __is_valid_fd(struct _clib2 *__clib2, struct fd *fd) { #endif /* NDEBUG */ int -__find_vacant_fd_entry(struct _clib2 *__clib2) { +__find_vacant_fd_entry(struct _clib4 *__clib4) { int result = ERROR; int i; - assert(__clib2->__fd != NULL || __clib2->__num_fd == 0); + assert(__clib4->__fd != NULL || __clib4->__num_fd == 0); - for (i = 0; i < __clib2->__num_fd; i++) { - if (FLAG_IS_CLEAR(__clib2->__fd[i]->fd_Flags, FDF_IN_USE)) { + for (i = 0; i < __clib4->__num_fd; i++) { + if (FLAG_IS_CLEAR(__clib4->__fd[i]->fd_Flags, FDF_IN_USE)) { result = i; break; } diff --git a/library/stdio/findvacantiobentry.c b/library/stdio/findvacantiobentry.c index 0f5b389f..5bbcd1af 100644 --- a/library/stdio/findvacantiobentry.c +++ b/library/stdio/findvacantiobentry.c @@ -1,5 +1,5 @@ /* - * $Id: stdio_findvacantiobentry.c,v 1.5 2006-01-08 12:04:24 clib2devs Exp $ + * $Id: stdio_findvacantiobentry.c,v 1.5 2006-01-08 12:04:24 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H @@ -8,7 +8,7 @@ #ifndef NDEBUG -BOOL __is_valid_iob(struct _clib2 *__clib2, struct iob *iob) { +BOOL __is_valid_iob(struct _clib4 *__clib4, struct iob *iob) { BOOL result = FALSE; if (iob == NULL) { @@ -20,13 +20,13 @@ BOOL __is_valid_iob(struct _clib2 *__clib2, struct iob *iob) { /* This is used by vsprintf(), etc. */ result = TRUE; } else { - __stdio_lock(__clib2); - SHOWPOINTER(__clib2->__iob[iob->iob_SlotNumber]); + __stdio_lock(__clib4); + SHOWPOINTER(__clib4->__iob[iob->iob_SlotNumber]); - if (__clib2->__num_iob > 0 && 0 <= iob->iob_SlotNumber && iob->iob_SlotNumber < __clib2->__num_iob && __clib2->__iob[iob->iob_SlotNumber] == iob) + if (__clib4->__num_iob > 0 && 0 <= iob->iob_SlotNumber && iob->iob_SlotNumber < __clib4->__num_iob && __clib4->__iob[iob->iob_SlotNumber] == iob) result = TRUE; - __stdio_unlock(__clib2); + __stdio_unlock(__clib4); } return result; @@ -34,14 +34,14 @@ BOOL __is_valid_iob(struct _clib2 *__clib2, struct iob *iob) { #endif /* NDEBUG */ -int __find_vacant_iob_entry(struct _clib2 *__clib2) { +int __find_vacant_iob_entry(struct _clib4 *__clib4) { int result = ERROR; int i; - assert(__clib2->__iob != NULL || __clib2->__num_iob == 0); + assert(__clib4->__iob != NULL || __clib4->__num_iob == 0); - for (i = 0; i < __clib2->__num_iob; i++) { - if (FLAG_IS_CLEAR(__clib2->__iob[i]->iob_Flags, IOBF_IN_USE)) { + for (i = 0; i < __clib4->__num_iob; i++) { + if (FLAG_IS_CLEAR(__clib4->__iob[i]->iob_Flags, IOBF_IN_USE)) { result = i; break; } diff --git a/library/stdio/flockfile.c b/library/stdio/flockfile.c index 211103ec..8a2a975f 100644 --- a/library/stdio/flockfile.c +++ b/library/stdio/flockfile.c @@ -1,5 +1,5 @@ /* - * $Id: stdio_flockfile.c,v 1.4 2006-01-08 12:04:24 clib2devs Exp $ + * $Id: stdio_flockfile.c,v 1.4 2006-01-08 12:04:24 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H @@ -9,7 +9,7 @@ void flockfile(FILE *stream) { struct iob *file = (struct iob *) stream; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; assert(stream != NULL); @@ -22,7 +22,7 @@ flockfile(FILE *stream) { goto out; } - assert(__is_valid_iob(__clib2, file)); + assert(__is_valid_iob(__clib4, file)); assert(FLAG_IS_SET(file->iob_Flags, IOBF_IN_USE)); if (FLAG_IS_CLEAR(file->iob_Flags, IOBF_IN_USE)) { diff --git a/library/stdio/flush.c b/library/stdio/flush.c index 5c5bbe74..1b56877a 100644 --- a/library/stdio/flush.c +++ b/library/stdio/flush.c @@ -1,5 +1,5 @@ /* - * $Id: stdio_flush.c,v 1.5 2006-01-08 12:04:24 clib2devs Exp $ + * $Id: stdio_flush.c,v 1.5 2006-01-08 12:04:24 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H @@ -17,7 +17,7 @@ __flush(FILE *stream) { struct iob *iob = (struct iob *) stream; int result = EOF; int last_c; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); @@ -34,13 +34,13 @@ __flush(FILE *stream) { goto out; } - assert(__is_valid_iob(__clib2, iob)); + assert(__is_valid_iob(__clib4, iob)); assert(iob->iob_BufferWriteBytes > 0); assert(iob->iob_BufferSize > 0); last_c = iob->iob_Buffer[iob->iob_BufferWriteBytes - 1]; - if (__flush_iob_write_buffer(__clib2, iob) < 0) { + if (__flush_iob_write_buffer(__clib4, iob) < 0) { /* Remove the last character stored in the buffer, which is typically a '\n'. */ iob->iob_BufferWriteBytes--; diff --git a/library/stdio/flush_all_files.c b/library/stdio/flush_all_files.c index 2fa5976a..9a472c39 100644 --- a/library/stdio/flush_all_files.c +++ b/library/stdio/flush_all_files.c @@ -1,5 +1,5 @@ /* - * $Id: stdio_flush_all_files.c,v 1.3 2006-01-08 12:04:24 clib2devs Exp $ + * $Id: stdio_flush_all_files.c,v 1.3 2006-01-08 12:04:24 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H @@ -10,20 +10,20 @@ int __flush_all_files(int buffer_mode) { int result; int i; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); SHOWVALUE(buffer_mode); - __stdio_lock(__clib2); + __stdio_lock(__clib4); - for (i = 0; i < __clib2->__num_iob; i++) { - if (__clib2->__iob[i] != NULL && - FLAG_IS_SET(__clib2->__iob[i]->iob_Flags, IOBF_IN_USE) && - FLAG_IS_SET(__clib2->__iob[i]->iob_Flags, IOBF_WRITE) && - (buffer_mode < 0 || (__clib2->__iob[i]->iob_Flags & IOBF_BUFFER_MODE) == (ULONG) buffer_mode) && - __iob_write_buffer_is_valid(__clib2->__iob[i])) { - if (__flush_iob_write_buffer(__clib2, __clib2->__iob[i]) < 0) { + for (i = 0; i < __clib4->__num_iob; i++) { + if (__clib4->__iob[i] != NULL && + FLAG_IS_SET(__clib4->__iob[i]->iob_Flags, IOBF_IN_USE) && + FLAG_IS_SET(__clib4->__iob[i]->iob_Flags, IOBF_WRITE) && + (buffer_mode < 0 || (__clib4->__iob[i]->iob_Flags & IOBF_BUFFER_MODE) == (ULONG) buffer_mode) && + __iob_write_buffer_is_valid(__clib4->__iob[i])) { + if (__flush_iob_write_buffer(__clib4, __clib4->__iob[i]) < 0) { result = ERROR; goto out; } @@ -34,7 +34,7 @@ __flush_all_files(int buffer_mode) { out: - __stdio_unlock(__clib2); + __stdio_unlock(__clib4); RETURN(result); return (result); diff --git a/library/stdio/flushiobwritebuffer.c b/library/stdio/flushiobwritebuffer.c index 297ee024..08afe3de 100644 --- a/library/stdio/flushiobwritebuffer.c +++ b/library/stdio/flushiobwritebuffer.c @@ -1,5 +1,5 @@ /* - * $Id: stdio_flushiobwritebuffer.c,v 1.9 2006-09-22 09:02:51 clib2devs Exp $ + * $Id: stdio_flushiobwritebuffer.c,v 1.9 2006-09-22 09:02:51 clib4devs Exp $ */ /* This would otherwise generate far too much (useless) debug output. */ @@ -12,7 +12,7 @@ #endif /* _STDIO_HEADERS_H */ int -__flush_iob_write_buffer(struct _clib2 *__clib2, struct iob *file) { +__flush_iob_write_buffer(struct _clib4 *__clib4, struct iob *file) { int result = OK; ENTER(); @@ -39,7 +39,7 @@ __flush_iob_write_buffer(struct _clib2 *__clib2, struct iob *file) { assert(file->iob_Action != NULL); - if ((*file->iob_Action)(__clib2, file, &fam) == EOF) { + if ((*file->iob_Action)(__clib4, file, &fam) == EOF) { SHOWMSG("that didn't work"); result = ERROR; SET_FLAG(file->iob_Flags, IOBF_ERROR); diff --git a/library/stdio/fopen.c b/library/stdio/fopen.c index c6dcacc4..1fc05ce8 100644 --- a/library/stdio/fopen.c +++ b/library/stdio/fopen.c @@ -1,5 +1,5 @@ /* - * $Id: stdio_fopen.c,v 1.7 2006-01-08 12:04:24 clib2devs Exp $ + * $Id: stdio_fopen.c,v 1.7 2006-01-08 12:04:24 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H @@ -10,7 +10,7 @@ FILE * fopen(const char *filename, const char *mode) { FILE *result = NULL; int slot_number; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); @@ -21,7 +21,7 @@ fopen(const char *filename, const char *mode) { __check_abort(); - __stdio_lock(__clib2); + __stdio_lock(__clib4); if (filename == NULL || mode == NULL) { SHOWMSG("invalid parameters"); @@ -30,27 +30,27 @@ fopen(const char *filename, const char *mode) { goto out; } - slot_number = __find_vacant_iob_entry(__clib2); + slot_number = __find_vacant_iob_entry(__clib4); if (slot_number < 0) { - if (__grow_iob_table(__clib2, 0) < 0) { + if (__grow_iob_table(__clib4, 0) < 0) { SHOWMSG("couldn't find a free file table, and no memory for a new one"); goto out; } - slot_number = __find_vacant_iob_entry(__clib2); + slot_number = __find_vacant_iob_entry(__clib4); assert(slot_number >= 0); } - if (__open_iob(__clib2, filename, mode, -1, slot_number) < 0) { + if (__open_iob(__clib4, filename, mode, -1, slot_number) < 0) { SHOWMSG("couldn't open the file"); goto out; } - result = (FILE *) __clib2->__iob[slot_number]; + result = (FILE *) __clib4->__iob[slot_number]; out: - __stdio_unlock(__clib2); + __stdio_unlock(__clib4); RETURN(result); return (result); diff --git a/library/stdio/fopen64.c b/library/stdio/fopen64.c index 7f9cdc05..47b6b56b 100644 --- a/library/stdio/fopen64.c +++ b/library/stdio/fopen64.c @@ -1,5 +1,5 @@ /* - * $Id: stdio_fopen64.c,v 1.0 2021-02-05 13:25:24 clib2devs Exp $ + * $Id: stdio_fopen64.c,v 1.0 2021-02-05 13:25:24 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H diff --git a/library/stdio/fprintf.c b/library/stdio/fprintf.c index 6d0c1615..0206a013 100644 --- a/library/stdio/fprintf.c +++ b/library/stdio/fprintf.c @@ -1,5 +1,5 @@ /* - * $Id: stdio_fprintf.c,v 1.7 2006-01-08 12:04:24 clib2devs Exp $ + * $Id: stdio_fprintf.c,v 1.7 2006-01-08 12:04:24 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H diff --git a/library/stdio/fputc.c b/library/stdio/fputc.c index 3f270230..f8ab3c3d 100644 --- a/library/stdio/fputc.c +++ b/library/stdio/fputc.c @@ -1,5 +1,5 @@ /* - * $Id: stdio_fputc.c,v 1.8 2006-01-08 12:04:24 clib2devs Exp $ + * $Id: stdio_fputc.c,v 1.8 2006-01-08 12:04:24 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H @@ -10,7 +10,7 @@ int __fputc_check(FILE *stream) { struct iob *file = (struct iob *) stream; int result = EOF; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; assert(stream != NULL); @@ -19,7 +19,7 @@ __fputc_check(FILE *stream) { goto out; } - assert(__is_valid_iob(__clib2, file)); + assert(__is_valid_iob(__clib4, file)); assert(FLAG_IS_SET(file->iob_Flags, IOBF_IN_USE)); assert(file->iob_BufferSize > 0); @@ -43,7 +43,7 @@ __fputc_check(FILE *stream) { goto out; } - if (__iob_read_buffer_is_valid(file) && __drop_iob_read_buffer(__clib2, file) < 0) { + if (__iob_read_buffer_is_valid(file) && __drop_iob_read_buffer(__clib4, file) < 0) { SHOWMSG("couldn't get rid of the read buffer."); goto out; } @@ -59,19 +59,19 @@ int __fputc(int c, FILE *stream, int buffer_mode) { struct iob *file = (struct iob *) stream; int result = EOF; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; assert(stream != NULL); assert(FLAG_IS_SET(file->iob_Flags, IOBF_IN_USE)); assert(file->iob_BufferSize > 0); - if (__iob_write_buffer_is_full(file) && __flush_iob_write_buffer(__clib2, file) < 0) + if (__iob_write_buffer_is_full(file) && __flush_iob_write_buffer(__clib4, file) < 0) goto out; file->iob_Buffer[file->iob_BufferWriteBytes++] = c; - if ((buffer_mode == IOBF_BUFFER_MODE_NONE || (buffer_mode == IOBF_BUFFER_MODE_LINE && c == '\n')) && __flush_iob_write_buffer(__clib2, file) < 0) { + if ((buffer_mode == IOBF_BUFFER_MODE_NONE || (buffer_mode == IOBF_BUFFER_MODE_LINE && c == '\n')) && __flush_iob_write_buffer(__clib4, file) < 0) { /* Pretend that the last character was not written. */ file->iob_BufferWriteBytes--; goto out; diff --git a/library/stdio/fputs.c b/library/stdio/fputs.c index 32ee93cb..3b6e93ca 100644 --- a/library/stdio/fputs.c +++ b/library/stdio/fputs.c @@ -1,5 +1,5 @@ /* - * $Id: stdio_fputs.c,v 1.8 2022-03-27 12:04:24 clib2devs Exp $ + * $Id: stdio_fputs.c,v 1.8 2022-03-27 12:04:24 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H @@ -12,7 +12,7 @@ fputs(const char *s, FILE *stream) { size_t total_size; int result = EOF; int c; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); @@ -28,7 +28,7 @@ fputs(const char *s, FILE *stream) { flockfile(stream); - assert(__is_valid_iob(__clib2, file)); + assert(__is_valid_iob(__clib4, file)); assert(FLAG_IS_SET(file->iob_Flags, IOBF_IN_USE)); assert(file->iob_BufferSize > 0); @@ -44,7 +44,7 @@ fputs(const char *s, FILE *stream) { goes to an interactive stream. */ buffer_mode = (file->iob_Flags & IOBF_BUFFER_MODE); if (buffer_mode == IOBF_BUFFER_MODE_NONE) { - struct fd *fd = __clib2->__fd[file->iob_Descriptor]; + struct fd *fd = __clib4->__fd[file->iob_Descriptor]; __fd_lock(fd); @@ -81,7 +81,7 @@ fputs(const char *s, FILE *stream) { file->iob_BufferWriteBytes += num_buffer_bytes; /* Write the buffer to disk if it's full or contains a line feed. */ - if ((lf != NULL || __iob_write_buffer_is_full(file)) && __flush_iob_write_buffer(__clib2, file) < 0) { + if ((lf != NULL || __iob_write_buffer_is_full(file)) && __flush_iob_write_buffer(__clib4, file) < 0) { /* Abort with error. */ goto out; } @@ -148,7 +148,7 @@ fputs(const char *s, FILE *stream) { file->iob_BufferWriteBytes += num_buffer_bytes; /* Write a full buffer to disk. */ - if (__iob_write_buffer_is_full(file) && __flush_iob_write_buffer(__clib2, file) < 0) { + if (__iob_write_buffer_is_full(file) && __flush_iob_write_buffer(__clib4, file) < 0) { /* Abort with error. */ goto out; } @@ -183,7 +183,7 @@ fputs(const char *s, FILE *stream) { This is intended to improve performance as it takes more effort to write a single character to a file than to write a bunch. */ if (result == 0 && (file->iob_Flags & IOBF_BUFFER_MODE) == IOBF_BUFFER_MODE_NONE) { - if (__iob_write_buffer_is_valid(file) && __flush_iob_write_buffer(__clib2, file) < 0) { + if (__iob_write_buffer_is_valid(file) && __flush_iob_write_buffer(__clib4, file) < 0) { SHOWMSG("couldn't flush the write buffer"); result = EOF; } diff --git a/library/stdio/fread.c b/library/stdio/fread.c index 1a92a66f..5e6cc437 100644 --- a/library/stdio/fread.c +++ b/library/stdio/fread.c @@ -1,5 +1,5 @@ /* - * $Id: stdio_fread.c,v 1.8 2022-03-27 12:04:24 clib2devs Exp $ + * $Id: stdio_fread.c,v 1.8 2022-03-27 12:04:24 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H @@ -10,7 +10,7 @@ size_t fread(void *ptr, size_t element_size, size_t count, FILE *stream) { struct iob *file = (struct iob *) stream; size_t result = 0; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); @@ -31,7 +31,7 @@ fread(void *ptr, size_t element_size, size_t count, FILE *stream) { flockfile(stream); - assert(__is_valid_iob(__clib2, file)); + assert(__is_valid_iob(__clib4, file)); assert(FLAG_IS_SET(file->iob_Flags, IOBF_IN_USE)); assert(file->iob_BufferSize > 0); diff --git a/library/stdio/freopen.c b/library/stdio/freopen.c index 421c3dd3..e4633772 100644 --- a/library/stdio/freopen.c +++ b/library/stdio/freopen.c @@ -1,5 +1,5 @@ /* - * $Id: stdio_freopen.c,v 1.5 2006-01-08 12:04:24 clib2devs Exp $ + * $Id: stdio_freopen.c,v 1.5 2006-01-08 12:04:24 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H @@ -11,7 +11,7 @@ freopen(const char *filename, const char *mode, FILE *stream) { struct iob *file = (struct iob *) stream; FILE *result = NULL; int slot_number; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); @@ -30,7 +30,7 @@ freopen(const char *filename, const char *mode, FILE *stream) { goto out; } - assert(__is_valid_iob(__clib2, file)); + assert(__is_valid_iob(__clib4, file)); assert(FLAG_IS_SET(file->iob_Flags, IOBF_IN_USE)); assert(file->iob_BufferSize > 0); @@ -40,7 +40,7 @@ freopen(const char *filename, const char *mode, FILE *stream) { fclose(stream); - if (__open_iob(__clib2, filename, mode, -1, slot_number) < 0) { + if (__open_iob(__clib4, filename, mode, -1, slot_number) < 0) { SHOWMSG("couldn't reopen the file"); goto out; } diff --git a/library/stdio/freopen64.c b/library/stdio/freopen64.c index 472dd8a6..3c77de4b 100644 --- a/library/stdio/freopen64.c +++ b/library/stdio/freopen64.c @@ -1,5 +1,5 @@ /* - * $Id: stdio_freopen64.c,v 1.0 2021-02-06 17:13:24 clib2devs Exp $ + * $Id: stdio_freopen64.c,v 1.0 2021-02-06 17:13:24 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H diff --git a/library/stdio/fscanf.c b/library/stdio/fscanf.c index 800930ae..994ccd95 100644 --- a/library/stdio/fscanf.c +++ b/library/stdio/fscanf.c @@ -1,5 +1,5 @@ /* - * $Id: stdio_fscanf.c,v 1.7 2006-01-08 12:04:24 clib2devs Exp $ + * $Id: stdio_fscanf.c,v 1.7 2006-01-08 12:04:24 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H diff --git a/library/stdio/fseek.c b/library/stdio/fseek.c index ac811fa5..0ab73196 100644 --- a/library/stdio/fseek.c +++ b/library/stdio/fseek.c @@ -1,5 +1,5 @@ /* - * $Id: stdio_fseek.c,v 1.10 2006-01-08 12:04:24 clib2devs Exp $ + * $Id: stdio_fseek.c,v 1.10 2006-01-08 12:04:24 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H @@ -10,7 +10,7 @@ int fseek(FILE *stream, long int offset, int wherefrom) { struct iob *file = (struct iob *) stream; int result = GETPOSITION_ERROR; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); @@ -29,7 +29,7 @@ fseek(FILE *stream, long int offset, int wherefrom) { goto out; } - assert(__is_valid_iob(__clib2, file)); + assert(__is_valid_iob(__clib4, file)); assert(FLAG_IS_SET(file->iob_Flags, IOBF_IN_USE)); assert(file->iob_BufferSize > 0); @@ -96,13 +96,13 @@ fseek(FILE *stream, long int offset, int wherefrom) { * current buffer contents and start with a clean * slate. */ - if (__iob_write_buffer_is_valid(file) && __flush_iob_write_buffer(__clib2, file) < 0) { + if (__iob_write_buffer_is_valid(file) && __flush_iob_write_buffer(__clib4, file) < 0) { SHOWMSG("couldn't flush write buffer"); goto out; } - if (__iob_read_buffer_is_valid(file) && __drop_iob_read_buffer(__clib2, file) < 0) { + if (__iob_read_buffer_is_valid(file) && __drop_iob_read_buffer(__clib4, file) < 0) { SHOWMSG("couldn't drop read buffer"); goto out; @@ -121,7 +121,7 @@ fseek(FILE *stream, long int offset, int wherefrom) { assert(file->iob_Action != NULL); - position = (*file->iob_Action)(__clib2, file, &fam); + position = (*file->iob_Action)(__clib4, file, &fam); if (fam.fam_Error != OK) { SET_FLAG(file->iob_Flags, IOBF_ERROR); diff --git a/library/stdio/fseeko.c b/library/stdio/fseeko.c index 437636f7..565a63d5 100644 --- a/library/stdio/fseeko.c +++ b/library/stdio/fseeko.c @@ -1,5 +1,5 @@ /* - * $Id: stdio_fseeko.c,v 1.2 2006-01-08 12:04:24 clib2devs Exp $ + * $Id: stdio_fseeko.c,v 1.2 2006-01-08 12:04:24 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H diff --git a/library/stdio/fseeko64.c b/library/stdio/fseeko64.c index 0decba58..164e4259 100644 --- a/library/stdio/fseeko64.c +++ b/library/stdio/fseeko64.c @@ -1,5 +1,5 @@ /* - * $Id: stdio_fseeko64.c,v 1.0 2021-02-05 13:57:14 clib2devs Exp $ + * $Id: stdio_fseeko64.c,v 1.0 2021-02-05 13:57:14 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H @@ -10,7 +10,7 @@ _off64_t fseeko64(FILE *stream, _off64_t offset, int wherefrom) { struct iob *file = (struct iob *) stream; _off64_t result = CHANGE_FILE_ERROR; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); @@ -29,7 +29,7 @@ fseeko64(FILE *stream, _off64_t offset, int wherefrom) { goto out; } - assert(__is_valid_iob(__clib2, file)); + assert(__is_valid_iob(__clib4, file)); assert(FLAG_IS_SET(file->iob_Flags, IOBF_IN_USE)); assert(file->iob_BufferSize > 0); @@ -96,13 +96,13 @@ fseeko64(FILE *stream, _off64_t offset, int wherefrom) { * current buffer contents and start with a clean * slate. */ - if (__iob_write_buffer_is_valid(file) && __flush_iob_write_buffer(__clib2, file) < 0) { + if (__iob_write_buffer_is_valid(file) && __flush_iob_write_buffer(__clib4, file) < 0) { SHOWMSG("couldn't flush write buffer"); goto out; } - if (__iob_read_buffer_is_valid(file) && __drop_iob_read_buffer(__clib2, file) < 0) { + if (__iob_read_buffer_is_valid(file) && __drop_iob_read_buffer(__clib4, file) < 0) { SHOWMSG("couldn't drop read buffer"); goto out; @@ -121,7 +121,7 @@ fseeko64(FILE *stream, _off64_t offset, int wherefrom) { assert(file->iob_Action != NULL); - position = (*file->iob_Action)(__clib2, file, &fam); + position = (*file->iob_Action)(__clib4, file, &fam); if (fam.fam_Error != OK) { SET_FLAG(file->iob_Flags, IOBF_ERROR); diff --git a/library/stdio/fsetpos.c b/library/stdio/fsetpos.c index e867f18b..e0c02488 100644 --- a/library/stdio/fsetpos.c +++ b/library/stdio/fsetpos.c @@ -1,5 +1,5 @@ /* - * $Id: stdio_fsetpos.c,v 1.8 2006-01-08 12:04:24 clib2devs Exp $ + * $Id: stdio_fsetpos.c,v 1.8 2006-01-08 12:04:24 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H diff --git a/library/stdio/fsetpos64.c b/library/stdio/fsetpos64.c index 59991c44..69f274e2 100644 --- a/library/stdio/fsetpos64.c +++ b/library/stdio/fsetpos64.c @@ -1,5 +1,5 @@ /* - * $Id: stdio_fsetpos64.c,v 1.0 2021-02-05 18:05:55 clib2devs Exp $ + * $Id: stdio_fsetpos64.c,v 1.0 2021-02-05 18:05:55 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H diff --git a/library/stdio/ftell.c b/library/stdio/ftell.c index 21f33dd5..930efe53 100644 --- a/library/stdio/ftell.c +++ b/library/stdio/ftell.c @@ -1,5 +1,5 @@ /* - * $Id: stdio_ftell.c,v 1.10 2006-01-08 12:04:24 clib2devs Exp $ + * $Id: stdio_ftell.c,v 1.10 2006-01-08 12:04:24 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H @@ -12,7 +12,7 @@ ftell(FILE *stream) { struct file_action_message fam; _off64_t result = ERROR; _off64_t position; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; assert(stream != NULL); @@ -23,7 +23,7 @@ ftell(FILE *stream) { goto out; } - assert(__is_valid_iob(__clib2, file)); + assert(__is_valid_iob(__clib4, file)); assert(FLAG_IS_SET(file->iob_Flags, IOBF_IN_USE)); assert(file->iob_BufferSize > 0); @@ -50,7 +50,7 @@ ftell(FILE *stream) { assert(file->iob_Action != NULL); - position = (_off64_t)(*file->iob_Action)(__clib2, file, &fam); + position = (_off64_t)(*file->iob_Action)(__clib4, file, &fam); if (position == GETPOSITION_ERROR && fam.fam_Error != OK) { SET_FLAG(file->iob_Flags, IOBF_ERROR); diff --git a/library/stdio/ftello.c b/library/stdio/ftello.c index f05d723f..f7fae1c9 100644 --- a/library/stdio/ftello.c +++ b/library/stdio/ftello.c @@ -1,5 +1,5 @@ /* - * $Id: stdio_ftello.c,v 1.2 2006-01-08 12:04:24 clib2devs Exp $ + * $Id: stdio_ftello.c,v 1.2 2006-01-08 12:04:24 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H diff --git a/library/stdio/ftello64.c b/library/stdio/ftello64.c index 7148a5f5..c9412727 100644 --- a/library/stdio/ftello64.c +++ b/library/stdio/ftello64.c @@ -1,5 +1,5 @@ /* - * $Id: stdio_ftello64.c,v 1.0 2021-02-05 13:30:24 clib2devs Exp $ + * $Id: stdio_ftello64.c,v 1.0 2021-02-05 13:30:24 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H @@ -12,7 +12,7 @@ ftello64(FILE *stream) { struct file_action_message fam; int64_t result = ERROR; int64_t position; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; assert(stream != NULL); @@ -23,7 +23,7 @@ ftello64(FILE *stream) { goto out; } - assert(__is_valid_iob(__clib2, file)); + assert(__is_valid_iob(__clib4, file)); assert(FLAG_IS_SET(file->iob_Flags, IOBF_IN_USE)); assert(file->iob_BufferSize > 0); @@ -50,7 +50,7 @@ ftello64(FILE *stream) { assert(file->iob_Action != NULL); - position = (*file->iob_Action)(__clib2, file, &fam); + position = (*file->iob_Action)(__clib4, file, &fam); if (fam.fam_Error != OK) { SET_FLAG(file->iob_Flags, IOBF_ERROR); diff --git a/library/stdio/ftrylockfile.c b/library/stdio/ftrylockfile.c index ec6746c9..d8a44764 100644 --- a/library/stdio/ftrylockfile.c +++ b/library/stdio/ftrylockfile.c @@ -1,5 +1,5 @@ /* - * $Id: stdio_ftrylockfile.c,v 1.5 2006-01-08 12:04:24 clib2devs Exp $ + * $Id: stdio_ftrylockfile.c,v 1.5 2006-01-08 12:04:24 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H @@ -10,7 +10,7 @@ int ftrylockfile(FILE *stream) { struct iob *file = (struct iob *) stream; int result = ERROR; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); @@ -27,7 +27,7 @@ ftrylockfile(FILE *stream) { goto out; } - assert(__is_valid_iob(__clib2, file)); + assert(__is_valid_iob(__clib4, file)); assert(FLAG_IS_SET(file->iob_Flags, IOBF_IN_USE)); if (FLAG_IS_CLEAR(file->iob_Flags, IOBF_IN_USE)) { diff --git a/library/stdio/funlockfile.c b/library/stdio/funlockfile.c index b2d1a3fa..57453aaf 100644 --- a/library/stdio/funlockfile.c +++ b/library/stdio/funlockfile.c @@ -1,5 +1,5 @@ /* - * $Id: stdio_funlockfile.c,v 1.4 2006-01-08 12:04:24 clib2devs Exp $ + * $Id: stdio_funlockfile.c,v 1.4 2006-01-08 12:04:24 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H @@ -9,7 +9,7 @@ void funlockfile(FILE *stream) { struct iob *file = (struct iob *) stream; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; assert(stream != NULL); @@ -20,7 +20,7 @@ funlockfile(FILE *stream) { goto out; } - assert(__is_valid_iob(__clib2, file)); + assert(__is_valid_iob(__clib4, file)); assert(FLAG_IS_SET(file->iob_Flags, IOBF_IN_USE)); if (FLAG_IS_CLEAR(file->iob_Flags, IOBF_IN_USE)) { diff --git a/library/stdio/fwrite.c b/library/stdio/fwrite.c index 37510ec5..534722e1 100644 --- a/library/stdio/fwrite.c +++ b/library/stdio/fwrite.c @@ -1,5 +1,5 @@ /* - * $Id: stdio_fwrite.c,v 1.13 2022-03-27 13:12:58 clib2devs Exp $ + * $Id: stdio_fwrite.c,v 1.13 2022-03-27 13:12:58 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H @@ -10,7 +10,7 @@ size_t fwrite(const void *ptr, size_t element_size, size_t count, FILE *stream) { struct iob *file = (struct iob *) stream; size_t result = 0; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); @@ -65,7 +65,7 @@ fwrite(const void *ptr, size_t element_size, size_t count, FILE *stream) { the output. */ buffer_mode = (file->iob_Flags & IOBF_BUFFER_MODE); if (buffer_mode == IOBF_BUFFER_MODE_NONE) { - struct fd *fd = __clib2->__fd[file->iob_Descriptor]; + struct fd *fd = __clib4->__fd[file->iob_Descriptor]; __fd_lock(fd); @@ -102,7 +102,7 @@ fwrite(const void *ptr, size_t element_size, size_t count, FILE *stream) { file->iob_BufferWriteBytes += num_buffer_bytes; /* Write the buffer to disk if it's full or contains a line feed. */ - if ((lf != NULL || __iob_write_buffer_is_full(file)) && __flush_iob_write_buffer(__clib2, file) < 0) { + if ((lf != NULL || __iob_write_buffer_is_full(file)) && __flush_iob_write_buffer(__clib4, file) < 0) { /* Abort with error. */ break; } @@ -181,7 +181,7 @@ fwrite(const void *ptr, size_t element_size, size_t count, FILE *stream) { file->iob_BufferWriteBytes += num_buffer_bytes; /* Write a full buffer to disk. */ - if (__iob_write_buffer_is_full(file) && __flush_iob_write_buffer(__clib2, file) < 0) { + if (__iob_write_buffer_is_full(file) && __flush_iob_write_buffer(__clib4, file) < 0) { /* Abort with error. */ break; } @@ -211,7 +211,7 @@ fwrite(const void *ptr, size_t element_size, size_t count, FILE *stream) { if ((file->iob_Flags & IOBF_BUFFER_MODE) == IOBF_BUFFER_MODE_NONE) { if (__iob_write_buffer_is_valid(file)) { - __flush_iob_write_buffer(__clib2, file); + __flush_iob_write_buffer(__clib4, file); } } diff --git a/library/stdio/get_fd.c b/library/stdio/get_fd.c index 759e41f8..168546f1 100644 --- a/library/stdio/get_fd.c +++ b/library/stdio/get_fd.c @@ -1,5 +1,5 @@ /* - * $Id: stdio_get_fd.c,v 1.1 2006-11-15 09:17:04 clib2devs Exp $ + * $Id: stdio_get_fd.c,v 1.1 2006-11-15 09:17:04 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H diff --git a/library/stdio/get_file_descriptor.c b/library/stdio/get_file_descriptor.c index da7f7a47..984fd410 100644 --- a/library/stdio/get_file_descriptor.c +++ b/library/stdio/get_file_descriptor.c @@ -1,5 +1,5 @@ /* - * $Id: stdio_get_file_descriptor.c,v 1.5 2006-01-08 12:04:24 clib2devs Exp $ + * $Id: stdio_get_file_descriptor.c,v 1.5 2006-01-08 12:04:24 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H @@ -15,16 +15,16 @@ static struct fd * get_file_descriptor(int file_descriptor, enum resolution_mode_t resolution_mode) { struct fd *result = NULL; struct fd *fd; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; - __stdio_lock(__clib2); + __stdio_lock(__clib4); - if (file_descriptor < 0 || file_descriptor >= __clib2->__num_fd) { + if (file_descriptor < 0 || file_descriptor >= __clib4->__num_fd) { SHOWMSG("invalid file descriptor"); goto out; } - fd = __clib2->__fd[file_descriptor]; + fd = __clib4->__fd[file_descriptor]; if (fd == NULL) { SHOWMSG("invalid file descriptor"); goto out; @@ -43,7 +43,7 @@ get_file_descriptor(int file_descriptor, enum resolution_mode_t resolution_mode) out: - __stdio_unlock(__clib2); + __stdio_unlock(__clib4); return (result); } diff --git a/library/stdio/getc.c b/library/stdio/getc.c index 8d44fc0d..02d6c354 100644 --- a/library/stdio/getc.c +++ b/library/stdio/getc.c @@ -1,5 +1,5 @@ /* - * $Id: stdio_getc.c,v 1.5 2006-01-08 12:04:24 clib2devs Exp $ + * $Id: stdio_getc.c,v 1.5 2006-01-08 12:04:24 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H diff --git a/library/stdio/getc_unlocked.c b/library/stdio/getc_unlocked.c index ba118a4e..f539301d 100644 --- a/library/stdio/getc_unlocked.c +++ b/library/stdio/getc_unlocked.c @@ -1,5 +1,5 @@ /* - * $Id: stdio_getc_unlocked.c,v 1.3 2006-01-08 12:04:24 clib2devs Exp $ + * $Id: stdio_getc_unlocked.c,v 1.3 2006-01-08 12:04:24 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H diff --git a/library/stdio/getchar.c b/library/stdio/getchar.c index 8d88e180..7107a158 100644 --- a/library/stdio/getchar.c +++ b/library/stdio/getchar.c @@ -1,5 +1,5 @@ /* - * $Id: stdio_getchar.c,v 1.3 2006-01-08 12:04:24 clib2devs Exp $ + * $Id: stdio_getchar.c,v 1.3 2006-01-08 12:04:24 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H diff --git a/library/stdio/getchar_unlocked.c b/library/stdio/getchar_unlocked.c index d31a1f39..18cd553c 100644 --- a/library/stdio/getchar_unlocked.c +++ b/library/stdio/getchar_unlocked.c @@ -1,5 +1,5 @@ /* - * $Id: stdio_getchar_unlocked.c,v 1.3 2006-01-08 12:04:24 clib2devs Exp $ + * $Id: stdio_getchar_unlocked.c,v 1.3 2006-01-08 12:04:24 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H diff --git a/library/stdio/getdelim.c b/library/stdio/getdelim.c index 7cfac6ed..8c8cf154 100644 --- a/library/stdio/getdelim.c +++ b/library/stdio/getdelim.c @@ -1,5 +1,5 @@ /* - * $Id: stdio_getdelim.c,v 1.0 2021-02-23 10:42:24 clib2devs Exp $ + * $Id: stdio_getdelim.c,v 1.0 2021-02-23 10:42:24 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H diff --git a/library/stdio/getline.c b/library/stdio/getline.c index bb177296..afcb9aba 100644 --- a/library/stdio/getline.c +++ b/library/stdio/getline.c @@ -1,5 +1,5 @@ /* - * $Id: stdio_getline.c,v 1.0 2021-02-23 10:41:24 clib2devs Exp $ + * $Id: stdio_getline.c,v 1.0 2021-02-23 10:41:24 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H diff --git a/library/stdio/gets.c b/library/stdio/gets.c index 2983af7b..d9979f91 100644 --- a/library/stdio/gets.c +++ b/library/stdio/gets.c @@ -1,5 +1,5 @@ /* - * $Id: stdio_gets.c,v 1.7 2022-03-27 12:04:24 clib2devs Exp $ + * $Id: stdio_gets.c,v 1.7 2022-03-27 12:04:24 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H diff --git a/library/stdio/grow_file.c b/library/stdio/grow_file.c index 0f1b95c8..ed3e8d69 100644 --- a/library/stdio/grow_file.c +++ b/library/stdio/grow_file.c @@ -1,5 +1,5 @@ /* - * $Id: stdio_grow_file.c,v 1.9 2021-01-31 17:35:41 clib2devs Exp $ + * $Id: stdio_grow_file.c,v 1.9 2021-01-31 17:35:41 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H @@ -23,7 +23,7 @@ __grow_file_size(struct fd *fd, int num_bytes) _off64_t current_position; int alignment_skip; int result = ERROR; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; assert(fd != NULL); @@ -51,7 +51,7 @@ __grow_file_size(struct fd *fd, int num_bytes) /* Allocate a little more memory than required to allow for * the buffer to be aligned to a cache line boundary. */ - buffer = malloc((size_t)buffer_size + (__clib2->__cache_line_size - 1)); + buffer = malloc((size_t)buffer_size + (__clib4->__cache_line_size - 1)); if (buffer == NULL) { SHOWMSG("not enough memory for write buffer"); @@ -60,7 +60,7 @@ __grow_file_size(struct fd *fd, int num_bytes) } /* Align the buffer to a cache line boundary. */ - aligned_buffer = (unsigned char *)(((ULONG)(buffer + (__clib2->__cache_line_size - 1))) & ~(__clib2->__cache_line_size - 1)); + aligned_buffer = (unsigned char *)(((ULONG)(buffer + (__clib4->__cache_line_size - 1))) & ~(__clib4->__cache_line_size - 1)); memset(aligned_buffer, 0, (size_t)buffer_size); diff --git a/library/stdio/growfdtable.c b/library/stdio/growfdtable.c index cdc37bf9..58a8acb9 100644 --- a/library/stdio/growfdtable.c +++ b/library/stdio/growfdtable.c @@ -1,5 +1,5 @@ /* - * $Id: stdio_growfdtable.c,v 1.9 2006-01-08 12:04:24 clib2devs Exp $ + * $Id: stdio_growfdtable.c,v 1.9 2006-01-08 12:04:24 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H @@ -11,17 +11,17 @@ #endif /* _STDLIB_MEMORY_H */ int -__grow_fd_table(struct _clib2 *__clib2, int max_fd) { +__grow_fd_table(struct _clib4 *__clib4, int max_fd) { const int granularity = 10; int new_num_fd; int result = ERROR; if (max_fd == 0) - new_num_fd = __clib2->__num_fd + granularity; + new_num_fd = __clib4->__num_fd + granularity; else new_num_fd = max_fd; - if (new_num_fd > __clib2->__num_fd) { + if (new_num_fd > __clib4->__num_fd) { struct fd **new_fd; int i; @@ -33,14 +33,14 @@ __grow_fd_table(struct _clib2 *__clib2, int max_fd) { goto out; } - for (i = __clib2->__num_fd; i < new_num_fd; i++) { + for (i = __clib4->__num_fd; i < new_num_fd; i++) { new_fd[i] = malloc(sizeof(*new_fd[i])); if (new_fd[i] == NULL) { int j; SHOWMSG("not enough memory for new file descriptor table entry"); - for (j = __clib2->__num_fd; j < i; j++) { + for (j = __clib4->__num_fd; j < i; j++) { UnlockMem(new_fd[j], sizeof(*new_fd[j])); free(new_fd[j]); } @@ -55,15 +55,15 @@ __grow_fd_table(struct _clib2 *__clib2, int max_fd) { LockMem(new_fd[i], sizeof(*new_fd[i])); } - if (__clib2->__fd != NULL) { - for (i = 0; i < __clib2->__num_fd; i++) - new_fd[i] = __clib2->__fd[i]; + if (__clib4->__fd != NULL) { + for (i = 0; i < __clib4->__num_fd; i++) + new_fd[i] = __clib4->__fd[i]; - free(__clib2->__fd); + free(__clib4->__fd); } - __clib2->__fd = new_fd; - __clib2->__num_fd = new_num_fd; + __clib4->__fd = new_fd; + __clib4->__num_fd = new_num_fd; } result = OK; diff --git a/library/stdio/growiobtable.c b/library/stdio/growiobtable.c index 9ac96f25..8143e78e 100644 --- a/library/stdio/growiobtable.c +++ b/library/stdio/growiobtable.c @@ -1,5 +1,5 @@ /* - * $Id: stdio_growiobtable.c,v 1.9 2006-01-08 12:04:24 clib2devs Exp $ + * $Id: stdio_growiobtable.c,v 1.9 2006-01-08 12:04:24 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H @@ -10,17 +10,17 @@ #include "stdlib_memory.h" #endif /* _STDLIB_MEMORY_H */ -int __grow_iob_table(struct _clib2 *__clib2, int max_iob) { +int __grow_iob_table(struct _clib4 *__clib4, int max_iob) { const int granularity = 10; int new_num_iob; int result = ERROR; if (max_iob == 0) - new_num_iob = __clib2->__num_iob + granularity; + new_num_iob = __clib4->__num_iob + granularity; else new_num_iob = max_iob; - if (new_num_iob > __clib2->__num_iob) { + if (new_num_iob > __clib4->__num_iob) { struct iob **new_iob; int i; @@ -32,7 +32,7 @@ int __grow_iob_table(struct _clib2 *__clib2, int max_iob) { goto out; } SHOWVALUE(new_num_iob); - for (i = __clib2->__num_iob; i < new_num_iob; i++) { + for (i = __clib4->__num_iob; i < new_num_iob; i++) { SHOWVALUE(i); new_iob[i] = malloc(sizeof(*new_iob[i])); SHOWMSG("malloc"); @@ -41,7 +41,7 @@ int __grow_iob_table(struct _clib2 *__clib2, int max_iob) { SHOWMSG("not enough memory for file table entry"); - for (j = __clib2->__num_iob; j < i; j++) + for (j = __clib4->__num_iob; j < i; j++) free(new_iob[j]); free(new_iob); @@ -53,15 +53,15 @@ int __grow_iob_table(struct _clib2 *__clib2, int max_iob) { memset(new_iob[i], 0, sizeof(*new_iob[i])); } - if (__clib2->__iob != NULL) { - for (i = 0; i < __clib2->__num_iob; i++) - new_iob[i] = __clib2->__iob[i]; + if (__clib4->__iob != NULL) { + for (i = 0; i < __clib4->__num_iob; i++) + new_iob[i] = __clib4->__iob[i]; - free(__clib2->__iob); + free(__clib4->__iob); } - __clib2->__iob = new_iob; - __clib2->__num_iob = new_num_iob; + __clib4->__iob = new_iob; + __clib4->__num_iob = new_num_iob; } result = OK; diff --git a/library/stdio/init_exit.c b/library/stdio/init_exit.c index e41c0976..27fbb6af 100644 --- a/library/stdio/init_exit.c +++ b/library/stdio/init_exit.c @@ -1,5 +1,5 @@ /* - * $Id: stdio_init_exit.c,v 1.33 2006-01-08 12:04:24 clib2devs Exp $ + * $Id: stdio_init_exit.c,v 1.33 2006-01-08 12:04:24 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H @@ -19,43 +19,43 @@ #endif /* _STDLIB_CONSTRUCTOR_H */ void -__close_all_files(struct _clib2 *__clib2) { +__close_all_files(struct _clib4 *__clib4) { int i; ENTER(); - __stdio_lock(__clib2); + __stdio_lock(__clib4); - if (__clib2->__num_iob > 0) { - for (i = 0; i < __clib2->__num_iob; i++) { - if (FLAG_IS_SET(__clib2->__iob[i]->iob_Flags, IOBF_IN_USE)) - fclose((FILE *) __clib2->__iob[i]); + if (__clib4->__num_iob > 0) { + for (i = 0; i < __clib4->__num_iob; i++) { + if (FLAG_IS_SET(__clib4->__iob[i]->iob_Flags, IOBF_IN_USE)) + fclose((FILE *) __clib4->__iob[i]); } - __clib2->__num_iob = 0; + __clib4->__num_iob = 0; } - if (__clib2->__num_fd > 0) { - for (i = 0; i < __clib2->__num_fd; i++) { - if (FLAG_IS_SET(__clib2->__fd[i]->fd_Flags, FDF_IN_USE)) + if (__clib4->__num_fd > 0) { + for (i = 0; i < __clib4->__num_fd; i++) { + if (FLAG_IS_SET(__clib4->__fd[i]->fd_Flags, FDF_IN_USE)) close(i); - UnlockMem(__clib2->__fd[i], sizeof(*__clib2->__fd[i])); + UnlockMem(__clib4->__fd[i], sizeof(*__clib4->__fd[i])); } - __clib2->__num_fd = 0; + __clib4->__num_fd = 0; } - __stdio_unlock(__clib2); + __stdio_unlock(__clib4); LEAVE(); } STDIO_DESTRUCTOR(stdio_exit) { ENTER(); - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; - __close_all_files(__clib2); + __close_all_files(__clib4); - __stdio_lock_exit(__clib2); + __stdio_lock_exit(__clib4); LEAVE(); } @@ -63,17 +63,17 @@ STDIO_DESTRUCTOR(stdio_exit) { STDIO_CONSTRUCTOR(stdio_init) { const int num_standard_files = (STDERR_FILENO - STDIN_FILENO + 1); BOOL success = FALSE; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); - if (__stdio_lock_init(__clib2) < 0) + if (__stdio_lock_init(__clib4) < 0) goto out; - if (__grow_iob_table(__clib2, num_standard_files) < 0) + if (__grow_iob_table(__clib4, num_standard_files) < 0) goto out; - if (__grow_fd_table(__clib2, num_standard_files) < 0) + if (__grow_fd_table(__clib4, num_standard_files) < 0) goto out; success = TRUE; diff --git a/library/stdio/initializefd.c b/library/stdio/initializefd.c index 8a178f12..8bcc31e5 100644 --- a/library/stdio/initializefd.c +++ b/library/stdio/initializefd.c @@ -1,5 +1,5 @@ /* - * $Id: stdio_initializefd.c,v 1.7 2006-10-10 13:39:26 clib2devs Exp $ + * $Id: stdio_initializefd.c,v 1.7 2006-10-10 13:39:26 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H diff --git a/library/stdio/initializeiob.c b/library/stdio/initializeiob.c index a3050ca4..c5c927a2 100644 --- a/library/stdio/initializeiob.c +++ b/library/stdio/initializeiob.c @@ -1,5 +1,5 @@ /* - * $Id: stdio_initializeiob.c,v 1.6 2006-09-22 09:02:51 clib2devs Exp $ + * $Id: stdio_initializeiob.c,v 1.6 2006-09-22 09:02:51 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H diff --git a/library/stdio/iobhookentry.c b/library/stdio/iobhookentry.c index 92a2b71a..e4725a25 100644 --- a/library/stdio/iobhookentry.c +++ b/library/stdio/iobhookentry.c @@ -1,5 +1,5 @@ /* - * $Id: stdio_iobhookentry.c,v 1.7 2006-01-08 12:04:24 clib2devs Exp $ + * $Id: stdio_iobhookentry.c,v 1.7 2006-01-08 12:04:24 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H @@ -7,7 +7,7 @@ #endif /* _STDIO_HEADERS_H */ int64_t -__iob_hook_entry(struct _clib2 *__clib2, struct iob *file_iob, struct file_action_message *fam) { +__iob_hook_entry(struct _clib4 *__clib4, struct iob *file_iob, struct file_action_message *fam) { struct fd *fd; int64_t result; @@ -20,11 +20,11 @@ __iob_hook_entry(struct _clib2 *__clib2, struct iob *file_iob, struct file_actio case file_action_close: SHOWVALUE(file_iob->iob_Descriptor); - assert(file_iob->iob_Descriptor >= 0 && file_iob->iob_Descriptor < __clib2->__num_fd); - assert(__clib2->__fd[file_iob->iob_Descriptor] != NULL); - assert(FLAG_IS_SET(__clib2->__fd[file_iob->iob_Descriptor]->fd_Flags, FDF_IN_USE)); + assert(file_iob->iob_Descriptor >= 0 && file_iob->iob_Descriptor < __clib4->__num_fd); + assert(__clib4->__fd[file_iob->iob_Descriptor] != NULL); + assert(FLAG_IS_SET(__clib4->__fd[file_iob->iob_Descriptor]->fd_Flags, FDF_IN_USE)); - if (__clib2->__fd[file_iob->iob_Descriptor] == NULL) { + if (__clib4->__fd[file_iob->iob_Descriptor] == NULL) { fam->fam_Error = EBADF; result = EOF; break; @@ -44,7 +44,7 @@ __iob_hook_entry(struct _clib2 *__clib2, struct iob *file_iob, struct file_actio assert(fd->fd_Action != NULL); - result = (*fd->fd_Action)(__clib2, fd, fam); + result = (*fd->fd_Action)(__clib4, fd, fam); break; diff --git a/library/stdio/lock.c b/library/stdio/lock.c index 9f331b0e..e67bbbfe 100644 --- a/library/stdio/lock.c +++ b/library/stdio/lock.c @@ -1,5 +1,5 @@ /* - * $Id: stdio_lock.c,v 1.5 2006-01-08 12:04:24 clib2devs Exp $ + * $Id: stdio_lock.c,v 1.5 2006-01-08 12:04:24 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H @@ -7,33 +7,33 @@ #endif /* _STDIO_HEADERS_H */ void -__stdio_lock(struct _clib2 *__clib2) { - assert(__clib2->stdio_lock != NULL); +__stdio_lock(struct _clib4 *__clib4) { + assert(__clib4->stdio_lock != NULL); - if (__clib2->stdio_lock != NULL) - ObtainSemaphore(__clib2->stdio_lock); + if (__clib4->stdio_lock != NULL) + ObtainSemaphore(__clib4->stdio_lock); } void -__stdio_unlock(struct _clib2 *__clib2) { - assert(__clib2->stdio_lock != NULL); +__stdio_unlock(struct _clib4 *__clib4) { + assert(__clib4->stdio_lock != NULL); - if (__clib2->stdio_lock != NULL) - ReleaseSemaphore(__clib2->stdio_lock); + if (__clib4->stdio_lock != NULL) + ReleaseSemaphore(__clib4->stdio_lock); } void -__stdio_lock_exit(struct _clib2 *__clib2) { - __delete_semaphore(__clib2->stdio_lock); - __clib2->stdio_lock = NULL; +__stdio_lock_exit(struct _clib4 *__clib4) { + __delete_semaphore(__clib4->stdio_lock); + __clib4->stdio_lock = NULL; } int -__stdio_lock_init(struct _clib2 *__clib2) { +__stdio_lock_init(struct _clib4 *__clib4) { int result = ERROR; - __clib2->stdio_lock = __create_semaphore(); - if (__clib2->stdio_lock == NULL) + __clib4->stdio_lock = __create_semaphore(); + if (__clib4->stdio_lock == NULL) goto out; result = OK; diff --git a/library/stdio/openiob.c b/library/stdio/openiob.c index 9cbb204f..6f0b0b75 100644 --- a/library/stdio/openiob.c +++ b/library/stdio/openiob.c @@ -1,5 +1,5 @@ /* - * $Id: stdio_openiob.c,v 1.15 2008-09-04 12:07:58 clib2devs Exp $ + * $Id: stdio_openiob.c,v 1.15 2008-09-04 12:07:58 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H @@ -11,7 +11,7 @@ #endif /* _STDLIB_MEMORY_H */ int -__open_iob(struct _clib2 *__clib2, const char *filename, const char *mode, int file_descriptor, int slot_number) { +__open_iob(struct _clib4 *__clib4, const char *filename, const char *mode, int file_descriptor, int slot_number) { struct SignalSemaphore *lock; ULONG file_flags; int result = ERROR; @@ -29,19 +29,19 @@ __open_iob(struct _clib2 *__clib2, const char *filename, const char *mode, int f __check_abort(); - __stdio_lock(__clib2); + __stdio_lock(__clib4); - assert(mode != NULL && 0 <= slot_number && slot_number < __clib2->__num_iob); + assert(mode != NULL && 0 <= slot_number && slot_number < __clib4->__num_iob); - file = __clib2->__iob[slot_number]; + file = __clib4->__iob[slot_number]; assert(FLAG_IS_CLEAR(file->iob_Flags, IOBF_IN_USE)); /* Figure out if the file descriptor provided is any use. */ if (file_descriptor >= 0) { - assert(file_descriptor < __clib2->__num_fd); - assert(__clib2->__fd[file_descriptor] != NULL); - assert(FLAG_IS_SET(__clib2->__fd[file_descriptor]->fd_Flags, FDF_IN_USE)); + assert(file_descriptor < __clib4->__num_fd); + assert(__clib4->__fd[file_descriptor] != NULL); + assert(FLAG_IS_SET(__clib4->__fd[file_descriptor]->fd_Flags, FDF_IN_USE)); fd = __get_file_descriptor(file_descriptor); if (fd == NULL) { @@ -94,7 +94,7 @@ __open_iob(struct _clib2 *__clib2, const char *filename, const char *mode, int f SHOWMSG("allocating file buffer"); /* Allocate a little more memory than necessary. */ - buffer = AllocVecTags(BUFSIZ + (__clib2->__cache_line_size - 1), AVT_Type, MEMF_SHARED, AVT_ClearWithValue, 0, TAG_DONE); + buffer = AllocVecTags(BUFSIZ + (__clib4->__cache_line_size - 1), AVT_Type, MEMF_SHARED, AVT_ClearWithValue, 0, TAG_DONE); if (buffer == NULL) { SHOWMSG("that didn't work"); @@ -103,7 +103,7 @@ __open_iob(struct _clib2 *__clib2, const char *filename, const char *mode, int f } /* Align the buffer start address to a cache line boundary. */ - aligned_buffer = (char *) ((ULONG)(buffer + (__clib2->__cache_line_size - 1)) & ~(__clib2->__cache_line_size - 1)); + aligned_buffer = (char *) ((ULONG)(buffer + (__clib4->__cache_line_size - 1)) & ~(__clib4->__cache_line_size - 1)); if (file_descriptor < 0) { assert(filename != NULL); @@ -155,7 +155,7 @@ __open_iob(struct _clib2 *__clib2, const char *filename, const char *mode, int f if (buffer != NULL) FreeVec(buffer); - __stdio_unlock(__clib2); + __stdio_unlock(__clib4); RETURN(result); return (result); diff --git a/library/stdio/parent_of_fh.c b/library/stdio/parent_of_fh.c index ba15dfca..4f94b5b3 100644 --- a/library/stdio/parent_of_fh.c +++ b/library/stdio/parent_of_fh.c @@ -1,5 +1,5 @@ /* - * $Id: stdio_parent_of_fh.c,v 1.2 2006-01-08 12:04:24 clib2devs Exp $ + * $Id: stdio_parent_of_fh.c,v 1.2 2006-01-08 12:04:24 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H diff --git a/library/stdio/perror.c b/library/stdio/perror.c index 9145976a..69c0bbb8 100644 --- a/library/stdio/perror.c +++ b/library/stdio/perror.c @@ -1,5 +1,5 @@ /* - * $Id: stdio_perror.c,v 1.4 2006-01-08 12:04:24 clib2devs Exp $ + * $Id: stdio_perror.c,v 1.4 2006-01-08 12:04:24 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H diff --git a/library/stdio/popen.c b/library/stdio/popen.c index b67ce9ab..4e34c3aa 100644 --- a/library/stdio/popen.c +++ b/library/stdio/popen.c @@ -1,5 +1,5 @@ /* - * $Id: stdio_popen.c,v 1.10 2008-05-07 09:33:55 clib2devs Exp $ + * $Id: stdio_popen.c,v 1.10 2008-05-07 09:33:55 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H @@ -54,7 +54,7 @@ popen(const char *command, const char *type) { unsigned long task_address; time_t now; int i; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); @@ -97,7 +97,7 @@ popen(const char *command, const char *type) { goto out; } - if (__clib2->__unix_path_semantics) { + if (__clib4->__unix_path_semantics) { char just_the_command_name[MAXPATHLEN + 1]; BOOL quotes_needed = FALSE; char *command_name; diff --git a/library/stdio/printf.c b/library/stdio/printf.c index 37f084b9..27fa9393 100644 --- a/library/stdio/printf.c +++ b/library/stdio/printf.c @@ -1,5 +1,5 @@ /* - * $Id: stdio_printf.c,v 1.6 2006-01-08 12:04:24 clib2devs Exp $ + * $Id: stdio_printf.c,v 1.6 2006-01-08 12:04:24 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H @@ -12,7 +12,7 @@ printf(const char *format, ...) { va_list arg; ENTER(); SHOWSTRING(format); - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; assert(format != NULL); @@ -21,12 +21,12 @@ printf(const char *format, ...) { goto out; } - __stdio_lock(__clib2); + __stdio_lock(__clib4); va_start(arg, format); result = vfprintf(stdout, format, arg); va_end(arg); - __stdio_unlock(__clib2); + __stdio_unlock(__clib4); out: diff --git a/library/stdio/putc.c b/library/stdio/putc.c index 6e19a963..83568bb3 100644 --- a/library/stdio/putc.c +++ b/library/stdio/putc.c @@ -1,5 +1,5 @@ /* - * $Id: stdio_putc.c,v 1.5 2006-01-08 12:04:24 clib2devs Exp $ + * $Id: stdio_putc.c,v 1.5 2006-01-08 12:04:24 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H diff --git a/library/stdio/putc_unlocked.c b/library/stdio/putc_unlocked.c index 72e1f9a6..0ef5213d 100644 --- a/library/stdio/putc_unlocked.c +++ b/library/stdio/putc_unlocked.c @@ -1,5 +1,5 @@ /* - * $Id: stdio_putc_unlocked.c,v 1.3 2006-01-08 12:04:25 clib2devs Exp $ + * $Id: stdio_putc_unlocked.c,v 1.3 2006-01-08 12:04:25 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H diff --git a/library/stdio/putchar.c b/library/stdio/putchar.c index cfad558d..4f0bd5f6 100644 --- a/library/stdio/putchar.c +++ b/library/stdio/putchar.c @@ -1,5 +1,5 @@ /* - * $Id: stdio_putchar.c,v 1.3 2006-01-08 12:04:25 clib2devs Exp $ + * $Id: stdio_putchar.c,v 1.3 2006-01-08 12:04:25 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H diff --git a/library/stdio/putchar_unlocked.c b/library/stdio/putchar_unlocked.c index 780ff3e7..ee2cc854 100644 --- a/library/stdio/putchar_unlocked.c +++ b/library/stdio/putchar_unlocked.c @@ -1,5 +1,5 @@ /* - * $Id: stdio_putchar_unlocked.c,v 1.3 2006-01-08 12:04:25 clib2devs Exp $ + * $Id: stdio_putchar_unlocked.c,v 1.3 2006-01-08 12:04:25 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H diff --git a/library/stdio/puts.c b/library/stdio/puts.c index dfb7de67..6e72d0bd 100644 --- a/library/stdio/puts.c +++ b/library/stdio/puts.c @@ -1,5 +1,5 @@ /* - * $Id: stdio_puts.c,v 1.9 2022-03-27 12:04:25 clib2devs Exp $ + * $Id: stdio_puts.c,v 1.9 2022-03-27 12:04:25 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H @@ -13,7 +13,7 @@ puts(const char *s) { int result = EOF; int buffer_mode; int c; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); @@ -28,7 +28,7 @@ puts(const char *s) { goto out; } - assert(__is_valid_iob(__clib2, file)); + assert(__is_valid_iob(__clib4, file)); assert(FLAG_IS_SET(file->iob_Flags, IOBF_IN_USE)); assert(file->iob_BufferSize > 0); @@ -38,7 +38,7 @@ puts(const char *s) { break it up into individual lines. */ buffer_mode = (file->iob_Flags & IOBF_BUFFER_MODE); if (buffer_mode == IOBF_BUFFER_MODE_NONE) { - struct fd *fd = __clib2->__fd[file->iob_Descriptor]; + struct fd *fd = __clib4->__fd[file->iob_Descriptor]; __fd_lock(fd); @@ -68,7 +68,7 @@ puts(const char *s) { This is intended to improve performance as it takes more effort to write a single character to a file than to write a bunch. */ if (result == 0 && (file->iob_Flags & IOBF_BUFFER_MODE) == IOBF_BUFFER_MODE_NONE) { - if (__iob_write_buffer_is_valid(file) && __flush_iob_write_buffer(__clib2, file) < 0) { + if (__iob_write_buffer_is_valid(file) && __flush_iob_write_buffer(__clib4, file) < 0) { SHOWMSG("couldn't flush the write buffer"); result = EOF; } diff --git a/library/stdio/record_locking.c b/library/stdio/record_locking.c index 31ffbbdc..597117d1 100755 --- a/library/stdio/record_locking.c +++ b/library/stdio/record_locking.c @@ -1,5 +1,5 @@ /* - * $Id: stdio_record_locking.c,v 1.20 2021-01-31 14:39:23 clib2devs Exp $ + * $Id: stdio_record_locking.c,v 1.20 2021-01-31 14:39:23 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H @@ -77,19 +77,19 @@ static void release_file_lock_semaphore(struct FileLockSemaphore *fls) { static struct FileLockSemaphore * obtain_file_lock_semaphore(BOOL shared) { struct FileLockSemaphore *result = NULL; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); - if (FileLockSemaphore == NULL && __clib2->__file_lock_semaphore_name != NULL && __clib2->__file_lock_semaphore_name[0] != '\0') { + if (FileLockSemaphore == NULL && __clib4->__file_lock_semaphore_name != NULL && __clib4->__file_lock_semaphore_name[0] != '\0') { struct FileLockSemaphore *fls = NULL; char *semaphore_name_copy = NULL; /* We allocate the new semaphore first, so that we don't spend any time in Forbid() allocating memory. */ - semaphore_name_copy = AllocVecTags(strlen(__clib2->__file_lock_semaphore_name) + 1, AVT_Type, MEMF_SHARED, TAG_DONE); + semaphore_name_copy = AllocVecTags(strlen(__clib4->__file_lock_semaphore_name) + 1, AVT_Type, MEMF_SHARED, TAG_DONE); if (semaphore_name_copy != NULL) { - strcpy(semaphore_name_copy, __clib2->__file_lock_semaphore_name); + strcpy(semaphore_name_copy, __clib4->__file_lock_semaphore_name); fls = AllocSysObjectTags(ASOT_SEMAPHORE, ASOSEM_Size, sizeof(*fls), @@ -103,7 +103,7 @@ obtain_file_lock_semaphore(BOOL shared) { Forbid(); - FileLockSemaphore = (struct FileLockSemaphore *) FindSemaphore((STRPTR) __clib2->__file_lock_semaphore_name); + FileLockSemaphore = (struct FileLockSemaphore *) FindSemaphore((STRPTR) __clib4->__file_lock_semaphore_name); if (FileLockSemaphore == NULL) { SHOWMSG("didn't find it; we're going to add our own"); @@ -565,7 +565,7 @@ __handle_record_locking(int cmd, struct flock *l, struct fd *fd, int *error_ptr) _off64_t start = 0; _off64_t len = 0; _off64_t stop; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); @@ -815,7 +815,7 @@ __handle_record_locking(int cmd, struct flock *l, struct fd *fd, int *error_ptr) const int rand_max = RAND_MAX / 65536; int num_random_ticks; - if (__clib2->__check_abort_enabled && (SetSignal(0, 0) & __clib2->__break_signal_mask) != 0) { + if (__clib4->__check_abort_enabled && (SetSignal(0, 0) & __clib4->__break_signal_mask) != 0) { SHOWMSG("lock polling loop stopped"); delete_file_lock_node(fln); diff --git a/library/stdio/remove.c b/library/stdio/remove.c index ca4d627e..76188720 100644 --- a/library/stdio/remove.c +++ b/library/stdio/remove.c @@ -1,5 +1,5 @@ /* - * $Id: stdio_remove.c,v 1.6 2006-01-08 12:04:25 clib2devs Exp $ + * $Id: stdio_remove.c,v 1.6 2006-01-08 12:04:25 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H @@ -9,7 +9,7 @@ int remove(const char *filename) { int result = ERROR; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); @@ -26,7 +26,7 @@ remove(const char *filename) { goto out; } - if (__clib2->__unix_path_semantics) { + if (__clib4->__unix_path_semantics) { result = unlink(filename); } else { LONG status; diff --git a/library/stdio/remove_fd_alias.c b/library/stdio/remove_fd_alias.c index e92ffef8..10a4e475 100644 --- a/library/stdio/remove_fd_alias.c +++ b/library/stdio/remove_fd_alias.c @@ -1,5 +1,5 @@ /* - * $Id: stdio_remove_fd_alias.c,v 1.5 2006-10-10 13:39:26 clib2devs Exp $ + * $Id: stdio_remove_fd_alias.c,v 1.5 2006-10-10 13:39:26 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H @@ -9,9 +9,9 @@ void __remove_fd_alias(struct fd *fd) { assert(fd != NULL); - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; - __stdio_lock(__clib2); + __stdio_lock(__clib4); if (fd->fd_Original != NULL) /* this is an alias */ { @@ -54,5 +54,5 @@ __remove_fd_alias(struct fd *fd) { } } - __stdio_unlock(__clib2); + __stdio_unlock(__clib4); } diff --git a/library/stdio/rename.c b/library/stdio/rename.c index 1bb0de44..70929b89 100644 --- a/library/stdio/rename.c +++ b/library/stdio/rename.c @@ -1,5 +1,5 @@ /* - * $Id: stdio_rename.c,v 1.10 2006-01-08 12:04:25 clib2devs Exp $ + * $Id: stdio_rename.c,v 1.10 2006-01-08 12:04:25 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H @@ -11,7 +11,7 @@ int rename(const char *oldname, const char *newname) { struct name_translation_info new_nti; int result = ERROR; LONG status; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); @@ -29,7 +29,7 @@ int rename(const char *oldname, const char *newname) { goto out; } - if (__clib2->__unix_path_semantics) { + if (__clib4->__unix_path_semantics) { if (oldname[0] == '\0' || newname[0] == '\0') { SHOWMSG("no name given"); @@ -56,7 +56,7 @@ int rename(const char *oldname, const char *newname) { if (status == DOSFALSE) { SHOWMSG("that didn't work"); - if (__clib2->__unix_path_semantics) { + if (__clib4->__unix_path_semantics) { LONG error; error = IoErr(); diff --git a/library/stdio/resolve_fd_file.c b/library/stdio/resolve_fd_file.c index 3d564af0..2c1175b6 100644 --- a/library/stdio/resolve_fd_file.c +++ b/library/stdio/resolve_fd_file.c @@ -1,5 +1,5 @@ /* - * $Id: stdio_resolve_fd_file.c,v 1.1 2006-11-16 14:39:23 clib2devs Exp $ + * $Id: stdio_resolve_fd_file.c,v 1.1 2006-11-16 14:39:23 clib4devs Exp $ */ #ifndef _FCNTL_HEADERS_H diff --git a/library/stdio/rewind.c b/library/stdio/rewind.c index 9bb226f4..85772d3d 100644 --- a/library/stdio/rewind.c +++ b/library/stdio/rewind.c @@ -1,5 +1,5 @@ /* - * $Id: stdio_rewind.c,v 1.4 2006-01-08 12:04:25 clib2devs Exp $ + * $Id: stdio_rewind.c,v 1.4 2006-01-08 12:04:25 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H diff --git a/library/stdio/scanf.c b/library/stdio/scanf.c index d80ef9da..6a0ca970 100644 --- a/library/stdio/scanf.c +++ b/library/stdio/scanf.c @@ -1,5 +1,5 @@ /* - * $Id: stdio_scanf.c,v 1.8 2006-01-08 12:04:25 clib2devs Exp $ + * $Id: stdio_scanf.c,v 1.8 2006-01-08 12:04:25 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H diff --git a/library/stdio/setbuf.c b/library/stdio/setbuf.c index 6fecaaf9..426ae526 100644 --- a/library/stdio/setbuf.c +++ b/library/stdio/setbuf.c @@ -1,5 +1,5 @@ /* - * $Id: stdio_setbuf.c,v 1.5 2006-01-08 12:04:25 clib2devs Exp $ + * $Id: stdio_setbuf.c,v 1.5 2006-01-08 12:04:25 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H diff --git a/library/stdio/setvbuf.c b/library/stdio/setvbuf.c index 0c3a7d8b..34060c00 100644 --- a/library/stdio/setvbuf.c +++ b/library/stdio/setvbuf.c @@ -1,5 +1,5 @@ /* - * $Id: stdio_setvbuf.c,v 1.12 2022-03-27 12:07:58 clib2devs Exp $ + * $Id: stdio_setvbuf.c,v 1.12 2022-03-27 12:07:58 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H @@ -15,7 +15,7 @@ setvbuf(FILE *stream, char *buf, int bufmode, size_t size) { struct iob *file = (struct iob *) stream; char *new_buffer = NULL; int result = EOF; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); @@ -50,7 +50,7 @@ setvbuf(FILE *stream, char *buf, int bufmode, size_t size) { goto out; } - assert(__is_valid_iob(__clib2, file)); + assert(__is_valid_iob(__clib4, file)); assert(FLAG_IS_SET(file->iob_Flags, IOBF_IN_USE)); assert(file->iob_BufferSize > 0); @@ -77,7 +77,7 @@ setvbuf(FILE *stream, char *buf, int bufmode, size_t size) { allocate some memory for it. */ if (size > 0 && buf == NULL) { /* Allocate a little more memory than necessary. */ - new_buffer = AllocVecTags(size + (__clib2->__cache_line_size - 1), AVT_Type, MEMF_SHARED, TAG_DONE); + new_buffer = AllocVecTags(size + (__clib4->__cache_line_size - 1), AVT_Type, MEMF_SHARED, TAG_DONE); if (new_buffer == NULL) { __set_errno(ENOBUFS); goto out; @@ -86,12 +86,12 @@ setvbuf(FILE *stream, char *buf, int bufmode, size_t size) { } /* Get rid of any buffered data. We're going to replace the buffer. */ - if (__iob_write_buffer_is_valid(file) && __flush_iob_write_buffer(__clib2, file) < 0) { + if (__iob_write_buffer_is_valid(file) && __flush_iob_write_buffer(__clib4, file) < 0) { SHOWMSG("could not flush write buffer"); goto out; } - if (__iob_read_buffer_is_valid(file) && __drop_iob_read_buffer(__clib2, file) < 0) { + if (__iob_read_buffer_is_valid(file) && __drop_iob_read_buffer(__clib4, file) < 0) { SHOWMSG("could not drop read buffer"); goto out; } @@ -116,7 +116,7 @@ setvbuf(FILE *stream, char *buf, int bufmode, size_t size) { file->iob_CustomBuffer = new_buffer; /* Align the buffer start address to a cache line boundary. */ - new_buffer = (char *) ((ULONG)(new_buffer + (__clib2->__cache_line_size - 1)) & ~(__clib2->__cache_line_size - 1)); + new_buffer = (char *) ((ULONG)(new_buffer + (__clib4->__cache_line_size - 1)) & ~(__clib4->__cache_line_size - 1)); } } diff --git a/library/stdio/snprintf.c b/library/stdio/snprintf.c index 1ad8d3da..938e308b 100644 --- a/library/stdio/snprintf.c +++ b/library/stdio/snprintf.c @@ -1,5 +1,5 @@ /* - * $Id: stdio_snprintf.c,v 1.6 2006-01-08 12:04:25 clib2devs Exp $ + * $Id: stdio_snprintf.c,v 1.6 2006-01-08 12:04:25 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H diff --git a/library/stdio/sprintf.c b/library/stdio/sprintf.c index ad5ee9b9..ebdfa93c 100644 --- a/library/stdio/sprintf.c +++ b/library/stdio/sprintf.c @@ -1,5 +1,5 @@ /* - * $Id: stdio_sprintf.c,v 1.6 2006-01-08 12:04:25 clib2devs Exp $ + * $Id: stdio_sprintf.c,v 1.6 2006-01-08 12:04:25 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H diff --git a/library/stdio/sscanf.c b/library/stdio/sscanf.c index e0f3a97c..c6497231 100644 --- a/library/stdio/sscanf.c +++ b/library/stdio/sscanf.c @@ -1,5 +1,5 @@ /* - * $Id: stdio_sscanf.c,v 1.9 2006-01-08 12:04:25 clib2devs Exp $ + * $Id: stdio_sscanf.c,v 1.9 2006-01-08 12:04:25 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H diff --git a/library/stdio/sscanf_hook_entry.c b/library/stdio/sscanf_hook_entry.c index b89b7a56..7eb1a777 100644 --- a/library/stdio/sscanf_hook_entry.c +++ b/library/stdio/sscanf_hook_entry.c @@ -1,5 +1,5 @@ /* - * $Id: stdio_sscanf_hook_entry.c,v 1.6 2006-01-08 12:04:25 clib2devs Exp $ + * $Id: stdio_sscanf_hook_entry.c,v 1.6 2006-01-08 12:04:25 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H @@ -7,7 +7,7 @@ #endif /* _STDIO_HEADERS_H */ int64_t -__sscanf_hook_entry(struct _clib2 *__clib2, struct iob *string_iob, struct file_action_message *fam) { +__sscanf_hook_entry(struct _clib4 *__clib4, struct iob *string_iob, struct file_action_message *fam) { int64_t result = EOF; int64_t num_bytes; diff --git a/library/stdio/stdio_ext.c b/library/stdio/stdio_ext.c index 8699ee2c..860c6520 100644 --- a/library/stdio/stdio_ext.c +++ b/library/stdio/stdio_ext.c @@ -1,5 +1,5 @@ /* - * $Id: stdio_stdio_ext.c,v 1.0 2022-08-26 12:04:24 clib2devs Exp $ + * $Id: stdio_stdio_ext.c,v 1.0 2022-08-26 12:04:24 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H diff --git a/library/stdio/stdio_headers.h b/library/stdio/stdio_headers.h index c9fb9029..9027c4a2 100755 --- a/library/stdio/stdio_headers.h +++ b/library/stdio/stdio_headers.h @@ -1,5 +1,5 @@ /* - * $Id: stdio_headers.h,v 2.0 2023-05-03 13:12:59 clib2devs Exp $ + * $Id: stdio_headers.h,v 2.0 2023-05-03 13:12:59 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H @@ -97,9 +97,9 @@ /****************************************************************************/ -#ifndef _SYS_CLIB2_IO_H -#include -#endif /* _SYS_CLIB2_IO_H */ +#ifndef _SYS_CLIB4_IO_H +#include +#endif /* _SYS_CLIB4_IO_H */ /****************************************************************************/ @@ -125,7 +125,7 @@ struct iob; /****************************************************************************/ /* The file action function for buffered files. */ -typedef int64_t (*file_action_iob_t)(struct _clib2 *__clib2, struct iob * iob, struct file_action_message * fam); +typedef int64_t (*file_action_iob_t)(struct _clib4 *__clib4, struct iob * iob, struct file_action_message * fam); #define UNGET 8 @@ -241,7 +241,7 @@ typedef struct iob { /****************************************************************************/ /* The file action function for unbuffered files. */ -typedef int64_t (*file_action_fd_t)(struct _clib2 *__clib2, struct fd * fd,struct file_action_message * fam); +typedef int64_t (*file_action_fd_t)(struct _clib4 *__clib4, struct fd * fd,struct file_action_message * fam); /****************************************************************************/ @@ -342,10 +342,10 @@ struct bcpl_name { /****************************************************************************/ -extern void __stdio_lock(struct _clib2 *__clib2); -extern void __stdio_unlock(struct _clib2 *__clib2); -extern void __stdio_lock_exit(struct _clib2 *__clib2); -extern int __stdio_lock_init(struct _clib2 *__clib2); +extern void __stdio_lock(struct _clib4 *__clib4); +extern void __stdio_unlock(struct _clib4 *__clib4); +extern void __stdio_lock_exit(struct _clib4 *__clib4); +extern int __stdio_lock_init(struct _clib4 *__clib4); extern void __fd_lock(struct fd *fd); extern void __fd_unlock(struct fd *fd); diff --git a/library/stdio/stdio_protos.h b/library/stdio/stdio_protos.h index f48c4e83..572f44e8 100755 --- a/library/stdio/stdio_protos.h +++ b/library/stdio/stdio_protos.h @@ -1,5 +1,5 @@ /* - * $Id: stdio_protos.h,v 1.19 2006-01-08 12:04:24 clib2devs Exp $ + * $Id: stdio_protos.h,v 1.19 2006-01-08 12:04:24 clib4devs Exp $ */ #ifndef _STDIO_PROTOS_H @@ -33,7 +33,7 @@ struct fd; /****************************************************************************/ /* stdio_init_exit.c */ -void __close_all_files(struct _clib2 *__clib2); +void __close_all_files(struct _clib4 *__clib4); /****************************************************************************/ @@ -50,12 +50,12 @@ extern struct fd *__get_file_descriptor_dont_resolve(int file_descriptor); /****************************************************************************/ /* stdio_iobhookentry.c */ -extern int64_t __iob_hook_entry(struct _clib2 *__clib2, struct iob *iob, struct file_action_message *fam); +extern int64_t __iob_hook_entry(struct _clib4 *__clib4, struct iob *iob, struct file_action_message *fam); /****************************************************************************/ /* stdio_fdhookentry.c */ -extern int64_t __fd_hook_entry(struct _clib2 *__clib2, struct fd *fd, struct file_action_message *fam); +extern int64_t __fd_hook_entry(struct _clib4 *__clib4, struct fd *fd, struct file_action_message *fam); /****************************************************************************/ @@ -65,8 +65,8 @@ extern void __initialize_fd(struct fd *fd, file_action_fd_t action_function, BPT /****************************************************************************/ /* stdio_findvacantfdentry.c */ -extern BOOL __is_valid_fd(struct _clib2 *__clib2, struct fd *fd); -extern int __find_vacant_fd_entry(struct _clib2 *__clib2); +extern BOOL __is_valid_fd(struct _clib4 *__clib4, struct fd *fd); +extern int __find_vacant_fd_entry(struct _clib4 *__clib4); /****************************************************************************/ @@ -76,29 +76,29 @@ extern void __initialize_iob(struct iob *iob, file_action_iob_t action_function, /****************************************************************************/ /* stdio_findvacantiobentry.c */ -extern BOOL __is_valid_iob(struct _clib2 *__clib2, struct iob *iob); -extern int __find_vacant_iob_entry(struct _clib2 *__clib2); +extern BOOL __is_valid_iob(struct _clib4 *__clib4, struct iob *iob); +extern int __find_vacant_iob_entry(struct _clib4 *__clib4); /****************************************************************************/ -extern int __grow_fd_table(struct _clib2 *__clib2, int max_fd); -extern int __grow_iob_table(struct _clib2 *__clib2, int max_fd); -extern int __open_iob(struct _clib2 *__clib2, const char *filename, const char *mode, int file_descriptor, int slot_number); +extern int __grow_fd_table(struct _clib4 *__clib4, int max_fd); +extern int __grow_iob_table(struct _clib4 *__clib4, int max_fd); +extern int __open_iob(struct _clib4 *__clib4, const char *filename, const char *mode, int file_descriptor, int slot_number); /****************************************************************************/ /* stdio_filliobreadbuffer.c */ -extern int __fill_iob_read_buffer(struct _clib2 *__clib2, struct iob *file); +extern int __fill_iob_read_buffer(struct _clib4 *__clib4, struct iob *file); /****************************************************************************/ /* stdio_dropiobreadbuffer.c */ -extern int __drop_iob_read_buffer(struct _clib2 *__clib2, struct iob *file); +extern int __drop_iob_read_buffer(struct _clib4 *__clib4, struct iob *file); /****************************************************************************/ /* stdio_flushiobwritebuffer.c */ -extern int __flush_iob_write_buffer(struct _clib2 *__clib2, struct iob *file); +extern int __flush_iob_write_buffer(struct _clib4 *__clib4, struct iob *file); /****************************************************************************/ @@ -115,22 +115,22 @@ extern int __fputc(int c, FILE *stream, int buffer_mode); /****************************************************************************/ /* stdio_sscanf_hook_entry.c */ -extern int64_t __sscanf_hook_entry(struct _clib2 *__clib2, struct iob *string, struct file_action_message *fam); +extern int64_t __sscanf_hook_entry(struct _clib4 *__clib4, struct iob *string, struct file_action_message *fam); /****************************************************************************/ /* stdio_vasprintf_hook_entry.c */ -extern int64_t __vasprintf_hook_entry(struct _clib2 *__clib2, struct iob *string, struct file_action_message *fam); +extern int64_t __vasprintf_hook_entry(struct _clib4 *__clib4, struct iob *string, struct file_action_message *fam); /****************************************************************************/ /* stdio_vsprintf_hook_entry.c */ -extern int64_t __vsprintf_hook_entry(struct _clib2 *__clib2, struct iob *string, struct file_action_message *fam); +extern int64_t __vsprintf_hook_entry(struct _clib4 *__clib4, struct iob *string, struct file_action_message *fam); /****************************************************************************/ /* stdio_vsnprintf_hook_entry.c */ -extern int64_t __vsnprintf_hook_entry(struct _clib2 *__clib2, struct iob *string, struct file_action_message *fam); +extern int64_t __vsnprintf_hook_entry(struct _clib4 *__clib4, struct iob *string, struct file_action_message *fam); /****************************************************************************/ diff --git a/library/stdio/tempnam.c b/library/stdio/tempnam.c index dd6c79ca..aa616840 100644 --- a/library/stdio/tempnam.c +++ b/library/stdio/tempnam.c @@ -1,5 +1,5 @@ /* - * $Id: stdio_tempnam.c,v 1.0 2021-02-22 17:46:25 clib2devs Exp $ + * $Id: stdio_tempnam.c,v 1.0 2021-02-22 17:46:25 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H @@ -16,14 +16,14 @@ static int worker(char *result, const char *part1, const char *part2, char *part3, int *part4) { /* Generate the filename and make sure that there isn't one called it already. */ - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; while (1) { __check_abort(); int t; - if (!__clib2->__unix_path_semantics) { + if (!__clib4->__unix_path_semantics) { if (!strcmp(part1, P_tmpdir)) { sprintf(result, "T:%s%s.%x", part2, part3, *part4); } else { @@ -54,7 +54,7 @@ worker(char *result, const char *part1, const char *part2, char *part3, int *par char * tempnam(const char *dir, const char *pfx) { ENTER(); - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; __check_abort(); @@ -79,7 +79,7 @@ tempnam(const char *dir, const char *pfx) { char string[7] = {0}; snprintf(string, 7, "%lX", r); - if (!worker(filename, dir, prefix, string, &__clib2->inc)) + if (!worker(filename, dir, prefix, string, &__clib4->inc)) return NULL; } diff --git a/library/stdio/tmpfile.c b/library/stdio/tmpfile.c index 0d84652d..dad1dd15 100644 --- a/library/stdio/tmpfile.c +++ b/library/stdio/tmpfile.c @@ -1,5 +1,5 @@ /* - * $Id: stdio_tmpfile.c,v 1.5 2006-01-08 12:04:25 clib2devs Exp $ + * $Id: stdio_tmpfile.c,v 1.5 2006-01-08 12:04:25 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H diff --git a/library/stdio/tmpfile64.c b/library/stdio/tmpfile64.c index 85ce45b1..cb16e944 100644 --- a/library/stdio/tmpfile64.c +++ b/library/stdio/tmpfile64.c @@ -1,5 +1,5 @@ /* - * $Id: stdio_tmpfile64.c,v 1.0 2021-02-05 18:00:41 clib2devs Exp $ + * $Id: stdio_tmpfile64.c,v 1.0 2021-02-05 18:00:41 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H diff --git a/library/stdio/tmpnam.c b/library/stdio/tmpnam.c index 383c3246..1933951d 100644 --- a/library/stdio/tmpnam.c +++ b/library/stdio/tmpnam.c @@ -1,5 +1,5 @@ /* - * $Id: stdio_tmpnam.c,v 1.6 2006-01-08 12:04:25 clib2devs Exp $ + * $Id: stdio_tmpnam.c,v 1.6 2006-01-08 12:04:25 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H diff --git a/library/stdio/translateioerror.c b/library/stdio/translateioerror.c index 5e4e3346..7c80276a 100644 --- a/library/stdio/translateioerror.c +++ b/library/stdio/translateioerror.c @@ -1,5 +1,5 @@ /* - * $Id: stdio_translateioerror.c,v 1.4 2006-01-08 12:04:25 clib2devs Exp $ + * $Id: stdio_translateioerror.c,v 1.4 2006-01-08 12:04:25 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H diff --git a/library/stdio/ungetc.c b/library/stdio/ungetc.c index c5f8e3c2..35ecee5d 100644 --- a/library/stdio/ungetc.c +++ b/library/stdio/ungetc.c @@ -1,5 +1,5 @@ /* - * $Id: stdio_ungetc.c,v 1.7 2006-01-08 12:04:25 clib2devs Exp $ + * $Id: stdio_ungetc.c,v 1.7 2006-01-08 12:04:25 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H @@ -10,7 +10,7 @@ int ungetc(int c, FILE *stream) { struct iob *file = (struct iob *) stream; int result = EOF; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); SHOWVALUE(c); @@ -27,7 +27,7 @@ ungetc(int c, FILE *stream) { goto out; } - assert(__is_valid_iob(__clib2, file)); + assert(__is_valid_iob(__clib4, file)); assert(FLAG_IS_SET(file->iob_Flags, IOBF_IN_USE)); assert(file->iob_BufferSize > 0); @@ -64,7 +64,7 @@ ungetc(int c, FILE *stream) { } /* Get rid of the write buffer, if it's still around. */ - if (__iob_write_buffer_is_valid(file) > 0 && __flush_iob_write_buffer(__clib2, file) < 0) { + if (__iob_write_buffer_is_valid(file) > 0 && __flush_iob_write_buffer(__clib4, file) < 0) { SHOWMSG("could not flush write buffer"); goto out; } diff --git a/library/stdio/unlockfile.c b/library/stdio/unlockfile.c index ddc536ea..0e8a5f75 100644 --- a/library/stdio/unlockfile.c +++ b/library/stdio/unlockfile.c @@ -1,5 +1,5 @@ /* - * $Id: stdio_unlockfile.c,v 1.3 2022-08-20 12:04:25 clib2devs Exp $ + * $Id: stdio_unlockfile.c,v 1.3 2022-08-20 12:04:25 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H diff --git a/library/stdio/vasprintf.c b/library/stdio/vasprintf.c index 124073e9..2040daa4 100644 --- a/library/stdio/vasprintf.c +++ b/library/stdio/vasprintf.c @@ -1,5 +1,5 @@ /* - * $Id: stdio_vasprintf.c,v 1.12 2006-01-08 12:04:25 clib2devs Exp $ + * $Id: stdio_vasprintf.c,v 1.12 2006-01-08 12:04:25 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H diff --git a/library/stdio/vasprintf_hook_entry.c b/library/stdio/vasprintf_hook_entry.c index a1421f64..897c0ebb 100644 --- a/library/stdio/vasprintf_hook_entry.c +++ b/library/stdio/vasprintf_hook_entry.c @@ -1,5 +1,5 @@ /* - * $Id: stdio_vasprintf_hook_entry.c,v 1.8 2006-01-08 12:04:25 clib2devs Exp $ + * $Id: stdio_vasprintf_hook_entry.c,v 1.8 2006-01-08 12:04:25 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H @@ -18,7 +18,7 @@ int64_t __vasprintf_hook_entry( - struct _clib2 *__clib2, + struct _clib4 *__clib4, struct iob *string_iob, struct file_action_message *fam) { int64_t result = EOF; diff --git a/library/stdio/vdprintf.c b/library/stdio/vdprintf.c index 295845fe..06e39c02 100644 --- a/library/stdio/vdprintf.c +++ b/library/stdio/vdprintf.c @@ -1,5 +1,5 @@ /* - * $Id: stdio_vdprintf.c,v 1.1 2023-06-15 12:04:24 clib2devs Exp $ + * $Id: stdio_vdprintf.c,v 1.1 2023-06-15 12:04:24 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H diff --git a/library/stdio/vfprintf.c b/library/stdio/vfprintf.c index 6f3523ab..0018f699 100644 --- a/library/stdio/vfprintf.c +++ b/library/stdio/vfprintf.c @@ -1,5 +1,5 @@ /* - * $Id: stdio_vfprintf.c,v 1.27 2022-03-5 17:42:43 clib2devs Exp $ + * $Id: stdio_vfprintf.c,v 1.27 2022-03-5 17:42:43 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H diff --git a/library/stdio/vfscanf.c b/library/stdio/vfscanf.c index 82a76385..2c33f249 100644 --- a/library/stdio/vfscanf.c +++ b/library/stdio/vfscanf.c @@ -1,5 +1,5 @@ /* - * $Id: stdio_vfscanf.c,v 1.22 2015-04-24 13:00:12 clib2devs Exp $ + * $Id: stdio_vfscanf.c,v 1.22 2015-04-24 13:00:12 clib4devs Exp $ */ /*#define DEBUG*/ @@ -40,7 +40,7 @@ vfscanf(FILE *stream, const char *format, va_list arg) { int num_assignments = 0; int conversion_type; int c; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); @@ -701,16 +701,16 @@ vfscanf(FILE *stream, const char *format, va_list arg) { if (c != EOF) { D(("c = '%lc'", c)); - __locale_lock(__clib2); + __locale_lock(__clib4); /* Did we find the decimal point? We accept both the * locale configured decimal point and the plain old * dot. */ - if (__clib2->__locale_table[LC_NUMERIC] != NULL) { + if (__clib4->__locale_table[LC_NUMERIC] != NULL) { const unsigned char *point; - point = (const unsigned char *) __clib2->__locale_table[LC_NUMERIC]->loc_DecimalPoint; + point = (const unsigned char *) __clib4->__locale_table[LC_NUMERIC]->loc_DecimalPoint; if (c == (*point) || c == '.') { SHOWMSG("found a decimal point"); @@ -729,7 +729,7 @@ vfscanf(FILE *stream, const char *format, va_list arg) { } } - __locale_unlock(__clib2); + __locale_unlock(__clib4); if (decimal_point_matches) { total_num_chars_read++; diff --git a/library/stdio/vprintf.c b/library/stdio/vprintf.c index 39c89925..5a60649e 100644 --- a/library/stdio/vprintf.c +++ b/library/stdio/vprintf.c @@ -1,5 +1,5 @@ /* - * $Id: stdio_vprintf.c,v 1.6 2006-01-08 12:04:25 clib2devs Exp $ + * $Id: stdio_vprintf.c,v 1.6 2006-01-08 12:04:25 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H diff --git a/library/stdio/vscanf.c b/library/stdio/vscanf.c index e472e152..70d58dd6 100644 --- a/library/stdio/vscanf.c +++ b/library/stdio/vscanf.c @@ -1,5 +1,5 @@ /* - * $Id: stdio_vscanf.c,v 1.2 2006-01-08 12:04:25 clib2devs Exp $ + * $Id: stdio_vscanf.c,v 1.2 2006-01-08 12:04:25 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H diff --git a/library/stdio/vsnprintf.c b/library/stdio/vsnprintf.c index 4114a0cc..68e8bf1f 100644 --- a/library/stdio/vsnprintf.c +++ b/library/stdio/vsnprintf.c @@ -1,5 +1,5 @@ /* - * $Id: stdio_vsnprintf.c,v 1.8 2006-01-08 12:04:25 clib2devs Exp $ + * $Id: stdio_vsnprintf.c,v 1.8 2006-01-08 12:04:25 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H diff --git a/library/stdio/vsnprintf_hook_entry.c b/library/stdio/vsnprintf_hook_entry.c index 492c4259..50d8ebe9 100644 --- a/library/stdio/vsnprintf_hook_entry.c +++ b/library/stdio/vsnprintf_hook_entry.c @@ -1,5 +1,5 @@ /* - * $Id: stdio_vsnprintf_hook_entry.c,v 1.8 2006-01-08 12:04:25 clib2devs Exp $ + * $Id: stdio_vsnprintf_hook_entry.c,v 1.8 2006-01-08 12:04:25 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H @@ -9,7 +9,7 @@ // TODO - Check for memmove 64bits int64_t -__vsnprintf_hook_entry(struct _clib2 *__clib2, struct iob *string_iob, struct file_action_message *fam) { +__vsnprintf_hook_entry(struct _clib4 *__clib4, struct iob *string_iob, struct file_action_message *fam) { int64_t result = EOF; assert(fam != NULL && string_iob != NULL); diff --git a/library/stdio/vsprintf.c b/library/stdio/vsprintf.c index 04723550..8fc9a6c9 100644 --- a/library/stdio/vsprintf.c +++ b/library/stdio/vsprintf.c @@ -1,5 +1,5 @@ /* - * $Id: stdio_vsprintf.c,v 1.7 2006-01-08 12:04:25 clib2devs Exp $ + * $Id: stdio_vsprintf.c,v 1.7 2006-01-08 12:04:25 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H diff --git a/library/stdio/vsprintf_hook_entry.c b/library/stdio/vsprintf_hook_entry.c index b9956bfd..5fca7b5f 100644 --- a/library/stdio/vsprintf_hook_entry.c +++ b/library/stdio/vsprintf_hook_entry.c @@ -1,5 +1,5 @@ /* - * $Id: stdio_vsprintf_hook_entry.c,v 1.5 2006-01-08 12:04:25 clib2devs Exp $ + * $Id: stdio_vsprintf_hook_entry.c,v 1.5 2006-01-08 12:04:25 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H @@ -7,7 +7,7 @@ #endif /* _STDIO_HEADERS_H */ int64_t -__vsprintf_hook_entry(struct _clib2 *__clib2, struct iob *string_iob, struct file_action_message *fam) { +__vsprintf_hook_entry(struct _clib4 *__clib4, struct iob *string_iob, struct file_action_message *fam) { int64_t result = ERROR; assert(fam != NULL && string_iob != NULL); diff --git a/library/stdio/vsscanf.c b/library/stdio/vsscanf.c index d48080cf..2229d769 100644 --- a/library/stdio/vsscanf.c +++ b/library/stdio/vsscanf.c @@ -1,5 +1,5 @@ /* - * $Id: stdio_vsscanf.c,v 1.2 2006-01-08 12:04:25 clib2devs Exp $ + * $Id: stdio_vsscanf.c,v 1.2 2006-01-08 12:04:25 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H diff --git a/library/stdlib/a64l.c b/library/stdlib/a64l.c index 4b705e7b..4983d912 100644 --- a/library/stdlib/a64l.c +++ b/library/stdlib/a64l.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_a64l.c,v 1.0 2022-08-06 12:04:25 clib2devs Exp $ + * $Id: stdlib_a64l.c,v 1.0 2022-08-06 12:04:25 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H #include "stdlib_headers.h" diff --git a/library/stdlib/abort.c b/library/stdlib/abort.c index 9885c923..9121c9d9 100644 --- a/library/stdlib/abort.c +++ b/library/stdlib/abort.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_abort.c,v 1.5 2006-01-08 12:04:25 clib2devs Exp $ + * $Id: stdlib_abort.c,v 1.5 2006-01-08 12:04:25 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H @@ -17,12 +17,12 @@ void __abort(void) { ENTER(); - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; /* If the signal handler returns it means that we still have to terminate the program. */ - __clib2->__check_abort_enabled = FALSE; + __clib4->__check_abort_enabled = FALSE; __print_termination_message(NULL); diff --git a/library/stdlib/abs.c b/library/stdlib/abs.c index 87703435..443d4774 100644 --- a/library/stdlib/abs.c +++ b/library/stdlib/abs.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_abs.c,v 1.3 2006-01-08 12:04:25 clib2devs Exp $ + * $Id: stdlib_abs.c,v 1.3 2006-01-08 12:04:25 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H diff --git a/library/stdlib/aligned_alloc.c b/library/stdlib/aligned_alloc.c index ad30f4fd..7b073972 100644 --- a/library/stdlib/aligned_alloc.c +++ b/library/stdlib/aligned_alloc.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_aligned_alloc.c,v 1.0 2021-02-22 19:26:25 clib2devs Exp $ + * $Id: stdlib_aligned_alloc.c,v 1.0 2021-02-22 19:26:25 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H diff --git a/library/stdlib/arc4random.c b/library/stdlib/arc4random.c index 44bfd0f6..9d3e1670 100644 --- a/library/stdlib/arc4random.c +++ b/library/stdlib/arc4random.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_arc4random.c,v 1.0 2022-08-22 12:04:25 clib2devs Exp $ + * $Id: stdlib_arc4random.c,v 1.0 2022-08-22 12:04:25 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H @@ -10,57 +10,57 @@ #include "unistd_headers.h" #endif /* _UNISTD_HEADERS_H */ -static inline uint8_t arc4_getbyte(struct _clib2 *__clib2); -static void arc4_stir(struct _clib2 *__clib2); +static inline uint8_t arc4_getbyte(struct _clib4 *__clib4); +static void arc4_stir(struct _clib4 *__clib4); static inline void -arc4_addrandom(struct _clib2 *__clib2, u_char *dat, int datlen) { +arc4_addrandom(struct _clib4 *__clib4, u_char *dat, int datlen) { int n; uint8_t si; - __clib2->rs.i--; + __clib4->rs.i--; for (n = 0; n < 256; n++) { - __clib2->rs.i = (__clib2->rs.i + 1); - si = __clib2->rs.s[__clib2->rs.i]; - __clib2->rs.j = (__clib2->rs.j + si + dat[n % datlen]); - __clib2->rs.s[__clib2->rs.i] = __clib2->rs.s[__clib2->rs.j]; - __clib2->rs.s[__clib2->rs.j] = si; + __clib4->rs.i = (__clib4->rs.i + 1); + si = __clib4->rs.s[__clib4->rs.i]; + __clib4->rs.j = (__clib4->rs.j + si + dat[n % datlen]); + __clib4->rs.s[__clib4->rs.i] = __clib4->rs.s[__clib4->rs.j]; + __clib4->rs.s[__clib4->rs.j] = si; } - __clib2->rs.j = __clib2->rs.i; + __clib4->rs.j = __clib4->rs.i; } static void -arc4_fetch(struct _clib2 *__clib2) { +arc4_fetch(struct _clib4 *__clib4) { int done, fd; fd = open(RANDOMDEV, O_RDONLY, 0); done = 0; if (fd >= 0) { - if (read(fd, &__clib2->rdat, KEYSIZE) == KEYSIZE) + if (read(fd, &__clib4->rdat, KEYSIZE) == KEYSIZE) done = 1; (void) close(fd); } if (!done) { - (void) gettimeofday(&__clib2->rdat.tv, NULL); - __clib2->rdat.pid = getpid(); + (void) gettimeofday(&__clib4->rdat.tv, NULL); + __clib4->rdat.pid = getpid(); /* We'll just take whatever was on the stack too... */ } } static void -arc4_stir(struct _clib2 *__clib2) { +arc4_stir(struct _clib4 *__clib4) { int n; /* * If we don't have data, we need some now before we can integrate * it into the static buffers */ - if (!__clib2->rs_data_available) { - arc4_fetch(__clib2); + if (!__clib4->rs_data_available) { + arc4_fetch(__clib4); } - __clib2->rs_data_available = 0; + __clib4->rs_data_available = 0; //__sync_synchronize(); - arc4_addrandom(__clib2, (u_char * ) & __clib2->rdat, KEYSIZE); + arc4_addrandom(__clib4, (u_char * ) & __clib4->rdat, KEYSIZE); /* * Throw away the first N bytes of output, as suggested in the @@ -70,41 +70,41 @@ arc4_stir(struct _clib2 *__clib2) { * by Ilya Mironov. */ for (n = 0; n < 1024; n++) - (void) arc4_getbyte(__clib2); - __clib2->arc4_count = 1600000; - __clib2->rs_stired = 1; + (void) arc4_getbyte(__clib4); + __clib4->arc4_count = 1600000; + __clib4->rs_stired = 1; } static inline uint8_t -arc4_getbyte(struct _clib2 *__clib2) { +arc4_getbyte(struct _clib4 *__clib4) { uint8_t si, sj; - __clib2->rs.i = (__clib2->rs.i + 1); - si = __clib2->rs.s[__clib2->rs.i]; - __clib2->rs.j = (__clib2->rs.j + si); - sj = __clib2->rs.s[__clib2->rs.j]; - __clib2->rs.s[__clib2->rs.i] = sj; - __clib2->rs.s[__clib2->rs.j] = si; + __clib4->rs.i = (__clib4->rs.i + 1); + si = __clib4->rs.s[__clib4->rs.i]; + __clib4->rs.j = (__clib4->rs.j + si); + sj = __clib4->rs.s[__clib4->rs.j]; + __clib4->rs.s[__clib4->rs.i] = sj; + __clib4->rs.s[__clib4->rs.j] = si; - return (__clib2->rs.s[(si + sj) & 0xff]); + return (__clib4->rs.s[(si + sj) & 0xff]); } static inline uint32_t -arc4_getword(struct _clib2 *__clib2) { +arc4_getword(struct _clib4 *__clib4) { uint32_t val; - val = arc4_getbyte(__clib2) << 24; - val |= arc4_getbyte(__clib2) << 16; - val |= arc4_getbyte(__clib2) << 8; - val |= arc4_getbyte(__clib2); + val = arc4_getbyte(__clib4) << 24; + val |= arc4_getbyte(__clib4) << 16; + val |= arc4_getbyte(__clib4) << 8; + val |= arc4_getbyte(__clib4); return (val); } static inline int -arc4_check_stir(struct _clib2 *__clib2) { - if (!__clib2->rs_stired || __clib2->arc4_count <= 0) { - arc4_stir(__clib2); +arc4_check_stir(struct _clib4 *__clib4) { + if (!__clib4->rs_stired || __clib4->arc4_count <= 0) { + arc4_stir(__clib4); return 1; } return 0; @@ -112,39 +112,39 @@ arc4_check_stir(struct _clib2 *__clib2) { void arc4random_stir(void) { - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; - ObtainSemaphore(__clib2->__random_lock); - arc4_stir(__clib2); - ReleaseSemaphore(__clib2->__random_lock); + ObtainSemaphore(__clib4->__random_lock); + arc4_stir(__clib4); + ReleaseSemaphore(__clib4->__random_lock); } void arc4random_addrandom(u_char *dat, int datlen) { - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; - ObtainSemaphore(__clib2->__random_lock); - arc4_check_stir(__clib2); - arc4_addrandom(__clib2, dat, datlen); - ReleaseSemaphore(__clib2->__random_lock); + ObtainSemaphore(__clib4->__random_lock); + arc4_check_stir(__clib4); + arc4_addrandom(__clib4, dat, datlen); + ReleaseSemaphore(__clib4->__random_lock); } uint32_t arc4random(void) { uint32_t rnd; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; - ObtainSemaphore(__clib2->__random_lock); + ObtainSemaphore(__clib4->__random_lock); - int did_stir = arc4_check_stir(__clib2); - rnd = arc4_getword(__clib2); - __clib2->arc4_count -= 4; + int did_stir = arc4_check_stir(__clib4); + rnd = arc4_getword(__clib4); + __clib4->arc4_count -= 4; - ReleaseSemaphore(__clib2->__random_lock); + ReleaseSemaphore(__clib4->__random_lock); if (did_stir) { /* stirring used up our data pool, we need to read in new data outside of the lock */ - arc4_fetch(__clib2); - __clib2->rs_data_available = 1; + arc4_fetch(__clib4); + __clib4->rs_data_available = 1; __sync_synchronize(); } @@ -155,23 +155,23 @@ void arc4random_buf(void *_buf, size_t n) { u_char *buf = (u_char *) _buf; int did_stir = 0; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; - ObtainSemaphore(__clib2->__random_lock); + ObtainSemaphore(__clib4->__random_lock); while (n--) { - if (arc4_check_stir(__clib2)) { + if (arc4_check_stir(__clib4)) { did_stir = 1; } - buf[n] = arc4_getbyte(__clib2); - __clib2->arc4_count--; + buf[n] = arc4_getbyte(__clib4); + __clib4->arc4_count--; } - ReleaseSemaphore(__clib2->__random_lock); + ReleaseSemaphore(__clib4->__random_lock); if (did_stir) { /* stirring used up our data pool, we need to read in new data outside of the lock */ - arc4_fetch(__clib2); - __clib2->rs_data_available = 1; + arc4_fetch(__clib4); + __clib4->rs_data_available = 1; __sync_synchronize(); } } diff --git a/library/stdlib/arg.c b/library/stdlib/arg.c index a6d3d18b..e8f07936 100644 --- a/library/stdlib/arg.c +++ b/library/stdlib/arg.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_arg.c,v 1.15 2006-09-25 14:51:15 clib2devs Exp $ + * $Id: stdlib_arg.c,v 1.15 2006-09-25 14:51:15 clib4devs Exp $ */ /*#define DEBUG*/ @@ -42,10 +42,10 @@ is_space(unsigned char c) { } static BOOL -is_escape_character(struct _clib2 *__clib2, unsigned char c) { +is_escape_character(struct _clib4 *__clib4, unsigned char c) { BOOL result; - result = (BOOL)(c == '*' || c == __clib2->__shell_escape_character); + result = (BOOL)(c == '*' || c == __clib4->__shell_escape_character); return (result); } @@ -63,10 +63,10 @@ ARG_CONSTRUCTOR(arg_init) { ENTER(); BOOL success = FALSE; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; /* Shell startup? */ - if (__clib2->__WBenchMsg == NULL) { + if (__clib4->__WBenchMsg == NULL) { BOOL expand_wildcard_args = FALSE; size_t number_of_arguments; const unsigned char *arg_str; @@ -77,8 +77,8 @@ ARG_CONSTRUCTOR(arg_init) { /* Check if wildcard expansion of command line parameters should be enabled. Note that the callback function, if declared, takes precedence over the global variable. */ - if (__clib2->__unix_path_semantics) { - expand_wildcard_args = __clib2->__expand_wildcard_args; + if (__clib4->__unix_path_semantics) { + expand_wildcard_args = __clib4->__expand_wildcard_args; if (FindVar("DISABLE_COMMANDLINE_WILDCARD_EXPANSION", LV_VAR) != NULL) expand_wildcard_args = FALSE; @@ -132,7 +132,7 @@ ARG_CONSTRUCTOR(arg_init) { while ((*str) != '\0' && NOT is_final_quote_character(str)) { /* Escape character? */ - if (is_escape_character(__clib2, *str)) { + if (is_escape_character(__clib4, *str)) { str++; if ((*str) != '\0') @@ -158,16 +158,16 @@ ARG_CONSTRUCTOR(arg_init) { /* Put all this together into an argument vector. We allocate one extra slot to put a NULL pointer into. */ - __clib2->__argv = (char **) AllocVecTags((number_of_arguments + 1) * sizeof(*__clib2->__argv), AVT_Type, MEMF_SHARED, AVT_ClearWithValue, 0, TAG_DONE); - if (__clib2->__argv == NULL) + __clib4->__argv = (char **) AllocVecTags((number_of_arguments + 1) * sizeof(*__clib4->__argv), AVT_Type, MEMF_SHARED, AVT_ClearWithValue, 0, TAG_DONE); + if (__clib4->__argv == NULL) goto out; /* The first parameter is the program name. */ - __clib2->__argv[0] = __clib2->__progname; + __clib4->__argv[0] = __clib4->__progname; str = command_line; - __clib2->__argc = 1; + __clib4->__argc = 1; while (TRUE) { /* Skip leading blank space. */ @@ -181,22 +181,22 @@ ARG_CONSTRUCTOR(arg_init) { if ((*str) == '\"') { char *arg; - if (__clib2->__unix_path_semantics) { + if (__clib4->__unix_path_semantics) { /* If necessary, indicate that this parameter was quoted. */ - if (expand_wildcard_args && __wildcard_quote_parameter(__clib2->__argc) < 0) + if (expand_wildcard_args && __wildcard_quote_parameter(__clib4->__argc) < 0) goto out; } str++; - __clib2->__argv[__clib2->__argc++] = (char *) str; + __clib4->__argv[__clib4->__argc++] = (char *) str; arg = (char *) str; /* Process the quoted string. */ while ((*str) != '\0' && NOT is_final_quote_character(str)) { - if (is_escape_character(__clib2, *str)) { + if (is_escape_character(__clib4, *str)) { str++; switch (*str) { @@ -240,7 +240,7 @@ ARG_CONSTRUCTOR(arg_init) { actually overwrites the final quote character. */ (*arg) = '\0'; } else { - __clib2->__argv[__clib2->__argc++] = (char *) str; + __clib4->__argv[__clib4->__argc++] = (char *) str; while ((*str) != '\0' && NOT is_space(*str)) str++; @@ -252,12 +252,12 @@ ARG_CONSTRUCTOR(arg_init) { } } - assert(__clib2->__argc == (int) number_of_arguments); + assert(__clib4->__argc == (int) number_of_arguments); assert(str <= &command_line[arg_len]); - __clib2->__argv[__clib2->__argc] = NULL; + __clib4->__argv[__clib4->__argc] = NULL; - if (__clib2->__unix_path_semantics) { + if (__clib4->__unix_path_semantics) { /* If necessary, expand wildcard patterns found in the command line string into file and directory names. */ if (expand_wildcard_args && __wildcard_expand_init() < 0) goto out; @@ -266,7 +266,7 @@ ARG_CONSTRUCTOR(arg_init) { /* Return a pointer to the startup message in place of the the argument vector. * The argument counter (what will come out as 'argc' for the main() function) will remain 0. */ - __clib2->__argv = (char **) __clib2->__WBenchMsg; + __clib4->__argv = (char **) __clib4->__WBenchMsg; } success = TRUE; @@ -284,12 +284,12 @@ ARG_CONSTRUCTOR(arg_init) { ARG_DESTRUCTOR(arg_exit) { ENTER(); - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; - if (__clib2->__WBenchMsg == NULL) { - if (__clib2->__argv) { - FreeVec(__clib2->__argv); - __clib2->__argv = NULL; + if (__clib4->__WBenchMsg == NULL) { + if (__clib4->__argv) { + FreeVec(__clib4->__argv); + __clib4->__argv = NULL; } } diff --git a/library/stdlib/assertion_failure.c b/library/stdlib/assertion_failure.c index cc72d267..a47b9072 100644 --- a/library/stdlib/assertion_failure.c +++ b/library/stdlib/assertion_failure.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_assertion_failure.c,v 1.12 2006-01-08 12:04:25 clib2devs Exp $ + * $Id: stdlib_assertion_failure.c,v 1.12 2006-01-08 12:04:25 clib4devs Exp $ */ #ifndef PROTO_EXEC_H @@ -28,11 +28,11 @@ void __assertion_failure(const char *file_name, int line_number, const char *expression) { static int been_here_before; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; /* Don't drop into a recursion. */ if (been_here_before++ == 0) { - if (__clib2->__no_standard_io || __clib2->__WBenchMsg != NULL) { + if (__clib4->__no_standard_io || __clib4->__WBenchMsg != NULL) { struct IntuitionIFace *IIntuition = NULL; struct Library *IntuitionBase; @@ -51,7 +51,7 @@ __assertion_failure(const char *file_name, int line_number, const char *expressi memset(&es, 0, sizeof(es)); es.es_StructSize = sizeof(es); - es.es_Title = (STRPTR) __clib2->__progname; + es.es_Title = (STRPTR) __clib4->__progname; es.es_TextFormat = (STRPTR) "Assertion of condition\n\"%s\"\nfailed in file \"%s\", line %ld."; es.es_GadgetFormat = (STRPTR) "Sorry"; @@ -61,9 +61,9 @@ __assertion_failure(const char *file_name, int line_number, const char *expressi CloseLibrary(IntuitionBase); } } else { - if (__clib2->__num_iob > STDERR_FILENO) { - if (__clib2->__progname != NULL) - fprintf(stderr, "[%s] ", __clib2->__progname); + if (__clib4->__num_iob > STDERR_FILENO) { + if (__clib4->__progname != NULL) + fprintf(stderr, "[%s] ", __clib4->__progname); fprintf(stderr, "%s:%d: failed assertion \"%s\".\n", @@ -98,8 +98,8 @@ __assertion_failure(const char *file_name, int line_number, const char *expressi output = Output(); if (output != BZERO) { - if (__clib2->__progname != NULL) - FPrintf(output, "[%s] ", __clib2->__progname); + if (__clib4->__progname != NULL) + FPrintf(output, "[%s] ", __clib4->__progname); FPrintf(output, "%s:%ld: failed assertion \"%s\".\n", diff --git a/library/stdlib/atexit.c b/library/stdlib/atexit.c index 051ec05c..5658fca5 100644 --- a/library/stdlib/atexit.c +++ b/library/stdlib/atexit.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_atexit.c,v 1.6 2006-01-08 12:04:25 clib2devs Exp $ + * $Id: stdlib_atexit.c,v 1.6 2006-01-08 12:04:25 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H @@ -14,7 +14,7 @@ int atexit(void (*function)(void)) { struct ExitTrapNode *etn; int result = ERROR; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; assert(function != NULL); @@ -23,14 +23,14 @@ atexit(void (*function)(void)) { goto out; } - if (__clib2->atexit_blocked) { + if (__clib4->atexit_blocked) { __set_errno(EACCES); goto out; } /* We always have room for 32 exit trap functions. */ - if (__clib2->num_exit_nodes_used < NUM_ENTRIES(__clib2->exit_node_table)) { - etn = &__clib2->exit_node_table[__clib2->num_exit_nodes_used++]; + if (__clib4->num_exit_nodes_used < NUM_ENTRIES(__clib4->exit_node_table)) { + etn = &__clib4->exit_node_table[__clib4->num_exit_nodes_used++]; } else { /* More than 32 exit trap functions are called * for. Let's make room for another one. @@ -44,10 +44,10 @@ atexit(void (*function)(void)) { etn->etn_Function = function; - if (__clib2->exit_trap_list.mlh_Head == NULL) - NewList((struct List *) &__clib2->exit_trap_list); + if (__clib4->exit_trap_list.mlh_Head == NULL) + NewList((struct List *) &__clib4->exit_trap_list); - AddHead((struct List *) &__clib2->exit_trap_list, (struct Node *) etn); + AddHead((struct List *) &__clib4->exit_trap_list, (struct Node *) etn); result = OK; @@ -59,18 +59,18 @@ atexit(void (*function)(void)) { void __exit_trap_trigger(void) { struct ExitTrapNode *etn; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; /* Disallow further additions to the atexit() list. */ - __clib2->atexit_blocked = TRUE; + __clib4->atexit_blocked = TRUE; /* Remove the trap entries one at a time and process them. * Should one of the routines drop into exit(), processing * will continue with the next entry until eventually all * list items have been taken care of. */ - if (__clib2->exit_trap_list.mlh_Head != NULL) { - while ((etn = (struct ExitTrapNode *) RemHead((struct List *) &__clib2->exit_trap_list)) != NULL) + if (__clib4->exit_trap_list.mlh_Head != NULL) { + while ((etn = (struct ExitTrapNode *) RemHead((struct List *) &__clib4->exit_trap_list)) != NULL) (*etn->etn_Function)(); } } diff --git a/library/stdlib/atof.c b/library/stdlib/atof.c index 68703718..2ce45208 100644 --- a/library/stdlib/atof.c +++ b/library/stdlib/atof.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_atof.c,v 1.5 2021-03-29 16:34:25 clib2devs Exp $ + * $Id: stdlib_atof.c,v 1.5 2021-03-29 16:34:25 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H diff --git a/library/stdlib/atoff.c b/library/stdlib/atoff.c index ebf7742e..d7acf10b 100644 --- a/library/stdlib/atoff.c +++ b/library/stdlib/atoff.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_atoff.c,v 1.0 2021-03-29 16:34:25 clib2devs Exp $ + * $Id: stdlib_atoff.c,v 1.0 2021-03-29 16:34:25 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H diff --git a/library/stdlib/atoi.c b/library/stdlib/atoi.c index 5211b63e..5952e970 100644 --- a/library/stdlib/atoi.c +++ b/library/stdlib/atoi.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_atoi.c,v 1.4 2006-01-08 12:04:25 clib2devs Exp $ + * $Id: stdlib_atoi.c,v 1.4 2006-01-08 12:04:25 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H diff --git a/library/stdlib/atol.c b/library/stdlib/atol.c index ef1deda5..abeb1c2a 100644 --- a/library/stdlib/atol.c +++ b/library/stdlib/atol.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_atol.c,v 1.4 2006-01-08 12:04:25 clib2devs Exp $ + * $Id: stdlib_atol.c,v 1.4 2006-01-08 12:04:25 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H diff --git a/library/stdlib/atoll.c b/library/stdlib/atoll.c index 7b763494..3c624d33 100644 --- a/library/stdlib/atoll.c +++ b/library/stdlib/atoll.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_atoll.c,v 1.3 2006-08-02 08:00:27 clib2devs Exp $ + * $Id: stdlib_atoll.c,v 1.3 2006-08-02 08:00:27 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H diff --git a/library/stdlib/bsearch.c b/library/stdlib/bsearch.c index 0f3968b8..5989e903 100644 --- a/library/stdlib/bsearch.c +++ b/library/stdlib/bsearch.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_bsearch.c,v 1.4 2006-01-08 12:04:25 clib2devs Exp $ + * $Id: stdlib_bsearch.c,v 1.4 2006-01-08 12:04:25 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H diff --git a/library/stdlib/calloc.c b/library/stdlib/calloc.c index 2dfb20f6..000bc32e 100644 --- a/library/stdlib/calloc.c +++ b/library/stdlib/calloc.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_calloc.c,v 1.7 2006-01-08 12:04:25 clib2devs Exp $ + * $Id: stdlib_calloc.c,v 1.7 2006-01-08 12:04:25 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H diff --git a/library/stdlib/div.c b/library/stdlib/div.c index 2374a311..d2c08db3 100644 --- a/library/stdlib/div.c +++ b/library/stdlib/div.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_div.c,v 1.3 2006-01-08 12:04:25 clib2devs Exp $ + * $Id: stdlib_div.c,v 1.3 2006-01-08 12:04:25 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H diff --git a/library/stdlib/divsi3.c b/library/stdlib/divsi3.c index f0cd052d..2ac5b305 100644 --- a/library/stdlib/divsi3.c +++ b/library/stdlib/divsi3.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_divsi3.c,v 1.3 2006-01-08 12:04:25 clib2devs Exp $ + * $Id: stdlib_divsi3.c,v 1.3 2006-01-08 12:04:25 clib4devs Exp $ */ __asm (" \n\ diff --git a/library/stdlib/divsi4.c b/library/stdlib/divsi4.c index dfb33a10..64984971 100644 --- a/library/stdlib/divsi4.c +++ b/library/stdlib/divsi4.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_divsi4.c,v 1.3 2006-01-08 12:04:25 clib2devs Exp $ + * $Id: stdlib_divsi4.c,v 1.3 2006-01-08 12:04:25 clib4devs Exp $ */ __asm(" \n\ diff --git a/library/stdlib/dlclose.c b/library/stdlib/dlclose.c index a0f63115..738b144e 100644 --- a/library/stdlib/dlclose.c +++ b/library/stdlib/dlclose.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_dlclose.c,v 1.2 2010-08-21 11:37:03 clib2devs Exp $ + * $Id: stdlib_dlclose.c,v 1.2 2010-08-21 11:37:03 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H @@ -13,18 +13,18 @@ int dlclose(void *handle) { int result = -1; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); SHOWPOINTER(handle); - if (__clib2->__dl_root_handle != NULL) { - struct ElfIFace *IElf = __clib2->IElf; + if (__clib4->__dl_root_handle != NULL) { + struct ElfIFace *IElf = __clib4->IElf; Elf32_Error error; - error = DLClose(__clib2->__dl_root_handle, handle); + error = DLClose(__clib4->__dl_root_handle, handle); if (error != ELF32_NO_ERROR) { - __clib2->__elf_error_code = error; + __clib4->__elf_error_code = error; goto out; } } else { diff --git a/library/stdlib/dlerror.c b/library/stdlib/dlerror.c index 40690116..de99bb5c 100644 --- a/library/stdlib/dlerror.c +++ b/library/stdlib/dlerror.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_dlerror.c,v 1.2 2010-08-21 11:37:03 clib2devs Exp $ + * $Id: stdlib_dlerror.c,v 1.2 2010-08-21 11:37:03 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H @@ -12,11 +12,11 @@ const char * dlerror(void) { const char *result; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); - switch(__clib2->__elf_error_code) { + switch(__clib4->__elf_error_code) { case ELF32_NO_ERROR: result = NULL; @@ -79,8 +79,8 @@ dlerror(void) { } /* Calling dlerror() will clear the error code. */ - if (__clib2 != NULL) - __clib2->__elf_error_code = ELF32_NO_ERROR; + if (__clib4 != NULL) + __clib4->__elf_error_code = ELF32_NO_ERROR; RETURN(result); return(result); diff --git a/library/stdlib/dlopen.c b/library/stdlib/dlopen.c index 4821594a..e01ec96f 100644 --- a/library/stdlib/dlopen.c +++ b/library/stdlib/dlopen.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_dlopen.c,v 1.2 2010-08-21 11:37:03 clib2devs Exp $ + * $Id: stdlib_dlopen.c,v 1.2 2010-08-21 11:37:03 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H @@ -13,7 +13,7 @@ void * dlopen(const char *path_name, int mode) { void *result = NULL; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); SHOWSTRING(path_name); @@ -25,7 +25,7 @@ dlopen(const char *path_name, int mode) { } struct name_translation_info path_name_nti; - if (__clib2->__unix_path_semantics) { + if (__clib4->__unix_path_semantics) { if (__translate_unix_to_amiga_path_name(&path_name, &path_name_nti) != 0) goto out; @@ -34,10 +34,10 @@ dlopen(const char *path_name, int mode) { goto out; } } - SHOWPOINTER(__clib2->__dl_root_handle); + SHOWPOINTER(__clib4->__dl_root_handle); - if (__clib2->__dl_root_handle != NULL) { - struct ElfIFace *IElf = __clib2->IElf; + if (__clib4->__dl_root_handle != NULL) { + struct ElfIFace *IElf = __clib4->IElf; SHOWPOINTER(IElf); uint32 flags = 0; @@ -47,7 +47,7 @@ dlopen(const char *path_name, int mode) { if (mode & RTLD_GLOBAL) flags = ELF32_RTLD_GLOBAL; - result = DLOpen(__clib2->__dl_root_handle, path_name, flags); + result = DLOpen(__clib4->__dl_root_handle, path_name, flags); } else { __set_errno(ENOSYS); } diff --git a/library/stdlib/dlsym.c b/library/stdlib/dlsym.c index e4750b6f..e0b77e59 100644 --- a/library/stdlib/dlsym.c +++ b/library/stdlib/dlsym.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_dlsym.c,v 1.2 2010-08-21 11:37:03 clib2devs Exp $ + * $Id: stdlib_dlsym.c,v 1.2 2010-08-21 11:37:03 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H @@ -13,20 +13,20 @@ void * dlsym(void *handle, const char *symbol_name) { void *result = NULL; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); SHOWPOINTER(handle); SHOWSTRING(symbol_name); - if (__clib2->__dl_root_handle != NULL) { - struct ElfIFace *IElf = __clib2->IElf; + if (__clib4->__dl_root_handle != NULL) { + struct ElfIFace *IElf = __clib4->IElf; APTR symbol_data = NULL; Elf32_Error error; - error = DLSym(__clib2->__dl_root_handle, handle, symbol_name, &symbol_data); + error = DLSym(__clib4->__dl_root_handle, handle, symbol_name, &symbol_data); if (error != ELF32_NO_ERROR) { - __clib2->__elf_error_code = error; + __clib4->__elf_error_code = error; goto out; } result = symbol_data; diff --git a/library/stdlib/ecvt.c b/library/stdlib/ecvt.c index 4428a95c..72036cbe 100644 --- a/library/stdlib/ecvt.c +++ b/library/stdlib/ecvt.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_ecvt.c,v 1.0 2022-08-22 12:04:25 clib2devs Exp $ + * $Id: stdlib_ecvt.c,v 1.0 2022-08-22 12:04:25 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H diff --git a/library/stdlib/exit.c b/library/stdlib/exit.c index 1807f7fb..37883b83 100644 --- a/library/stdlib/exit.c +++ b/library/stdlib/exit.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_exit.c,v 1.6 2006-01-08 12:04:25 clib2devs Exp $ + * $Id: stdlib_exit.c,v 1.6 2006-01-08 12:04:25 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H @@ -26,14 +26,14 @@ hook_function(struct Hook *hook, APTR userdata, struct Process *process) { void _exit(int return_code) { - struct _clib2 *__clib2 = __CLIB2; - __clib2->__exit_value = return_code; + struct _clib4 *__clib4 = __CLIB4; + __clib4->__exit_value = return_code; ENTER(); - SHOWVALUE(__clib2->__exit_value); + SHOWVALUE(__clib4->__exit_value); - D(("%d %d\n", __clib2->processId, GetPID(NULL, GPID_PROCESS))); - if (__clib2->processId != GetPID(NULL, GPID_PROCESS)) { + D(("%d %d\n", __clib4->processId, GetPID(NULL, GPID_PROCESS))); + if (__clib4->processId != GetPID(NULL, GPID_PROCESS)) { SHOWMSG("NOT IN MAIN TASK"); /* We are NOT in main task. Don't call exit here because * we'll have pending processes. Try to remove the Task @@ -45,27 +45,27 @@ _exit(int return_code) { else { SHOWMSG("IN MAIN TASK"); /* If we have a previous timer running task stop it before raise SIGINT */ - if (__clib2->tmr_real_task) { + if (__clib4->tmr_real_task) { struct Hook h = {{NULL, NULL}, (HOOKFUNC) hook_function, NULL, NULL}; int32 pid, process; /* Block SIGALRM signal from raise */ sigblock(SIGALRM); /* Get itimer process ID */ - pid = __clib2->tmr_real_task->pr_ProcessID; + pid = __clib4->tmr_real_task->pr_ProcessID; Forbid(); /* Scan for process */ process = ProcessScan(&h, (CONST_APTR) pid, 0); while (process > 0) { /* Send a SIGBREAKF_CTRL_F signal until the timer task return in Wait and can get the signal */ - Signal((struct Task *) __clib2->tmr_real_task, SIGBREAKF_CTRL_F); + Signal((struct Task *) __clib4->tmr_real_task, SIGBREAKF_CTRL_F); process = ProcessScan(&h, (CONST_APTR) pid, 0); usleep(100); } Permit(); WaitForChildExit(pid); - __clib2->tmr_real_task = NULL; + __clib4->tmr_real_task = NULL; } /* Dump all currently unwritten data, especially to the console. */ @@ -73,7 +73,7 @@ _exit(int return_code) { LEAVE(); - longjmp(__clib2->__exit_jmp_buf, 1); + longjmp(__clib4->__exit_jmp_buf, 1); __builtin_unreachable(); } } diff --git a/library/stdlib/fcvt.c b/library/stdlib/fcvt.c index 08a83640..54e3eede 100644 --- a/library/stdlib/fcvt.c +++ b/library/stdlib/fcvt.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_fcvt.c,v 1.0 2022-08-22 12:04:25 clib2devs Exp $ + * $Id: stdlib_fcvt.c,v 1.0 2022-08-22 12:04:25 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H diff --git a/library/stdlib/free.c b/library/stdlib/free.c index db1e5936..82bf9d54 100644 --- a/library/stdlib/free.c +++ b/library/stdlib/free.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_free.c,v 1.15 2022-04-03 12:04:25 clib2devs Exp $ + * $Id: stdlib_free.c,v 1.15 2022-04-03 12:04:25 clib4devs Exp $ */ /*#define DEBUG*/ @@ -18,31 +18,31 @@ void free(void *ptr) { - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; BOOL found = FALSE; struct MemalignEntry *e = NULL; /* Check if we have something created by memalign */ - if (__clib2 != NULL) { - e = (struct MemalignEntry *) AVL_FindNode(__clib2->__memalign_tree, ptr, MemalignAVLKeyComp); + if (__clib4 != NULL) { + e = (struct MemalignEntry *) AVL_FindNode(__clib4->__memalign_tree, ptr, MemalignAVLKeyComp); if (e) { found = TRUE; } } - __memory_lock(__clib2); + __memory_lock(__clib4); if (found) { /* Free memory */ FreeVec(e->me_Exact); e->me_Exact = NULL; /* Remove the node */ - AVL_RemNodeByAddress(&__clib2->__memalign_tree, &e->me_AvlNode); - ItemPoolFree(__clib2->__memalign_pool, e); + AVL_RemNodeByAddress(&__clib4->__memalign_tree, &e->me_AvlNode); + ItemPoolFree(__clib4->__memalign_pool, e); e = NULL; } else { - wof_free(__clib2->__wof_allocator, ptr); + wof_free(__clib4->__wof_allocator, ptr); } - __memory_unlock(__clib2); + __memory_unlock(__clib4); } diff --git a/library/stdlib/gcvt.c b/library/stdlib/gcvt.c index a8967919..bf553088 100644 --- a/library/stdlib/gcvt.c +++ b/library/stdlib/gcvt.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_gcvt.c,v 1.0 2022-08-22 12:04:25 clib2devs Exp $ + * $Id: stdlib_gcvt.c,v 1.0 2022-08-22 12:04:25 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H diff --git a/library/stdlib/gdtoa-gethex.c b/library/stdlib/gdtoa-gethex.c index d2609f3f..8d25d855 100644 --- a/library/stdlib/gdtoa-gethex.c +++ b/library/stdlib/gdtoa-gethex.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_gdtoa-gethex.c,v 1.0 2023-07-17 14:51:15 clib2devs Exp $ + * $Id: stdlib_gdtoa-gethex.c,v 1.0 2023-07-17 14:51:15 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H @@ -99,9 +99,9 @@ gethex(const char **sp, const FPI *fpi, int32_t *exp, _Bigint **bp, int sign, lo int esign, havedig, irv, k, n, nbits, up, zret; uint32_t L, lostbits, *x; int32_t e, e1; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; - const unsigned char *decimalpoint = (const unsigned char *) __clib2->__locale_table[LC_NUMERIC]->loc_DecimalPoint; + const unsigned char *decimalpoint = (const unsigned char *) __clib4->__locale_table[LC_NUMERIC]->loc_DecimalPoint; const size_t decp_len = strlen((const char *) decimalpoint); const unsigned char decp_end = decimalpoint[decp_len - 1]; diff --git a/library/stdlib/gdtoa-hexnan.c b/library/stdlib/gdtoa-hexnan.c index 592b8677..71f64a4a 100644 --- a/library/stdlib/gdtoa-hexnan.c +++ b/library/stdlib/gdtoa-hexnan.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_gdtoa-hexnan.c,v 1.0 2023-07-17 14:51:15 clib2devs Exp $ + * $Id: stdlib_gdtoa-hexnan.c,v 1.0 2023-07-17 14:51:15 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H diff --git a/library/stdlib/get_errno.c b/library/stdlib/get_errno.c index d8fb8be5..21a89fcd 100644 --- a/library/stdlib/get_errno.c +++ b/library/stdlib/get_errno.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_get_errno.c,v 1.2 2006-01-08 12:04:25 clib2devs Exp $ + * $Id: stdlib_get_errno.c,v 1.2 2006-01-08 12:04:25 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H diff --git a/library/stdlib/getenv.c b/library/stdlib/getenv.c index 95850514..ee48b5e6 100644 --- a/library/stdlib/getenv.c +++ b/library/stdlib/getenv.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_getenv.c,v 1.5 2006-01-08 12:04:25 clib2devs Exp $ + * $Id: stdlib_getenv.c,v 1.5 2006-01-08 12:04:25 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H diff --git a/library/stdlib/getexecname.c b/library/stdlib/getexecname.c index d6de9ba3..9d24bce1 100644 --- a/library/stdlib/getexecname.c +++ b/library/stdlib/getexecname.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_getexecname.c,v 1.0 2020-01-13 13:28:26 clib2devs Exp $ + * $Id: stdlib_getexecname.c,v 1.0 2020-01-13 13:28:26 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H diff --git a/library/stdlib/getsp.c b/library/stdlib/getsp.c index e4d8d133..b77f0475 100644 --- a/library/stdlib/getsp.c +++ b/library/stdlib/getsp.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_getsp.c,v 1.3 2006-01-08 12:04:25 clib2devs Exp $ + * $Id: stdlib_getsp.c,v 1.3 2006-01-08 12:04:25 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H diff --git a/library/stdlib/itoa.c b/library/stdlib/itoa.c index d1323ff4..57871174 100644 --- a/library/stdlib/itoa.c +++ b/library/stdlib/itoa.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_itoa.c,v 1.0 2022-02-11 12:04:25 clib2devs Exp $ + * $Id: stdlib_itoa.c,v 1.0 2022-02-11 12:04:25 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H diff --git a/library/stdlib/l64a.c b/library/stdlib/l64a.c index a6431978..e3acb927 100644 --- a/library/stdlib/l64a.c +++ b/library/stdlib/l64a.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_l64a.c,v 1.0 2022-08-06 12:04:25 clib2devs Exp $ + * $Id: stdlib_l64a.c,v 1.0 2022-08-06 12:04:25 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H #include "stdlib_headers.h" diff --git a/library/stdlib/labs.c b/library/stdlib/labs.c index 912df7e1..fb65ca93 100644 --- a/library/stdlib/labs.c +++ b/library/stdlib/labs.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_labs.c,v 1.3 2006-01-08 12:04:25 clib2devs Exp $ + * $Id: stdlib_labs.c,v 1.3 2006-01-08 12:04:25 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H diff --git a/library/stdlib/ldiv.c b/library/stdlib/ldiv.c index 225f1e03..3a0aaba4 100644 --- a/library/stdlib/ldiv.c +++ b/library/stdlib/ldiv.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_ldiv.c,v 1.3 2006-01-08 12:04:25 clib2devs Exp $ + * $Id: stdlib_ldiv.c,v 1.3 2006-01-08 12:04:25 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H diff --git a/library/stdlib/llabs.c b/library/stdlib/llabs.c index e9053b36..ef59a396 100644 --- a/library/stdlib/llabs.c +++ b/library/stdlib/llabs.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_llabs.c,v 1.2 2006-01-08 12:04:25 clib2devs Exp $ + * $Id: stdlib_llabs.c,v 1.2 2006-01-08 12:04:25 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H diff --git a/library/stdlib/lldiv.c b/library/stdlib/lldiv.c index a4d6f125..c76c47b9 100644 --- a/library/stdlib/lldiv.c +++ b/library/stdlib/lldiv.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_lldiv.c,v 1.2 2006-01-08 12:04:25 clib2devs Exp $ + * $Id: stdlib_lldiv.c,v 1.2 2006-01-08 12:04:25 clib4devs Exp $ */ #undef __STRICT_ANSI__ diff --git a/library/stdlib/lltoa.c b/library/stdlib/lltoa.c index 7b9e0f0a..6c40ba2d 100644 --- a/library/stdlib/lltoa.c +++ b/library/stdlib/lltoa.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_lltoa.c,v 1.0 2022-02-11 12:04:25 clib2devs Exp $ + * $Id: stdlib_lltoa.c,v 1.0 2022-02-11 12:04:25 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H diff --git a/library/stdlib/main.c b/library/stdlib/main.c index a04bb5a0..df26b362 100644 --- a/library/stdlib/main.c +++ b/library/stdlib/main.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_main.c,v 2.00 2023-05-17 14:09:00 clib2devs Exp $ + * $Id: stdlib_main.c,v 2.00 2023-05-17 14:09:00 clib4devs Exp $ */ #ifndef EXEC_EXECBASE_H @@ -36,21 +36,21 @@ #include -#include "../shared_library/clib2.h" +#include "../shared_library/clib4.h" #include "uuid.h" -/* These CTORS/DTORS are clib2's one and they are different than that one received - * from crtbegin. They are needed because we need to call clib2 constructors as well +/* These CTORS/DTORS are clib4's one and they are different than that one received + * from crtbegin. They are needed because we need to call clib4 constructors as well */ static void (*__CTOR_LIST__[1])(void) __attribute__((section(".ctors"))); static void (*__DTOR_LIST__[1])(void) __attribute__((section(".dtors"))); extern int main(int arg_c, char **arg_v); -static void shared_obj_init(struct _clib2 *__clib2, BOOL init); +static void shared_obj_init(struct _clib4 *__clib4, BOOL init); struct envHookData { uint32 env_size; uint32 allocated_size; - struct _clib2 *r; + struct _clib4 *r; }; static char *empty_env[1] = {NULL}; @@ -86,7 +86,7 @@ copyEnvironment(struct Hook *hook, struct envHookData *ehd, struct ScanVarsMsg * } static void -makeEnvironment(struct _clib2 *__clib2) { +makeEnvironment(struct _clib4 *__clib4) { char varbuf[8]; uint32 flags = 0; size_t environ_size = 1024 * sizeof(char *); @@ -95,24 +95,24 @@ makeEnvironment(struct _clib2 *__clib2) { flags = GVF_LOCAL_ONLY; } - __clib2->__environment = (char **) calloc(environ_size, 1); - if (!__clib2->__environment) + __clib4->__environment = (char **) calloc(environ_size, 1); + if (!__clib4->__environment) return; flags |= GVF_SCAN_TOPLEVEL; struct Hook hook; hook.h_Entry = (void *) copyEnvironment; - hook.h_Data = __clib2->__environment; - struct envHookData ehd = {1, environ_size, __clib2}; + hook.h_Data = __clib4->__environment; + struct envHookData ehd = {1, environ_size, __clib4}; ScanVars(&hook, flags, &ehd); } static void -shared_obj_init(struct _clib2 *__clib2, BOOL init) { +shared_obj_init(struct _clib4 *__clib4, BOOL init) { ENTER(); - struct ElfIFace *IElf = __clib2->IElf; + struct ElfIFace *IElf = __clib4->IElf; BPTR segment_list = GetProcSegList(NULL, GPSLF_RUN | GPSLF_SEG); Elf32_Handle hSelf = (Elf32_Handle) NULL; @@ -166,18 +166,18 @@ call_main( int (*start_main)(int, char **), void (*__EXT_CTOR_LIST__[])(void), void (*__EXT_DTOR_LIST__[])(void), - struct _clib2 *__clib2) { + struct _clib4 *__clib4) { volatile LONG saved_io_err; ENTER(); /* This plants the return buffer for _exit(). */ - if (setjmp(__clib2->__exit_jmp_buf) != 0) { + if (setjmp(__clib4->__exit_jmp_buf) != 0) { D(("Back from longjmp")); goto out; } SHOWMSG("Initialize shared objects"); - shared_obj_init(__clib2, TRUE); + shared_obj_init(__clib4, TRUE); SHOWMSG("Now invoking constructors"); /* Go through the constructor list */ @@ -191,9 +191,9 @@ call_main( __set_current_path((const char *) current_dir_name); } - D(("Call start_main with %ld parameters", __clib2->__argc)); + D(("Call start_main with %ld parameters", __clib4->__argc)); /* After all these preparations, get this show on the road... */ - exit(start_main(__clib2->__argc, __clib2->__argv)); + exit(start_main(__clib4->__argc, __clib4->__argv)); SHOWMSG("Done. Exit from start_main()"); out: @@ -201,7 +201,7 @@ call_main( saved_io_err = IoErr(); /* From this point on, don't worry about ^C checking any more. */ - __clib2->__check_abort_enabled = FALSE; + __clib4->__check_abort_enabled = FALSE; SHOWMSG("Flush all files"); /* Dump all currently unwritten data, especially to the console. */ @@ -210,23 +210,23 @@ call_main( /* If one of the destructors drops into exit(), either directly or through a failed assert() call, processing will resume with the next following destructor. */ - (void) setjmp(__clib2->__exit_jmp_buf); - SHOWMSG("Called setjmp(__clib2->__exit_jmp_buf)"); + (void) setjmp(__clib4->__exit_jmp_buf); + SHOWMSG("Called setjmp(__clib4->__exit_jmp_buf)"); /* Go through the destructor list */ SHOWMSG("invoking external destructors in reverse order"); _end_ctors(__EXT_DTOR_LIST__); SHOWMSG("Close shared objects"); - shared_obj_init(__clib2, FALSE); + shared_obj_init(__clib4, FALSE); SHOWMSG("done."); /* Restore the IoErr() value before we return. */ SetIoErr(saved_io_err); - RETURN(__clib2->__exit_value); - return __clib2->__exit_value; + RETURN(__clib4->__exit_value); + return __clib4->__exit_value; } int @@ -239,9 +239,9 @@ _main( struct WBStartup *sms = NULL; struct Process *me; int rc = RETURN_FAIL; - struct _clib2 *__clib2 = NULL; + struct _clib4 *__clib4 = NULL; uint32 pid = GetPID(0, GPID_PROCESS); - struct Clib2Resource *res = (APTR) OpenResource(RESOURCE_NAME); + struct Clib4Resource *res = (APTR) OpenResource(RESOURCE_NAME); DECLARE_UTILITYBASE(); @@ -253,62 +253,62 @@ _main( sms = (struct WBStartup *) GetMsg(mp); } - /* If all libraries are opened correctly we can initialize clib2 reent structure */ - D(("Initialize clib2 reent structure")); + /* If all libraries are opened correctly we can initialize clib4 reent structure */ + D(("Initialize clib4 reent structure")); /* Initialize global structure */ - __clib2 = (struct _clib2 *) AllocVecTags(sizeof(struct _clib2), + __clib4 = (struct _clib4 *) AllocVecTags(sizeof(struct _clib4), AVT_Type, MEMF_SHARED, AVT_ClearWithValue, 0, TAG_DONE); - if (__clib2 == NULL) { + if (__clib4 == NULL) { Forbid(); ReplyMsg(&sms->sm_Message); return -1; } /* Set the current task pointer */ - __clib2->self = me; + __clib4->self = me; - reent_init(__clib2); - __clib2->processId = pid; + reent_init(__clib4); + __clib4->processId = pid; if (res) { size_t iter = 0; void *item; while (hashmap_iter(res->children, &iter, &item)) { - const struct Clib2Node *node = item; + const struct Clib4Node *node = item; if (node->pid == pid) { - __clib2->uuid = node->uuid; - D(("__clib2->uuid ) %s\n", __clib2->uuid)); + __clib4->uuid = node->uuid; + D(("__clib4->uuid ) %s\n", __clib4->uuid)); break; } } } - /* Set _clib2 pointer into process pr_UID + /* Set _clib4 pointer into process pr_UID * This field is copied to any spawned process created by this exe and/or its children */ - me->pr_UID = (uint32) __clib2; - //SetOwnerInfoTags(OI_ProcessInput, 0, OI_OwnerUID, __clib2, TAG_END); + me->pr_UID = (uint32) __clib4; + //SetOwnerInfoTags(OI_ProcessInput, 0, OI_OwnerUID, __clib4, TAG_END); - __clib2->__WBenchMsg = sms; + __clib4->__WBenchMsg = sms; - /* After reent structure we can call clib2 constructors */ - SHOWMSG("Calling clib2 ctors"); + /* After reent structure we can call clib4 constructors */ + SHOWMSG("Calling clib4 ctors"); _start_ctors(__CTOR_LIST__); SHOWMSG("Done. All constructors called"); - /* Copy environment variables into clib2 reent structure */ - makeEnvironment(__clib2); - if (!__clib2->__environment) { - __clib2->__environment = empty_env; + /* Copy environment variables into clib4 reent structure */ + makeEnvironment(__clib4); + if (!__clib4->__environment) { + __clib4->__environment = empty_env; } - /* Set default terminal mode to "amiga-clib2" if not set */ + /* Set default terminal mode to "amiga-clib4" if not set */ char term_buffer[32] = {0}; LONG term_len = GetVar("TERM", (STRPTR) term_buffer, 32, 0); if (term_len <= 0) { - Strlcpy(term_buffer, "amiga-clib2", 11); + Strlcpy(term_buffer, "amiga-clib4", 11); SetVar("TERM", term_buffer, 11, 0); } @@ -317,25 +317,25 @@ _main( int oldPriority = me->pr_Task.tc_Node.ln_Pri; /* Change the task priority, if requested. */ - if (-128 <= __clib2->__priority && __clib2->__priority <= 127) - SetTaskPri((struct Task *) me, __clib2->__priority); + if (-128 <= __clib4->__priority && __clib4->__priority <= 127) + SetTaskPri((struct Task *) me, __clib4->__priority); /* We can enable check abort now */ - __clib2->__check_abort_enabled = TRUE; + __clib4->__check_abort_enabled = TRUE; SHOWMSG("Call Main"); /* We have enough room to make the call or just don't care. */ - rc = call_main(argstr, arglen, start_main, __EXT_CTOR_LIST__, __EXT_DTOR_LIST__, __clib2); + rc = call_main(argstr, arglen, start_main, __EXT_CTOR_LIST__, __EXT_DTOR_LIST__, __clib4); /* Restore the task priority. */ SetTaskPri((struct Task *) me, oldPriority); - SHOWMSG("Calling clib2 dtors"); + SHOWMSG("Calling clib4 dtors"); _end_ctors(__DTOR_LIST__); SHOWMSG("Done. All destructors called"); - SHOWMSG("Calling reent_exit on _clib2"); - reent_exit(__clib2, FALSE); + SHOWMSG("Calling reent_exit on _clib4"); + reent_exit(__clib4, FALSE); if (sms) { Forbid(); diff --git a/library/stdlib/malloc.c b/library/stdlib/malloc.c index 7d0a0ff3..00bb22c2 100644 --- a/library/stdlib/malloc.c +++ b/library/stdlib/malloc.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_malloc.c,v 1.22 2022-04-03 14:09:00 clib2devs Exp $ + * $Id: stdlib_malloc.c,v 1.22 2022-04-03 14:09:00 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H @@ -19,48 +19,48 @@ void * malloc(size_t size) { void *result = NULL; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; - __memory_lock(__clib2); + __memory_lock(__clib4); - result = wof_alloc(__clib2->__wof_allocator, size); + result = wof_alloc(__clib4->__wof_allocator, size); - __memory_unlock(__clib2); + __memory_unlock(__clib4); return (result); } -void __memory_lock(struct _clib2 *__clib2) { - if (__clib2->memory_semaphore != NULL) - ObtainSemaphore(__clib2->memory_semaphore); +void __memory_lock(struct _clib4 *__clib4) { + if (__clib4->memory_semaphore != NULL) + ObtainSemaphore(__clib4->memory_semaphore); } -void __memory_unlock(struct _clib2 *__clib2) { - if (__clib2->memory_semaphore != NULL) - ReleaseSemaphore(__clib2->memory_semaphore); +void __memory_unlock(struct _clib4 *__clib4) { + if (__clib4->memory_semaphore != NULL) + ReleaseSemaphore(__clib4->memory_semaphore); } STDLIB_DESTRUCTOR(stdlib_memory_exit) { ENTER(); - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; - __memory_lock(__clib2); + __memory_lock(__clib4); - if (__clib2->__wof_allocator != NULL) { - wof_allocator_destroy(__clib2->__wof_allocator); - __clib2->__wof_allocator = NULL; + if (__clib4->__wof_allocator != NULL) { + wof_allocator_destroy(__clib4->__wof_allocator); + __clib4->__wof_allocator = NULL; } - __memory_unlock(__clib2); + __memory_unlock(__clib4); - if (__clib2->__wof_allocator_semaphore != NULL) { - __delete_semaphore(__clib2->__wof_allocator_semaphore); - __clib2->__wof_allocator_semaphore = NULL; + if (__clib4->__wof_allocator_semaphore != NULL) { + __delete_semaphore(__clib4->__wof_allocator_semaphore); + __clib4->__wof_allocator_semaphore = NULL; } - if (__clib2->memory_semaphore != NULL) { - __delete_semaphore(__clib2->memory_semaphore); - __clib2->memory_semaphore = NULL; + if (__clib4->memory_semaphore != NULL) { + __delete_semaphore(__clib4->memory_semaphore); + __clib4->memory_semaphore = NULL; } LEAVE(); @@ -69,20 +69,20 @@ STDLIB_DESTRUCTOR(stdlib_memory_exit) { /* Second constructor called by _init */ STDLIB_CONSTRUCTOR(stdlib_memory_init) { BOOL success = FALSE; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); - __clib2->memory_semaphore = __create_semaphore(); - if (__clib2->memory_semaphore == NULL) + __clib4->memory_semaphore = __create_semaphore(); + if (__clib4->memory_semaphore == NULL) goto out; - __clib2->__wof_allocator_semaphore = __create_semaphore(); - if (__clib2->__wof_allocator_semaphore == NULL) + __clib4->__wof_allocator_semaphore = __create_semaphore(); + if (__clib4->__wof_allocator_semaphore == NULL) goto out; - __clib2->__wof_allocator = wof_allocator_new(); - if (__clib2->__wof_allocator == NULL) { + __clib4->__wof_allocator = wof_allocator_new(); + if (__clib4->__wof_allocator == NULL) { goto out; } diff --git a/library/stdlib/mblen.c b/library/stdlib/mblen.c index b2b0ed12..4db6c96c 100644 --- a/library/stdlib/mblen.c +++ b/library/stdlib/mblen.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_mblen.c,v 1.3 2006-01-08 12:04:25 clib2devs Exp $ + * $Id: stdlib_mblen.c,v 1.3 2006-01-08 12:04:25 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H diff --git a/library/stdlib/mbstowcs.c b/library/stdlib/mbstowcs.c index 359df166..7d8902c7 100644 --- a/library/stdlib/mbstowcs.c +++ b/library/stdlib/mbstowcs.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_mbstowcs.c,v 1.4 2022-05-01 12:04:26 clib2devs Exp $ + * $Id: stdlib_mbstowcs.c,v 1.4 2022-05-01 12:04:26 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H diff --git a/library/stdlib/mbtowc.c b/library/stdlib/mbtowc.c index 1a333c62..20bea35e 100644 --- a/library/stdlib/mbtowc.c +++ b/library/stdlib/mbtowc.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_mbtowc.c,v 1.3 2006-01-08 12:04:26 clib2devs Exp $ + * $Id: stdlib_mbtowc.c,v 1.3 2006-01-08 12:04:26 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H @@ -11,9 +11,9 @@ int mbtowc(wchar_t *wc, const char *src, size_t n) { int retval = 0; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; - mbstate_t *ps = &__clib2->wide_status->_mbtowc_state; + mbstate_t *ps = &__clib4->wide_status->_mbtowc_state; retval = _mbtowc_r(wc, src, n, ps); diff --git a/library/stdlib/mkdtemp.c b/library/stdlib/mkdtemp.c index 1714cccc..470262de 100644 --- a/library/stdlib/mkdtemp.c +++ b/library/stdlib/mkdtemp.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_mkdtemp.c,v 1.5 2006-01-08 12:04:26 clib2devs Exp $ + * $Id: stdlib_mkdtemp.c,v 1.5 2006-01-08 12:04:26 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H diff --git a/library/stdlib/mkostemp.c b/library/stdlib/mkostemp.c index 5b863a15..ea259aca 100644 --- a/library/stdlib/mkostemp.c +++ b/library/stdlib/mkostemp.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_mkostemp.c,v 1.0 2023-07-13 12:04:26 clib2devs Exp $ + * $Id: stdlib_mkostemp.c,v 1.0 2023-07-13 12:04:26 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H diff --git a/library/stdlib/mkostemps.c b/library/stdlib/mkostemps.c index 3eceec56..0548c6ce 100644 --- a/library/stdlib/mkostemps.c +++ b/library/stdlib/mkostemps.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_mkostemps.c,v 1.0 2023-07-13 12:04:26 clib2devs Exp $ + * $Id: stdlib_mkostemps.c,v 1.0 2023-07-13 12:04:26 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H @@ -16,7 +16,7 @@ int mkostemps(char *template, int len, int flags) { size_t l = strlen(template); struct name_translation_info name_template_nti; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; if (l < 6 || len > l - 6 || memcmp(template + l - len - 6, "XXXXXX", 6)) { __set_errno(EINVAL); @@ -27,7 +27,7 @@ mkostemps(char *template, int len, int flags) { int fd, retries = 100; do { __randname(template + l - len - 6); - if (__clib2->__unix_path_semantics) { + if (__clib4->__unix_path_semantics) { if (__translate_unix_to_amiga_path_name((char const **) &template, &name_template_nti) != 0) return -1; } diff --git a/library/stdlib/mkstemp.c b/library/stdlib/mkstemp.c index 30dfa9f5..fd123af1 100644 --- a/library/stdlib/mkstemp.c +++ b/library/stdlib/mkstemp.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_mkstemp.c,v 1.6 2006-01-08 12:04:26 clib2devs Exp $ + * $Id: stdlib_mkstemp.c,v 1.6 2006-01-08 12:04:26 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H diff --git a/library/stdlib/mktemp.c b/library/stdlib/mktemp.c index cb9cc23a..a5a105d0 100644 --- a/library/stdlib/mktemp.c +++ b/library/stdlib/mktemp.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_mktemp.c,v 1.8 2006-01-08 12:04:26 clib2devs Exp $ + * $Id: stdlib_mktemp.c,v 1.8 2006-01-08 12:04:26 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H @@ -24,7 +24,7 @@ mktemp(char *name_template) { ULONG pseudo_random_number; BPTR lock; size_t i; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); @@ -114,7 +114,7 @@ mktemp(char *name_template) { /* If necessary, quickly translate the semantics of the file name we cooked up above. */ - if (__clib2->__unix_path_semantics) { + if (__clib4->__unix_path_semantics) { if (__translate_unix_to_amiga_path_name((char const **) &test_name, &name_template_nti) != 0) goto out; diff --git a/library/stdlib/modsi3.c b/library/stdlib/modsi3.c index 986e8bea..741bd2be 100644 --- a/library/stdlib/modsi3.c +++ b/library/stdlib/modsi3.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_modsi3.c,v 1.3 2006-01-08 12:04:26 clib2devs Exp $ + * $Id: stdlib_modsi3.c,v 1.3 2006-01-08 12:04:26 clib4devs Exp $ */ __asm(" \n\ diff --git a/library/stdlib/mprec.c b/library/stdlib/mprec.c index 5baf54ce..d731fffc 100644 --- a/library/stdlib/mprec.c +++ b/library/stdlib/mprec.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_mprec.c,v 1.0 2023-07-17 14:51:15 clib2devs Exp $ + * $Id: stdlib_mprec.c,v 1.0 2023-07-17 14:51:15 clib4devs Exp $ */ #ifndef _MATH_HEADERS_H diff --git a/library/stdlib/mulsi3.c b/library/stdlib/mulsi3.c index 1267c7f1..7a693510 100644 --- a/library/stdlib/mulsi3.c +++ b/library/stdlib/mulsi3.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_mulsi3.c,v 1.3 2006-01-08 12:04:26 clib2devs Exp $ + * $Id: stdlib_mulsi3.c,v 1.3 2006-01-08 12:04:26 clib4devs Exp $ */ __asm(" \n\ diff --git a/library/stdlib/posix_memalign.c b/library/stdlib/posix_memalign.c index 8f355856..f4a244d0 100644 --- a/library/stdlib/posix_memalign.c +++ b/library/stdlib/posix_memalign.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_posix_memalign.c,v 1.0 2022-04-17 12:04:26 clib2devs Exp $ + * $Id: stdlib_posix_memalign.c,v 1.0 2022-04-17 12:04:26 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H diff --git a/library/stdlib/program_name.c b/library/stdlib/program_name.c index d186b4af..cbddcaf3 100644 --- a/library/stdlib/program_name.c +++ b/library/stdlib/program_name.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_program_name.c,v 1.3 2008-09-30 14:09:00 clib2devs Exp $ + * $Id: stdlib_program_name.c,v 1.3 2008-09-30 14:09:00 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H @@ -16,11 +16,11 @@ STDLIB_DESTRUCTOR(stdlib_program_name_exit) { ENTER(); - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; - if (__clib2->free_program_name && __clib2->__progname != NULL) { - FreeVec(__clib2->__progname); - __clib2->__progname = NULL; + if (__clib4->free_program_name && __clib4->__progname != NULL) { + FreeVec(__clib4->__progname); + __clib4->__progname = NULL; } LEAVE(); @@ -28,25 +28,25 @@ STDLIB_DESTRUCTOR(stdlib_program_name_exit) { /* First constructor called by _init */ STDLIB_CONSTRUCTOR(stdlib_program_name_init) { BOOL success = FALSE; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); - if (__clib2->__WBenchMsg == NULL) { + if (__clib4->__WBenchMsg == NULL) { const size_t program_name_size = 256; /* Make a copy of the current command name string. */ - __clib2->__progname = AllocVecTags((ULONG)program_name_size, AVT_Type, MEMF_SHARED, TAG_DONE); - if (__clib2->__progname == NULL) + __clib4->__progname = AllocVecTags((ULONG)program_name_size, AVT_Type, MEMF_SHARED, TAG_DONE); + if (__clib4->__progname == NULL) goto out; - __clib2->free_program_name = TRUE; + __clib4->free_program_name = TRUE; - if (CANNOT GetCliProgramName(__clib2->__progname, program_name_size)) + if (CANNOT GetCliProgramName(__clib4->__progname, program_name_size)) goto out; } else { - __clib2->__progname = (char *) __clib2->__WBenchMsg->sm_ArgList[0].wa_Name; + __clib4->__progname = (char *) __clib4->__WBenchMsg->sm_ArgList[0].wa_Name; } success = TRUE; @@ -64,5 +64,5 @@ STDLIB_CONSTRUCTOR(stdlib_program_name_init) { const char *__getprogname(void) { - return __CLIB2->__progname; + return __CLIB4->__progname; } \ No newline at end of file diff --git a/library/stdlib/putenv.c b/library/stdlib/putenv.c index 08aa46fb..4f58f63e 100644 --- a/library/stdlib/putenv.c +++ b/library/stdlib/putenv.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_putenv.c,v 1.7 2006-01-08 12:04:26 clib2devs Exp $ + * $Id: stdlib_putenv.c,v 1.7 2006-01-08 12:04:26 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H #include "stdlib_headers.h" diff --git a/library/stdlib/qsort.c b/library/stdlib/qsort.c index 7faa6104..4a79c1b1 100644 --- a/library/stdlib/qsort.c +++ b/library/stdlib/qsort.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_qsort.c,v 1.6 2006-01-08 12:04:26 clib2devs Exp $ + * $Id: stdlib_qsort.c,v 1.6 2006-01-08 12:04:26 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H diff --git a/library/stdlib/qsort_r.c b/library/stdlib/qsort_r.c index 5668cfec..a6c2122b 100644 --- a/library/stdlib/qsort_r.c +++ b/library/stdlib/qsort_r.c @@ -1,5 +1,5 @@ /* - * $Id: unistd_qsort_r.c,v 1.0 2022-08-22 23:09:27 clib2devs Exp $ + * $Id: unistd_qsort_r.c,v 1.0 2022-08-22 23:09:27 clib4devs Exp $ */ #define _DEFAULT_SOURCE diff --git a/library/stdlib/randname.c b/library/stdlib/randname.c index cbdea5c7..8970f928 100644 --- a/library/stdlib/randname.c +++ b/library/stdlib/randname.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_randname.c,v 1.0 2023-07-13 12:04:26 clib2devs Exp $ + * $Id: stdlib_randname.c,v 1.0 2023-07-13 12:04:26 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H @@ -11,10 +11,10 @@ char *__randname(char *template) { int i; struct timespec ts; unsigned long r; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; clock_gettime(CLOCK_REALTIME, &ts); - r = ts.tv_sec + ts.tv_nsec + __clib2->processId * 65537UL; + r = ts.tv_sec + ts.tv_nsec + __clib4->processId * 65537UL; for (i = 0; i < 6; i++, r >>= 5) template[i] = 'A' + (r & 15) + (r & 16) * 2; diff --git a/library/stdlib/realloc.c b/library/stdlib/realloc.c index 35b58d90..cd1c1c9f 100644 --- a/library/stdlib/realloc.c +++ b/library/stdlib/realloc.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_realloc.c,v 1.11 2022-04-03 10:55:03 clib2devs Exp $ + * $Id: stdlib_realloc.c,v 1.11 2022-04-03 10:55:03 clib4devs Exp $ */ /*#define DEBUG*/ @@ -16,7 +16,7 @@ void * realloc(void *ptr, size_t size) { void *result = NULL; BOOL locked = FALSE; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; assert((int) size >= 0); @@ -24,12 +24,12 @@ realloc(void *ptr, size_t size) { D(("calling malloc(%ld)", size)); result = malloc(size); - } else if (__clib2->__unix_path_semantics && size == 0) { + } else if (__clib4->__unix_path_semantics && size == 0) { D(("calling free(0x%08lx)", ptr)); free(ptr); } else { - result = wof_realloc(__clib2->__wof_allocator, ptr, size); + result = wof_realloc(__clib4->__wof_allocator, ptr, size); if (result == NULL) { SHOWMSG("could not reallocate memory"); goto out; @@ -39,7 +39,7 @@ realloc(void *ptr, size_t size) { out: if (locked) - __memory_unlock(__clib2); + __memory_unlock(__clib4); if (result == NULL) SHOWMSG("ouch! realloc failed"); diff --git a/library/stdlib/secure_getenv.c b/library/stdlib/secure_getenv.c index 9be9f48e..831b219e 100644 --- a/library/stdlib/secure_getenv.c +++ b/library/stdlib/secure_getenv.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_secure_getenv.c,v 1.0 2020-01-13 16:12:45 clib2devs Exp $ + * $Id: stdlib_secure_getenv.c,v 1.0 2020-01-13 16:12:45 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H diff --git a/library/stdlib/semaphore.c b/library/stdlib/semaphore.c index 10edcc44..20fa0dae 100644 --- a/library/stdlib/semaphore.c +++ b/library/stdlib/semaphore.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_semaphore.c,v 1.3 2021-01-31 12:04:26 clib2devs Exp $ + * $Id: stdlib_semaphore.c,v 1.3 2021-01-31 12:04:26 clib4devs Exp $ */ #include "stdlib_headers.h" diff --git a/library/stdlib/set_errno.c b/library/stdlib/set_errno.c index 0fe26338..ee8885b9 100644 --- a/library/stdlib/set_errno.c +++ b/library/stdlib/set_errno.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_set_errno.c,v 1.3 2022-08-20 12:04:26 clib2devs Exp $ + * $Id: stdlib_set_errno.c,v 1.3 2022-08-20 12:04:26 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H diff --git a/library/stdlib/set_process_window.c b/library/stdlib/set_process_window.c index 8fd5b9c0..2763d71e 100644 --- a/library/stdlib/set_process_window.c +++ b/library/stdlib/set_process_window.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_set_process_window.c,v 1.3 2006-01-08 12:04:26 clib2devs Exp $ + * $Id: stdlib_set_process_window.c,v 1.3 2006-01-08 12:04:26 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H diff --git a/library/stdlib/setenv.c b/library/stdlib/setenv.c index 7d92d202..7fced691 100644 --- a/library/stdlib/setenv.c +++ b/library/stdlib/setenv.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_setenv.c,v 1.12 2006-09-25 14:12:15 clib2devs Exp $ + * $Id: stdlib_setenv.c,v 1.12 2006-09-25 14:12:15 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H @@ -21,14 +21,14 @@ struct LocalVariable { CLIB_DESTRUCTOR(__setenv_exit) { ENTER(); - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; /* Now for the local variables that may still be set. */ - if (__clib2->__lv_root != NULL) { + if (__clib4->__lv_root != NULL) { do { - D(("deleting variable '%s'", __clib2->__lv_root->lv_Name)); - DeleteVar(__clib2->__lv_root->lv_Name, 0); - } while ((__clib2->__lv_root = __clib2->__lv_root->lv_Next) != NULL); + D(("deleting variable '%s'", __clib4->__lv_root->lv_Name)); + DeleteVar(__clib4->__lv_root->lv_Name, 0); + } while ((__clib4->__lv_root = __clib4->__lv_root->lv_Next) != NULL); } LEAVE(); @@ -44,7 +44,7 @@ setenv(const char *original_name, const char *original_value, int overwrite) { int status; int result = ERROR; size_t i; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); @@ -129,8 +129,8 @@ setenv(const char *original_name, const char *original_value, int overwrite) { goto out; } - lv->lv_Next = __clib2->__lv_root; - __clib2->__lv_root = lv; + lv->lv_Next = __clib4->__lv_root; + __clib4->__lv_root = lv; lv->lv_Name = (char *) (lv + 1); strcpy(lv->lv_Name, name); @@ -147,7 +147,7 @@ setenv(const char *original_name, const char *original_value, int overwrite) { SHOWMSG("could not set variable"); if (lv != NULL) { - __clib2->__lv_root = lv->lv_Next; + __clib4->__lv_root = lv->lv_Next; free(lv); } diff --git a/library/stdlib/shared_objs.c b/library/stdlib/shared_objs.c index 463a3834..af0d792b 100644 --- a/library/stdlib/shared_objs.c +++ b/library/stdlib/shared_objs.c @@ -1,3 +1,3 @@ /* - * $Id: stdlib_shared_objs.c,v 1.1 2010-08-21 11:37:03 clib2devs Exp $ + * $Id: stdlib_shared_objs.c,v 1.1 2010-08-21 11:37:03 clib4devs Exp $ */ diff --git a/library/stdlib/showerror.c b/library/stdlib/showerror.c index 4259bf5d..d6076d34 100644 --- a/library/stdlib/showerror.c +++ b/library/stdlib/showerror.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_showerror.c,v 1.14 2006-09-25 15:12:47 clib2devs Exp $ + * $Id: stdlib_showerror.c,v 1.14 2006-09-25 15:12:47 clib4devs Exp $ */ #ifndef EXEC_LIBRARIES_H @@ -49,7 +49,7 @@ void __show_error(const char *message) { struct Library *IntuitionBase = NULL; struct Library *DOSBase = NULL; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; DOSBase = OpenLibrary("dos.library", 0); IntuitionBase = OpenLibrary("intuition.library", 0); @@ -66,13 +66,13 @@ void __show_error(const char *message) { goto out; /* If we can't hope to print the error message, show a requester instead. */ - if (__clib2->__no_standard_io || __clib2->__WBenchMsg != NULL) { + if (__clib4->__no_standard_io || __clib4->__WBenchMsg != NULL) { UBYTE program_name[256] = {0}; struct EasyStruct es; STRPTR title_string; - if (__clib2->__WBenchMsg != NULL) { - title_string = (STRPTR) FilePart(__clib2->__WBenchMsg->sm_ArgList[0].wa_Name); + if (__clib4->__WBenchMsg != NULL) { + title_string = (STRPTR) FilePart(__clib4->__WBenchMsg->sm_ArgList[0].wa_Name); } else { if (GetCliProgramName((STRPTR) program_name, sizeof(program_name))) title_string = (STRPTR) FilePart((STRPTR) program_name); diff --git a/library/stdlib/stdlib_constructor.h b/library/stdlib/stdlib_constructor.h index 4d170090..a342d384 100755 --- a/library/stdlib/stdlib_constructor.h +++ b/library/stdlib/stdlib_constructor.h @@ -1,5 +1,5 @@ /* - * $Id: stdlib_constructor.h,v 1.4 2023-02-11 12:04:25 clib2devs Exp $ + * $Id: stdlib_constructor.h,v 1.4 2023-02-11 12:04:25 clib4devs Exp $ */ #ifndef _STDLIB_CONSTRUCTOR_H diff --git a/library/stdlib/stdlib_headers.h b/library/stdlib/stdlib_headers.h index 93ff0ccf..e2005ed1 100755 --- a/library/stdlib/stdlib_headers.h +++ b/library/stdlib/stdlib_headers.h @@ -1,5 +1,5 @@ /* - * $Id: stdlib_headers.h,v 1.22 2010-10-20 13:50:17 clib2devs Exp $ + * $Id: stdlib_headers.h,v 1.22 2010-10-20 13:50:17 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H diff --git a/library/stdlib/stdlib_localebase.h b/library/stdlib/stdlib_localebase.h index 5339a31a..b24b538a 100755 --- a/library/stdlib/stdlib_localebase.h +++ b/library/stdlib/stdlib_localebase.h @@ -1,5 +1,5 @@ /* - * $Id: stdlib_localebase.h,v 1.2 2006-01-08 12:04:25 clib2devs Exp $ + * $Id: stdlib_localebase.h,v 1.2 2006-01-08 12:04:25 clib4devs Exp $ */ #ifndef _STDLIB_LOCALEBASE_H @@ -25,12 +25,12 @@ #define DECLARE_LOCALEBASE() \ - struct Library * UNUSED LocaleBase = __CLIB2->__LocaleBase; \ - struct LocaleIFace * ILocale = __CLIB2->__ILocale + struct Library * UNUSED LocaleBase = __CLIB4->__LocaleBase; \ + struct LocaleIFace * ILocale = __CLIB4->__ILocale #define DECLARE_FONTBASE() \ - struct Library * UNUSED DiskfontBase = __CLIB2->__DiskfontBase; \ - struct DiskfontIFace * IDiskfont = __CLIB2->__IDiskfont + struct Library * UNUSED DiskfontBase = __CLIB4->__DiskfontBase; \ + struct DiskfontIFace * IDiskfont = __CLIB4->__IDiskfont #endif /* _STDLIB_LOCALEBASE_H */ diff --git a/library/stdlib/stdlib_memory.h b/library/stdlib/stdlib_memory.h index f211a334..63472d3a 100755 --- a/library/stdlib/stdlib_memory.h +++ b/library/stdlib/stdlib_memory.h @@ -1,5 +1,5 @@ /* - * $Id: stdlib_memory.h,v 1.4 2006-01-08 12:04:26 clib2devs Exp $ + * $Id: stdlib_memory.h,v 1.4 2006-01-08 12:04:26 clib4devs Exp $ */ #ifndef _STDLIB_MEMORY_H @@ -46,8 +46,8 @@ struct MemalignEntry { void *me_Exact; /* The address returned by AllocVecTags */ }; -extern void __memory_lock(struct _clib2 *__clib2); -extern void __memory_unlock(struct _clib2 *__clib2); +extern void __memory_lock(struct _clib4 *__clib4); +extern void __memory_unlock(struct _clib4 *__clib4); extern int32 MemalignAVLNodeComp(struct AVLNode *avlnode1, struct AVLNode *avlnode2); extern int32 MemalignAVLKeyComp(struct AVLNode *avlnode1, AVLKey key2); diff --git a/library/stdlib/stdlib_protos.h b/library/stdlib/stdlib_protos.h index 675c9539..31467de1 100644 --- a/library/stdlib/stdlib_protos.h +++ b/library/stdlib/stdlib_protos.h @@ -1,5 +1,5 @@ /* - * $Id: stdlib_protos.h,v 1.18 2010-10-20 13:50:17 clib2devs Exp $ + * $Id: stdlib_protos.h,v 1.18 2010-10-20 13:50:17 clib4devs Exp $ */ #ifndef _STDLIB_PROTOS_H @@ -40,8 +40,8 @@ extern int __wildcard_expand_init(void); /* stdlib_exit.c */ extern void _exit(int return_code); -extern void reent_init(struct _clib2 *__clib2); -extern void reent_exit(struct _clib2 *__clib2, BOOL fallback); +extern void reent_init(struct _clib4 *__clib4); +extern void reent_exit(struct _clib4 *__clib4, BOOL fallback); /* signal_checkabort.c */ extern void __check_abort(void); diff --git a/library/stdlib/stdlib_sysvbase.h b/library/stdlib/stdlib_sysvbase.h index e260acff..dbe734e4 100755 --- a/library/stdlib/stdlib_sysvbase.h +++ b/library/stdlib/stdlib_sysvbase.h @@ -1,5 +1,5 @@ /* - * $Id: stdlib_sysvbase.h,v 1.0 2021-01-27 23:35:26 clib2devs Exp $ + * $Id: stdlib_sysvbase.h,v 1.0 2021-01-27 23:35:26 clib4devs Exp $ */ #ifndef _STDLIB_SYSVBASE_H @@ -17,7 +17,7 @@ #include "macros.h" #endif /* _MACROS_H */ -#include "shared_library/clib2.h" +#include "shared_library/clib4.h" #define DECLARE_SYSVYBASE() \ struct Library UNUSED *SysSV_EIDRMVBase = res->SysVBase; \ diff --git a/library/stdlib/stdlib_timerbase.h b/library/stdlib/stdlib_timerbase.h index b42048bb..bf2dfa15 100644 --- a/library/stdlib/stdlib_timerbase.h +++ b/library/stdlib/stdlib_timerbase.h @@ -1,5 +1,5 @@ /* - * $Id: stdlib_timerbase.h,v 1.0 2023-05-17 10:06:25 clib2devs Exp $ + * $Id: stdlib_timerbase.h,v 1.0 2023-05-17 10:06:25 clib4devs Exp $ */ #ifndef _STDLIB_TIMERBASE_H @@ -24,7 +24,7 @@ #endif /* _MACROS_H */ #define DECLARE_TIMERBASE() \ - struct Library * UNUSED TimerBase = __CLIB2->__TimerBase; \ - struct TimerIFace * ITimer = __CLIB2->__ITimer + struct Library * UNUSED TimerBase = __CLIB4->__TimerBase; \ + struct TimerIFace * ITimer = __CLIB4->__ITimer #endif /* _STDLIB_TIMERBASE_H */ diff --git a/library/stdlib/stdlib_timezonebase.h b/library/stdlib/stdlib_timezonebase.h index 4bbdf6d1..9f395da9 100755 --- a/library/stdlib/stdlib_timezonebase.h +++ b/library/stdlib/stdlib_timezonebase.h @@ -1,5 +1,5 @@ /* - * $Id: stdlib_timezonebase.h,v 1.0 2021-01-15 10:06:25 clib2devs Exp $ + * $Id: stdlib_timezonebase.h,v 1.0 2021-01-15 10:06:25 clib4devs Exp $ */ #ifndef _STDLIB_TIMEZONEBASE_H @@ -24,7 +24,7 @@ #endif /* _MACROS_H */ #define DECLARE_TIMEZONEBASE() \ - struct Library * UNUSED TimezoneBase = __CLIB2->__TimezoneBase; \ - struct TimezoneIFace * ITimezone = __CLIB2->__ITimezone + struct Library * UNUSED TimezoneBase = __CLIB4->__TimezoneBase; \ + struct TimezoneIFace * ITimezone = __CLIB4->__ITimezone #endif /* _STDLIB_TIMEZONEBASE_H */ diff --git a/library/stdlib/stdlib_utilitybase.h b/library/stdlib/stdlib_utilitybase.h index d0582141..9cca7049 100755 --- a/library/stdlib/stdlib_utilitybase.h +++ b/library/stdlib/stdlib_utilitybase.h @@ -1,5 +1,5 @@ /* - * $Id: stdlib_utilitybase.h,v 1.2 2006-01-08 12:04:26 clib2devs Exp $ + * $Id: stdlib_utilitybase.h,v 1.2 2006-01-08 12:04:26 clib4devs Exp $ */ #ifndef _STDLIB_UTILITYBASE_H diff --git a/library/stdlib/strtod.c b/library/stdlib/strtod.c index 5f3866ab..f97a1fbc 100644 --- a/library/stdlib/strtod.c +++ b/library/stdlib/strtod.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_strtod.c,v 1.12 2006-09-25 14:51:15 clib2devs Exp $ + * $Id: stdlib_strtod.c,v 1.12 2006-09-25 14:51:15 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H #include "stdlib_headers.h" @@ -114,11 +114,11 @@ strtod_l(const char *__restrict s00, char **__restrict se, locale_t loc) { #ifdef Honor_FLT_ROUNDS int rounding; #endif - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; char *decimal_point = "."; int dec_len = 1; - if (__clib2->__locale_table[LC_NUMERIC] != NULL) { - decimal_point = __clib2->__locale_table[LC_NUMERIC]->loc_DecimalPoint; + if (__clib4->__locale_table[LC_NUMERIC] != NULL) { + decimal_point = __clib4->__locale_table[LC_NUMERIC]->loc_DecimalPoint; dec_len = strlen(decimal_point); } @@ -989,8 +989,8 @@ strtod_l(const char *__restrict s00, char **__restrict se, locale_t loc) { double strtod(const char *__restrict s00, char **__restrict se) { - struct _clib2 *__clib2 = __CLIB2; - return strtod_l(s00, se, __clib2->_current_locale); + struct _clib4 *__clib4 = __CLIB4; + return strtod_l(s00, se, __clib4->_current_locale); } #if defined(_HAVE_LONG_DOUBLE) && defined(_LDBL_EQ_DBL) @@ -1045,8 +1045,8 @@ strtof_l(const char *__restrict s00, char **__restrict se, locale_t loc) { float strtof(const char *__restrict s00, char **__restrict se) { - struct _clib2 *__clib2 = __CLIB2; - double val = strtod_l(s00, se, __clib2->_current_locale); + struct _clib4 *__clib4 = __CLIB4; + double val = strtod_l(s00, se, __clib4->_current_locale); if (isnan(val)) return signbit(val) ? -nanf("") : nanf(""); float retval = (float) val; diff --git a/library/stdlib/strtol.c b/library/stdlib/strtol.c index 718f67ef..83df82aa 100644 --- a/library/stdlib/strtol.c +++ b/library/stdlib/strtol.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_strtol.c,v 1.6 2006-01-08 12:04:26 clib2devs Exp $ + * $Id: stdlib_strtol.c,v 1.6 2006-01-08 12:04:26 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H diff --git a/library/stdlib/strtold.c b/library/stdlib/strtold.c index 490ec368..2e2f1426 100644 --- a/library/stdlib/strtold.c +++ b/library/stdlib/strtold.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_strtold.c,v 1.0 2021-01-18 12:04:26 clib2devs Exp $ + * $Id: stdlib_strtold.c,v 1.0 2021-01-18 12:04:26 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H diff --git a/library/stdlib/strtoll.c b/library/stdlib/strtoll.c index dae7bc60..7500af8d 100644 --- a/library/stdlib/strtoll.c +++ b/library/stdlib/strtoll.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_strtoll.c,v 1.6 2006-01-08 12:04:26 clib2devs Exp $ + * $Id: stdlib_strtoll.c,v 1.6 2006-01-08 12:04:26 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H diff --git a/library/stdlib/strtoq.c b/library/stdlib/strtoq.c index 77c6898c..c4decbf3 100644 --- a/library/stdlib/strtoq.c +++ b/library/stdlib/strtoq.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_strtoq.c,v 1.0 2022-01-28 12:04:26 clib2devs Exp $ + * $Id: stdlib_strtoq.c,v 1.0 2022-01-28 12:04:26 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H diff --git a/library/stdlib/strtoul.c b/library/stdlib/strtoul.c index 53bf8ffd..9b2ca447 100644 --- a/library/stdlib/strtoul.c +++ b/library/stdlib/strtoul.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_strtoul.c,v 1.6 2006-01-08 12:04:26 clib2devs Exp $ + * $Id: stdlib_strtoul.c,v 1.6 2006-01-08 12:04:26 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H diff --git a/library/stdlib/strtoull.c b/library/stdlib/strtoull.c index 9f4c2ae9..bbd04818 100644 --- a/library/stdlib/strtoull.c +++ b/library/stdlib/strtoull.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_strtoull.c,v 1.6 2006-01-08 12:04:26 clib2devs Exp $ + * $Id: stdlib_strtoull.c,v 1.6 2006-01-08 12:04:26 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H diff --git a/library/stdlib/strtouq.c b/library/stdlib/strtouq.c index f967d7ce..bd411e8d 100644 --- a/library/stdlib/strtouq.c +++ b/library/stdlib/strtouq.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_strtouq.c,v 1.0 2023-06-03 12:04:26 clib2devs Exp $ + * $Id: stdlib_strtouq.c,v 1.0 2023-06-03 12:04:26 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H diff --git a/library/stdlib/system.c b/library/stdlib/system.c index dd945fdd..3c63692a 100644 --- a/library/stdlib/system.c +++ b/library/stdlib/system.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_system.c,v 1.10 2006-01-08 12:04:26 clib2devs Exp $ + * $Id: stdlib_system.c,v 1.10 2006-01-08 12:04:26 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H @@ -18,7 +18,7 @@ int system(const char *command) { char *command_copy = NULL; int result; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); @@ -44,7 +44,7 @@ system(const char *command) { struct name_translation_info command_nti; - if (__clib2->__unix_path_semantics) { + if (__clib4->__unix_path_semantics) { char just_the_command_name[MAXPATHLEN + 1]; BOOL need_quotes = FALSE; char *command_name; diff --git a/library/stdlib/termination_message.c b/library/stdlib/termination_message.c index 0f058e01..2fa728b6 100644 --- a/library/stdlib/termination_message.c +++ b/library/stdlib/termination_message.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_termination_message.c,v 1.6 2006-01-08 12:04:26 clib2devs Exp $ + * $Id: stdlib_termination_message.c,v 1.6 2006-01-08 12:04:26 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H @@ -17,12 +17,12 @@ void __print_termination_message(const char *termination_message) { static BOOL termination_message_printed = FALSE; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; if (NOT termination_message_printed) { termination_message_printed = TRUE; - if (NOT __clib2->__no_standard_io && __clib2->__num_iob > STDERR_FILENO) { + if (NOT __clib4->__no_standard_io && __clib4->__num_iob > STDERR_FILENO) { fputs((termination_message != NULL) ? termination_message : "Abnormal program termination", stderr); fputc('\n', stderr); } diff --git a/library/stdlib/udivsi3.c b/library/stdlib/udivsi3.c index 18714636..cf9f6027 100644 --- a/library/stdlib/udivsi3.c +++ b/library/stdlib/udivsi3.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_udivsi3.c,v 1.3 2006-01-08 12:04:26 clib2devs Exp $ + * $Id: stdlib_udivsi3.c,v 1.3 2006-01-08 12:04:26 clib4devs Exp $ */ __asm(" \n\ diff --git a/library/stdlib/udivsi4.c b/library/stdlib/udivsi4.c index 0f4c57af..f1409f66 100644 --- a/library/stdlib/udivsi4.c +++ b/library/stdlib/udivsi4.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_udivsi4.c,v 1.3 2006-01-08 12:04:26 clib2devs Exp $ + * $Id: stdlib_udivsi4.c,v 1.3 2006-01-08 12:04:26 clib4devs Exp $ */ __asm(" \n\ diff --git a/library/stdlib/umodsi3.c b/library/stdlib/umodsi3.c index 0ed19ea6..a454b2c1 100644 --- a/library/stdlib/umodsi3.c +++ b/library/stdlib/umodsi3.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_umodsi3.c,v 1.3 2006-01-08 12:04:26 clib2devs Exp $ + * $Id: stdlib_umodsi3.c,v 1.3 2006-01-08 12:04:26 clib4devs Exp $ */ __asm(" \n\ diff --git a/library/stdlib/unsetenv.c b/library/stdlib/unsetenv.c index f3f92b7c..01723c74 100644 --- a/library/stdlib/unsetenv.c +++ b/library/stdlib/unsetenv.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_unsetenv.c,v 1.10 2008-04-30 16:32:49 clib2devs Exp $ + * $Id: stdlib_unsetenv.c,v 1.10 2008-04-30 16:32:49 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H diff --git a/library/stdlib/valloc.c b/library/stdlib/valloc.c index e528b592..0d9897fc 100644 --- a/library/stdlib/valloc.c +++ b/library/stdlib/valloc.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_valloc.c,v 1.0 2021-01-19 10:03:00 clib2devs Exp $ + * $Id: stdlib_valloc.c,v 1.0 2021-01-19 10:03:00 clib4devs Exp $ */ /*#define DEBUG*/ diff --git a/library/stdlib/wof_allocator.c b/library/stdlib/wof_allocator.c index 296ac6ab..3ad8363b 100755 --- a/library/stdlib/wof_allocator.c +++ b/library/stdlib/wof_allocator.c @@ -108,14 +108,14 @@ static void wof_cycle_recycler(wof_allocator_t *allocator) { wof_chunk_hdr_t *chunk; wof_free_hdr_t *free_chunk; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; - ObtainSemaphore(__clib2->__wof_allocator_semaphore); + ObtainSemaphore(__clib4->__wof_allocator_semaphore); chunk = allocator->recycler_head; if (chunk == NULL) { - ReleaseSemaphore(__clib2->__wof_allocator_semaphore); + ReleaseSemaphore(__clib4->__wof_allocator_semaphore); return; } @@ -135,7 +135,7 @@ wof_cycle_recycler(wof_allocator_t *allocator) { /* Just rotate everything. */ allocator->recycler_head = free_chunk->next; } - ReleaseSemaphore(__clib2->__wof_allocator_semaphore); + ReleaseSemaphore(__clib4->__wof_allocator_semaphore); } /* Adds a chunk from the recycler. */ diff --git a/library/string/bcmp.c b/library/string/bcmp.c index d79e2577..8824dfe3 100644 --- a/library/string/bcmp.c +++ b/library/string/bcmp.c @@ -1,5 +1,5 @@ /* - * $Id: string_bcmp.c,v 1.4 2006-01-08 12:04:26 clib2devs Exp $ + * $Id: string_bcmp.c,v 1.4 2006-01-08 12:04:26 clib4devs Exp $ */ #ifndef _STRING_HEADERS_H diff --git a/library/string/bcopy.c b/library/string/bcopy.c index 75428d11..a202fe3a 100644 --- a/library/string/bcopy.c +++ b/library/string/bcopy.c @@ -1,5 +1,5 @@ /* - * $Id: string_bcopy.c,v 1.5 2022-03-29 12:04:26 clib2devs Exp $ + * $Id: string_bcopy.c,v 1.5 2022-03-29 12:04:26 clib4devs Exp $ */ #ifndef _STRING_HEADERS_H @@ -12,17 +12,17 @@ bcopy(const void *src, void *dest, size_t len) { SHOWPOINTER(src); SHOWPOINTER(dest); SHOWVALUE(len); - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; assert((len == 0) || (src != NULL && dest != NULL && (int) len > 0)); - if (__clib2->__optimizedCPUFunctions) { + if (__clib4->__optimizedCPUFunctions) { /* Check if we have altivec enabled */ - if (__clib2->hasAltivec) { + if (__clib4->hasAltivec) { vec_bcopy(src, dest, len); } else { - switch (__clib2->cpufamily) { + switch (__clib4->cpufamily) { default: /* Fallback to standard function */ memmove(dest, src, len); diff --git a/library/string/bzero.c b/library/string/bzero.c index 747173b3..36dc24e8 100644 --- a/library/string/bzero.c +++ b/library/string/bzero.c @@ -1,5 +1,5 @@ /* - * $Id: string_bzero.c,v 1.5 2022-03-29 12:04:26 clib2devs Exp $ + * $Id: string_bzero.c,v 1.5 2022-03-29 12:04:26 clib4devs Exp $ */ #ifndef _STRING_HEADERS_H @@ -20,13 +20,13 @@ bzero(void *m, size_t len) { ENTER(); SHOWPOINTER(m); SHOWVALUE(len); - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; DECLARE_UTILITYBASE(); - if (__clib2->__optimizedCPUFunctions) { + if (__clib4->__optimizedCPUFunctions) { /* Check if we have altivec enabled */ - if (__clib2->hasAltivec) { + if (__clib4->hasAltivec) { vec_bzero(m, len); } else { diff --git a/library/string/index.c b/library/string/index.c index e3c65272..53e28c4b 100644 --- a/library/string/index.c +++ b/library/string/index.c @@ -1,5 +1,5 @@ /* - * $Id: string_index.c,v 1.4 2006-01-08 12:04:26 clib2devs Exp $ + * $Id: string_index.c,v 1.4 2006-01-08 12:04:26 clib4devs Exp $ */ #ifndef _STRING_HEADERS_H diff --git a/library/string/memccpy.c b/library/string/memccpy.c index a66dc04a..9ef576a4 100644 --- a/library/string/memccpy.c +++ b/library/string/memccpy.c @@ -1,5 +1,5 @@ /* - * $Id: string_memccpy.c,v 1.0 2021-03-29 16:54:36 clib2devs Exp $ + * $Id: string_memccpy.c,v 1.0 2021-03-29 16:54:36 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H diff --git a/library/string/memchr.c b/library/string/memchr.c index 12c0c248..043f4c03 100644 --- a/library/string/memchr.c +++ b/library/string/memchr.c @@ -1,5 +1,5 @@ /* - * $Id: string_memchr.c,v 1.8 2023-02-22 12:04:26 clib2devs Exp $ + * $Id: string_memchr.c,v 1.8 2023-02-22 12:04:26 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H @@ -121,7 +121,7 @@ void * memchr(const void *ptr, int val, size_t len) { const unsigned char *m = ptr; void *result = NULL; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; assert(ptr != NULL); assert((int) len >= 0); @@ -132,8 +132,8 @@ memchr(const void *ptr, int val, size_t len) { } if (len > 0) { - if (__clib2->__optimizedCPUFunctions) { - switch (__clib2->cpufamily) { + if (__clib4->__optimizedCPUFunctions) { + switch (__clib4->cpufamily) { case CPUFAMILY_4XX: result = __memchr440(m, (unsigned char) (val & 255), len); break; diff --git a/library/string/memcmp.c b/library/string/memcmp.c index 645b65ed..1b82de37 100644 --- a/library/string/memcmp.c +++ b/library/string/memcmp.c @@ -1,5 +1,5 @@ /* - * $Id: string_memcmp.c,v 1.9 2023-04-04 15:33:36 clib2devs Exp $ + * $Id: string_memcmp.c,v 1.9 2023-04-04 15:33:36 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H @@ -113,7 +113,7 @@ __memcmp(const char *m1, const char *m2, size_t len) { int memcmp(const void *ptr1, const void *ptr2, size_t len) { int result = 0; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; assert(ptr1 != NULL && ptr2 != NULL); assert((int) len >= 0); @@ -127,8 +127,8 @@ memcmp(const void *ptr1, const void *ptr2, size_t len) { const char *m1 = ptr1; const char *m2 = ptr2; - if (__clib2->__optimizedCPUFunctions) { - switch (__clib2->cpufamily) { + if (__clib4->__optimizedCPUFunctions) { + switch (__clib4->cpufamily) { /* If we have a SAM4xx use specific version of function */ case CPUFAMILY_4XX: result = __memcmp440(m1, m2, len); @@ -140,7 +140,7 @@ memcmp(const void *ptr1, const void *ptr2, size_t len) { #endif default: /* Check if we have altivec enabled */ - if (__clib2->hasAltivec) { + if (__clib4->hasAltivec) { result = vec_memcmp(m1, m2, len); } else { /* Fallback to standard function */ diff --git a/library/string/memcpy.c b/library/string/memcpy.c index 5121c57c..e879a501 100644 --- a/library/string/memcpy.c +++ b/library/string/memcpy.c @@ -1,5 +1,5 @@ /* - * $Id: string_memcpy.c,v 1.8 2021-03-22 09:02:51 clib2devs Exp $ + * $Id: string_memcpy.c,v 1.8 2021-03-22 09:02:51 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H diff --git a/library/string/memmem.c b/library/string/memmem.c index b13373f8..85c44afc 100644 --- a/library/string/memmem.c +++ b/library/string/memmem.c @@ -1,5 +1,5 @@ /* - * $Id: string_memmem.c,v 1.0 2022-05-06 11:02:51 clib2devs Exp $ + * $Id: string_memmem.c,v 1.0 2022-05-06 11:02:51 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H diff --git a/library/string/memmove.c b/library/string/memmove.c index 00a11854..bc9aa540 100644 --- a/library/string/memmove.c +++ b/library/string/memmove.c @@ -1,5 +1,5 @@ /* - * $Id: string_memmove.c,v 1.7 2006-09-22 09:02:51 clib2devs Exp $ + * $Id: string_memmove.c,v 1.7 2006-09-22 09:02:51 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H diff --git a/library/string/mempcpy.c b/library/string/mempcpy.c index 5073f7b5..fd14b595 100644 --- a/library/string/mempcpy.c +++ b/library/string/mempcpy.c @@ -1,5 +1,5 @@ /* - * $Id: string_mempcpy.c,v 1.0 2021-03-29 16:54:36 clib2devs Exp $ + * $Id: string_mempcpy.c,v 1.0 2021-03-29 16:54:36 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H diff --git a/library/string/memrchr.c b/library/string/memrchr.c index 661b5159..7216c9c5 100644 --- a/library/string/memrchr.c +++ b/library/string/memrchr.c @@ -1,5 +1,5 @@ /* - * $Id: string_memrchr.c,v 1.0 2021-02-23 10:32:26 clib2devs Exp $ + * $Id: string_memrchr.c,v 1.0 2021-02-23 10:32:26 clib4devs Exp $ */ #ifndef _STRING_HEADERS_H diff --git a/library/string/memset.c b/library/string/memset.c index e0cc0ca8..ebff32b1 100644 --- a/library/string/memset.c +++ b/library/string/memset.c @@ -1,5 +1,5 @@ /* - * $Id: string_memset.c,v 1.10 2023-02-22 09:02:51 clib2devs Exp $ + * $Id: string_memset.c,v 1.10 2023-02-22 09:02:51 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H diff --git a/library/string/rindex.c b/library/string/rindex.c index 11d51984..4445ac84 100644 --- a/library/string/rindex.c +++ b/library/string/rindex.c @@ -1,5 +1,5 @@ /* - * $Id: string_rindex.c,v 1.4 2006-01-08 12:04:26 clib2devs Exp $ + * $Id: string_rindex.c,v 1.4 2006-01-08 12:04:26 clib4devs Exp $ */ #ifndef _STRING_HEADERS_H diff --git a/library/string/stccpy.c b/library/string/stccpy.c index 0a0eac18..7fd13494 100644 --- a/library/string/stccpy.c +++ b/library/string/stccpy.c @@ -1,5 +1,5 @@ /* - * $Id: string_stccpy.c,v 1.0 2022-03-30 17:43:27 clib2devs Exp $ + * $Id: string_stccpy.c,v 1.0 2022-03-30 17:43:27 clib4devs Exp $ */ #ifndef _UNISTD_HEADERS_H diff --git a/library/string/stpcpy.c b/library/string/stpcpy.c index e749df89..00e44ffc 100644 --- a/library/string/stpcpy.c +++ b/library/string/stpcpy.c @@ -1,5 +1,5 @@ /* - * $Id: string_stpcpy.c,v 1.0 2021-01-21 17:43:27 clib2devs Exp $ + * $Id: string_stpcpy.c,v 1.0 2021-01-21 17:43:27 clib4devs Exp $ */ #ifndef _UNISTD_HEADERS_H diff --git a/library/string/stpncpy.c b/library/string/stpncpy.c index e071b848..7bd4916b 100644 --- a/library/string/stpncpy.c +++ b/library/string/stpncpy.c @@ -1,5 +1,5 @@ /* - * $Id: string_stpncpy.c,v 1.0 2022-07-30 17:43:27 clib2devs Exp $ + * $Id: string_stpncpy.c,v 1.0 2022-07-30 17:43:27 clib4devs Exp $ */ #ifndef _UNISTD_HEADERS_H diff --git a/library/string/strcasestr.c b/library/string/strcasestr.c index cf122ae3..5ca3f3b6 100644 --- a/library/string/strcasestr.c +++ b/library/string/strcasestr.c @@ -1,5 +1,5 @@ /* - * $Id: string_strcasestr.c,v 1.0 2021-02-23 10:01:27 clib2devs Exp $ + * $Id: string_strcasestr.c,v 1.0 2021-02-23 10:01:27 clib4devs Exp $ */ #include diff --git a/library/string/strcat.c b/library/string/strcat.c index efbc0ce3..f761e90f 100644 --- a/library/string/strcat.c +++ b/library/string/strcat.c @@ -1,5 +1,5 @@ /* - * $Id: string_strcat.c,v 1.4 2006-01-08 12:04:26 clib2devs Exp $ + * $Id: string_strcat.c,v 1.4 2006-01-08 12:04:26 clib4devs Exp $ */ #ifndef _STRING_HEADERS_H diff --git a/library/string/strchr.c b/library/string/strchr.c index 82624fda..53b5a25c 100644 --- a/library/string/strchr.c +++ b/library/string/strchr.c @@ -1,5 +1,5 @@ /* - * $Id: string_strchr.c,v 1.5 2021-03-22 12:04:26 clib2devs Exp $ + * $Id: string_strchr.c,v 1.5 2021-03-22 12:04:26 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H @@ -18,7 +18,7 @@ strchr(const char *s, int c) { char *result = NULL; unsigned char us_c; unsigned char find_this = (c & 0xff); - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; assert(s != NULL); @@ -27,8 +27,8 @@ strchr(const char *s, int c) { goto out; } - if (__clib2->__optimizedCPUFunctions) { - switch (__clib2->cpufamily) { + if (__clib4->__optimizedCPUFunctions) { + switch (__clib4->cpufamily) { case CPUFAMILY_4XX: result = __strchr440(s, c); break; diff --git a/library/string/strchrnul.c b/library/string/strchrnul.c index ef0912c0..021087a7 100644 --- a/library/string/strchrnul.c +++ b/library/string/strchrnul.c @@ -1,5 +1,5 @@ /* - * $Id: string_strchrnul.c,v 1.5 2021-03-22 12:04:26 clib2devs Exp $ + * $Id: string_strchrnul.c,v 1.5 2021-03-22 12:04:26 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H #include "stdlib_headers.h" diff --git a/library/string/strcmp.c b/library/string/strcmp.c index 2b503958..ed23a427 100644 --- a/library/string/strcmp.c +++ b/library/string/strcmp.c @@ -1,5 +1,5 @@ /* - * $Id: string_strcmp.c,v 1.5 2010-08-20 15:33:36 clib2devs Exp $ + * $Id: string_strcmp.c,v 1.5 2010-08-20 15:33:36 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H @@ -40,7 +40,7 @@ __strcmp(const char *s1, const char *s2) { int strcmp(const char *s1, const char *s2) { int result = 0; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; assert(s1 != NULL && s2 != NULL); @@ -49,8 +49,8 @@ strcmp(const char *s1, const char *s2) { goto out; } - if (__clib2->__optimizedCPUFunctions) { - switch (__clib2->cpufamily) { + if (__clib4->__optimizedCPUFunctions) { + switch (__clib4->cpufamily) { case CPUFAMILY_4XX: result = __strcmp440(s1, s2); break; diff --git a/library/string/strcoll.c b/library/string/strcoll.c index f391ae3a..b9e3fb72 100644 --- a/library/string/strcoll.c +++ b/library/string/strcoll.c @@ -1,5 +1,5 @@ /* - * $Id: string_strcoll.c,v 1.5 2006-01-08 12:04:27 clib2devs Exp $ + * $Id: string_strcoll.c,v 1.5 2006-01-08 12:04:27 clib4devs Exp $ */ #ifndef _STRING_HEADERS_H @@ -14,7 +14,7 @@ int strcoll(const char *s1, const char *s2) { DECLARE_LOCALEBASE(); int result = 0; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; assert(s1 != NULL && s2 != NULL); @@ -23,17 +23,17 @@ strcoll(const char *s1, const char *s2) { goto out; } - __locale_lock(__clib2); + __locale_lock(__clib4); - if (__clib2->__locale_table[LC_COLLATE] != NULL) { + if (__clib4->__locale_table[LC_COLLATE] != NULL) { assert(LocaleBase != NULL); - result = StrnCmp(__clib2->__locale_table[LC_COLLATE], (STRPTR) s1, (STRPTR) s2, -1, SC_COLLATE1); + result = StrnCmp(__clib4->__locale_table[LC_COLLATE], (STRPTR) s1, (STRPTR) s2, -1, SC_COLLATE1); } else { result = strcmp(s1, s2); } - __locale_unlock(__clib2); + __locale_unlock(__clib4); out: diff --git a/library/string/strcpy.c b/library/string/strcpy.c index 5511f8d6..640eb7ae 100644 --- a/library/string/strcpy.c +++ b/library/string/strcpy.c @@ -1,5 +1,5 @@ /* - * $Id: string_strcpy.c,v 1.5 2022-03-29 12:04:27 clib2devs Exp $ + * $Id: string_strcpy.c,v 1.5 2022-03-29 12:04:27 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H @@ -13,7 +13,7 @@ char * strcpy(char *dest, const char *src) { char *result = dest; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; assert(dest != NULL && src != NULL); @@ -23,8 +23,8 @@ strcpy(char *dest, const char *src) { } if (dest != src) { - if (__clib2->__optimizedCPUFunctions) { - switch (__clib2->cpufamily) { + if (__clib4->__optimizedCPUFunctions) { + switch (__clib4->cpufamily) { case CPUFAMILY_4XX: result = __strcpy440(dest, src); break; @@ -34,7 +34,7 @@ strcpy(char *dest, const char *src) { break; #endif default: { - if (__clib2->hasAltivec) { + if (__clib4->hasAltivec) { vec_strcpy(dest, src); } else { /* Fallback to standard function */ diff --git a/library/string/strcspn.c b/library/string/strcspn.c index 14e8fc3b..cb51cbba 100644 --- a/library/string/strcspn.c +++ b/library/string/strcspn.c @@ -1,5 +1,5 @@ /* - * $Id: string_strcspn.c,v 1.4 2006-01-08 12:04:27 clib2devs Exp $ + * $Id: string_strcspn.c,v 1.4 2006-01-08 12:04:27 clib4devs Exp $ */ #ifndef _STRING_HEADERS_H diff --git a/library/string/strdup.c b/library/string/strdup.c index 72ea15cb..cbef8b56 100644 --- a/library/string/strdup.c +++ b/library/string/strdup.c @@ -1,5 +1,5 @@ /* - * $Id: string_strdup.c,v 1.9 2006-01-08 12:04:27 clib2devs Exp $ + * $Id: string_strdup.c,v 1.9 2006-01-08 12:04:27 clib4devs Exp $ */ #ifndef _STRING_HEADERS_H diff --git a/library/string/strerror.c b/library/string/strerror.c index d5c30f23..8cd23a55 100644 --- a/library/string/strerror.c +++ b/library/string/strerror.c @@ -1,5 +1,5 @@ /* - * $Id: string_strerror.c,v 1.4 2006-09-17 17:36:42 clib2devs Exp $ + * $Id: string_strerror.c,v 1.4 2006-09-17 17:36:42 clib4devs Exp $ */ #ifndef _STRING_HEADERS_H diff --git a/library/string/strerror_r.c b/library/string/strerror_r.c index 39597470..9cc4c2b3 100644 --- a/library/string/strerror_r.c +++ b/library/string/strerror_r.c @@ -1,5 +1,5 @@ /* - * $Id: string_strerror_r.c,v 1.2 2006-09-21 09:24:20 clib2devs Exp $ + * $Id: string_strerror_r.c,v 1.2 2006-09-21 09:24:20 clib4devs Exp $ */ #ifndef _STRING_HEADERS_H diff --git a/library/string/string_headers.h b/library/string/string_headers.h index b192fb40..05a564b3 100755 --- a/library/string/string_headers.h +++ b/library/string/string_headers.h @@ -1,5 +1,5 @@ /* - * $Id: string_headers.h,v 1.7 2006-01-08 12:04:26 clib2devs Exp $ + * $Id: string_headers.h,v 1.7 2006-01-08 12:04:26 clib4devs Exp $ */ #ifndef _STRING_HEADERS_H diff --git a/library/string/strings_ffs.c b/library/string/strings_ffs.c index 0c8888b9..c58083c8 100644 --- a/library/string/strings_ffs.c +++ b/library/string/strings_ffs.c @@ -1,5 +1,5 @@ /* - * $Id: string_ffs.c,v 1.0 2022-12-31 12:04:26 clib2devs Exp $ + * $Id: string_ffs.c,v 1.0 2022-12-31 12:04:26 clib4devs Exp $ */ #ifndef _STRING_HEADERS_H diff --git a/library/string/strings_ffsl.c b/library/string/strings_ffsl.c index 77d1be16..041b35e0 100644 --- a/library/string/strings_ffsl.c +++ b/library/string/strings_ffsl.c @@ -1,5 +1,5 @@ /* - * $Id: string_ffsl.c,v 1.0 2022-12-31 12:04:26 clib2devs Exp $ + * $Id: string_ffsl.c,v 1.0 2022-12-31 12:04:26 clib4devs Exp $ */ #ifndef _STRING_HEADERS_H diff --git a/library/string/strings_ffsll.c b/library/string/strings_ffsll.c index 6b8eabfe..5f8a402b 100644 --- a/library/string/strings_ffsll.c +++ b/library/string/strings_ffsll.c @@ -1,5 +1,5 @@ /* - * $Id: string_ffsll.c,v 1.0 2022-12-31 12:04:26 clib2devs Exp $ + * $Id: string_ffsll.c,v 1.0 2022-12-31 12:04:26 clib4devs Exp $ */ #ifndef _STRING_HEADERS_H diff --git a/library/string/strings_headers.h b/library/string/strings_headers.h index c3bb4989..a86e0e14 100755 --- a/library/string/strings_headers.h +++ b/library/string/strings_headers.h @@ -1,5 +1,5 @@ /* - * $Id: strings_headers.h,v 1.4 2006-01-08 12:04:27 clib2devs Exp $ + * $Id: strings_headers.h,v 1.4 2006-01-08 12:04:27 clib4devs Exp $ */ #ifndef _STRINGS_HEADERS_H diff --git a/library/string/strings_strcasecmp.c b/library/string/strings_strcasecmp.c index cf37f730..912d5c93 100755 --- a/library/string/strings_strcasecmp.c +++ b/library/string/strings_strcasecmp.c @@ -1,5 +1,5 @@ /* - * $Id: strings_strcasecmp.c,v 1.5 2006-01-08 12:04:27 clib2devs Exp $ + * $Id: strings_strcasecmp.c,v 1.5 2006-01-08 12:04:27 clib4devs Exp $ */ #ifndef _STRINGS_HEADERS_H diff --git a/library/string/strings_strncasecmp.c b/library/string/strings_strncasecmp.c index cb0a9fb8..d6a593c7 100755 --- a/library/string/strings_strncasecmp.c +++ b/library/string/strings_strncasecmp.c @@ -1,5 +1,5 @@ /* - * $Id: strings_strncasecmp.c,v 1.5 2006-01-08 12:04:27 clib2devs Exp $ + * $Id: strings_strncasecmp.c,v 1.5 2006-01-08 12:04:27 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H diff --git a/library/string/strlcat.c b/library/string/strlcat.c index c33beb16..5524e6be 100644 --- a/library/string/strlcat.c +++ b/library/string/strlcat.c @@ -1,5 +1,5 @@ /* - * $Id: string_strlcat.c,v 1.4 2006-01-08 12:04:27 clib2devs Exp $ + * $Id: string_strlcat.c,v 1.4 2006-01-08 12:04:27 clib4devs Exp $ */ /****************************************************************************/ diff --git a/library/string/strlcpy.c b/library/string/strlcpy.c index 0839ef94..fc003d9b 100644 --- a/library/string/strlcpy.c +++ b/library/string/strlcpy.c @@ -1,5 +1,5 @@ /* - * $Id: string_strlcpy.c,v 1.4 2006-01-08 12:04:27 clib2devs Exp $ + * $Id: string_strlcpy.c,v 1.4 2006-01-08 12:04:27 clib4devs Exp $ */ /****************************************************************************/ diff --git a/library/string/strlen.c b/library/string/strlen.c index fd7124b1..8537d605 100644 --- a/library/string/strlen.c +++ b/library/string/strlen.c @@ -1,5 +1,5 @@ /* - * $Id: string_strlen.c,v 1.4 2006-01-08 12:04:27 clib2devs Exp $ + * $Id: string_strlen.c,v 1.4 2006-01-08 12:04:27 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H @@ -45,15 +45,15 @@ __strlen(const char *str) { size_t strlen(const char *s) { size_t result = 0; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; if (NULL == s) { __set_errno(EFAULT); goto out; } - if (__clib2->__optimizedCPUFunctions) { - switch (__clib2->cpufamily) { + if (__clib4->__optimizedCPUFunctions) { + switch (__clib4->cpufamily) { case CPUFAMILY_4XX: result = __strlen440(s); break; diff --git a/library/string/strncat.c b/library/string/strncat.c index 37088d08..cd4ee233 100644 --- a/library/string/strncat.c +++ b/library/string/strncat.c @@ -1,5 +1,5 @@ /* - * $Id: string_strncat.c,v 1.4 2006-01-08 12:04:27 clib2devs Exp $ + * $Id: string_strncat.c,v 1.4 2006-01-08 12:04:27 clib4devs Exp $ */ #ifndef _STRING_HEADERS_H diff --git a/library/string/strncmp.c b/library/string/strncmp.c index 732d20f6..c205fa59 100644 --- a/library/string/strncmp.c +++ b/library/string/strncmp.c @@ -1,5 +1,5 @@ /* - * $Id: string_strncmp.c,v 1.5 2010-08-20 15:33:36 clib2devs Exp $ + * $Id: string_strncmp.c,v 1.5 2010-08-20 15:33:36 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H @@ -41,7 +41,7 @@ __strncmp(const char *s1, const char *s2, size_t n) { int strncmp(const char *s1, const char *s2, size_t n) { int result = 0; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; assert(s1 != NULL && s2 != NULL); assert((int) n >= 0); @@ -55,8 +55,8 @@ strncmp(const char *s1, const char *s2, size_t n) { * function is supposed to have no effect. */ if (s1 != s2 && (int) n > 0) { - if (__clib2->__optimizedCPUFunctions) { - switch (__clib2->cpufamily) { + if (__clib4->__optimizedCPUFunctions) { + switch (__clib4->cpufamily) { case CPUFAMILY_4XX: result = __strncmp440(s1, s2, n); break; diff --git a/library/string/strncpy.c b/library/string/strncpy.c index b39ad98c..fb66ca28 100644 --- a/library/string/strncpy.c +++ b/library/string/strncpy.c @@ -1,5 +1,5 @@ /* - * $Id: string_strncpy.c,v 1.4 2006-01-08 12:04:27 clib2devs Exp $ + * $Id: string_strncpy.c,v 1.4 2006-01-08 12:04:27 clib4devs Exp $ */ #ifndef _STRING_HEADERS_H diff --git a/library/string/strndup.c b/library/string/strndup.c index a4c31c39..1027a3f6 100644 --- a/library/string/strndup.c +++ b/library/string/strndup.c @@ -1,5 +1,5 @@ /* - * $Id: string_strndup.c,v 1.0 2021-02-23 10:15:27 clib2devs Exp $ + * $Id: string_strndup.c,v 1.0 2021-02-23 10:15:27 clib4devs Exp $ */ #ifndef _STRING_HEADERS_H diff --git a/library/string/strnlen.c b/library/string/strnlen.c index 13476635..7fae5216 100644 --- a/library/string/strnlen.c +++ b/library/string/strnlen.c @@ -1,5 +1,5 @@ /* - * $Id: string_strnlen.c,v 1.5 2022-08-11 12:04:27 clib2devs Exp $ + * $Id: string_strnlen.c,v 1.5 2022-08-11 12:04:27 clib4devs Exp $ */ #ifndef _STRING_HEADERS_H diff --git a/library/string/strnstr.c b/library/string/strnstr.c index 99e62ef9..8047701e 100644 --- a/library/string/strnstr.c +++ b/library/string/strnstr.c @@ -1,5 +1,5 @@ /* - * $Id: string_strnstr.c,v 1.0 2021-03-09 12:04:27 clib2devs Exp $ + * $Id: string_strnstr.c,v 1.0 2021-03-09 12:04:27 clib4devs Exp $ */ #ifndef _STRING_HEADERS_H diff --git a/library/string/strpbrk.c b/library/string/strpbrk.c index 1bd4e1f8..fe40d594 100644 --- a/library/string/strpbrk.c +++ b/library/string/strpbrk.c @@ -1,5 +1,5 @@ /* - * $Id: string_strpbrk.c,v 1.4 2006-01-08 12:04:27 clib2devs Exp $ + * $Id: string_strpbrk.c,v 1.4 2006-01-08 12:04:27 clib4devs Exp $ */ #ifndef _STRING_HEADERS_H diff --git a/library/string/strrchr.c b/library/string/strrchr.c index 9b533ce8..e2658c3d 100644 --- a/library/string/strrchr.c +++ b/library/string/strrchr.c @@ -1,5 +1,5 @@ /* - * $Id: string_strrchr.c,v 1.4 2006-01-08 12:04:27 clib2devs Exp $ + * $Id: string_strrchr.c,v 1.4 2006-01-08 12:04:27 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H @@ -44,7 +44,7 @@ char * strrchr(const char *s, int c) { const unsigned char *us = (const unsigned char *) s; char *result = NULL; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; assert(s != NULL); @@ -53,8 +53,8 @@ strrchr(const char *s, int c) { goto out; } - if (__clib2->__optimizedCPUFunctions) { - switch (__clib2->cpufamily) { + if (__clib4->__optimizedCPUFunctions) { + switch (__clib4->cpufamily) { case CPUFAMILY_4XX: result = __strrchr440(s, c); break; diff --git a/library/string/strsep.c b/library/string/strsep.c index fcd3c12d..0ffba323 100644 --- a/library/string/strsep.c +++ b/library/string/strsep.c @@ -1,5 +1,5 @@ /* - * $Id: string_strsep.c,v 1.0 2021-01-21 11:20:32 clib2devs Exp $ + * $Id: string_strsep.c,v 1.0 2021-01-21 11:20:32 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H diff --git a/library/string/strsignal.c b/library/string/strsignal.c index 40a27308..b11f0885 100644 --- a/library/string/strsignal.c +++ b/library/string/strsignal.c @@ -1,5 +1,5 @@ /* - * $Id: string_strsignal.c,v 1.0 2022-08-04 12:04:27 clib2devs Exp $ + * $Id: string_strsignal.c,v 1.0 2022-08-04 12:04:27 clib4devs Exp $ */ #ifndef _STRING_HEADERS_H diff --git a/library/string/strspn.c b/library/string/strspn.c index 9b347898..e254364a 100644 --- a/library/string/strspn.c +++ b/library/string/strspn.c @@ -1,5 +1,5 @@ /* - * $Id: string_strspn.c,v 1.4 2006-01-08 12:04:27 clib2devs Exp $ + * $Id: string_strspn.c,v 1.4 2006-01-08 12:04:27 clib4devs Exp $ */ #ifndef _STRING_HEADERS_H diff --git a/library/string/strstr.c b/library/string/strstr.c index 1362cbbe..3cc47b2a 100644 --- a/library/string/strstr.c +++ b/library/string/strstr.c @@ -1,5 +1,5 @@ /* - * $Id: string_strstr.c,v 1.4 2006-01-08 12:04:27 clib2devs Exp $ + * $Id: string_strstr.c,v 1.4 2006-01-08 12:04:27 clib4devs Exp $ */ #ifndef _STRING_HEADERS_H diff --git a/library/string/strtok.c b/library/string/strtok.c index 18297a50..cfa60a18 100644 --- a/library/string/strtok.c +++ b/library/string/strtok.c @@ -1,5 +1,5 @@ /* - * $Id: string_strtok.c,v 1.6 2006-01-08 12:04:27 clib2devs Exp $ + * $Id: string_strtok.c,v 1.6 2006-01-08 12:04:27 clib4devs Exp $ */ #ifndef _STRING_HEADERS_H diff --git a/library/string/strtok_r.c b/library/string/strtok_r.c index 27501b1c..d6bda717 100644 --- a/library/string/strtok_r.c +++ b/library/string/strtok_r.c @@ -1,5 +1,5 @@ /* - * $Id: string_strtok_r.c,v 1.4 2006-01-08 12:04:27 clib2devs Exp $ + * $Id: string_strtok_r.c,v 1.4 2006-01-08 12:04:27 clib4devs Exp $ */ #ifndef _STRING_HEADERS_H diff --git a/library/string/strverscmp.c b/library/string/strverscmp.c index 931beca8..f1447d48 100644 --- a/library/string/strverscmp.c +++ b/library/string/strverscmp.c @@ -1,5 +1,5 @@ /* - * $Id: string_strverscmp.c,v 1.0 2022-05-06 11:54:27 clib2devs Exp $ + * $Id: string_strverscmp.c,v 1.0 2022-05-06 11:54:27 clib4devs Exp $ */ #include diff --git a/library/string/strxfrm.c b/library/string/strxfrm.c index cb6f5191..affcb38f 100644 --- a/library/string/strxfrm.c +++ b/library/string/strxfrm.c @@ -1,5 +1,5 @@ /* - * $Id: string_strxfrm.c,v 1.5 2006-01-08 12:04:27 clib2devs Exp $ + * $Id: string_strxfrm.c,v 1.5 2006-01-08 12:04:27 clib4devs Exp $ */ #ifndef _STRING_HEADERS_H @@ -14,7 +14,7 @@ size_t strxfrm(char *dest, const char *src, size_t len) { DECLARE_LOCALEBASE(); size_t result = 0; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); @@ -31,12 +31,12 @@ strxfrm(char *dest, const char *src, size_t len) { goto out; } - __locale_lock(__clib2); + __locale_lock(__clib4); - if (__clib2->__locale_table[LC_COLLATE] != NULL) { + if (__clib4->__locale_table[LC_COLLATE] != NULL) { assert(LocaleBase != NULL); - result = StrConvert(__clib2->__locale_table[LC_COLLATE], (STRPTR) src, dest, len, SC_COLLATE1); + result = StrConvert(__clib4->__locale_table[LC_COLLATE], (STRPTR) src, dest, len, SC_COLLATE1); } else { if (len > 0 && dest != NULL) { char c; @@ -59,7 +59,7 @@ strxfrm(char *dest, const char *src, size_t len) { } } - __locale_unlock(__clib2); + __locale_unlock(__clib4); out: diff --git a/library/termcap/termcap.c b/library/termcap/termcap.c index bb1b84e7..67fa242b 100644 --- a/library/termcap/termcap.c +++ b/library/termcap/termcap.c @@ -215,16 +215,16 @@ tputs(const char *str, int nlines, register int (*outfun)()) { register int padcount = 0; register int speed; size_t n_speeds = sizeof(speeds) / sizeof(speeds[0]); - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; __check_abort(); - if (__clib2->__ospeed == 0) - speed = __clib2->__tputs_baud_rate; - else if (__clib2->__ospeed >= n_speeds) + if (__clib4->__ospeed == 0) + speed = __clib4->__tputs_baud_rate; + else if (__clib4->__ospeed >= n_speeds) speed = speeds[n_speeds - 1]; else - speed = speeds[__clib2->__ospeed]; + speed = speeds[__clib4->__ospeed]; if (!str) return; @@ -259,7 +259,7 @@ tputs(const char *str, int nlines, register int (*outfun)()) { } while (padcount-- > 0) - (*outfun)(__clib2->__PC); + (*outfun)(__clib4->__PC); } /* Find the termcap entry data for terminal type NAME diff --git a/library/termcap/tparam.c b/library/termcap/tparam.c index 9f3cdd59..cf278541 100644 --- a/library/termcap/tparam.c +++ b/library/termcap/tparam.c @@ -75,14 +75,14 @@ tparam(const char *string, char *outstring, int len, int arg0, int arg1, int arg char * tgoto(const char *string, int hpos, int vpos) { int args[2]; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; if (!string) return NULL; args[0] = vpos; args[1] = hpos; - return tparam1(string, __clib2->tgoto_buf, 50, __clib2->__UP, __clib2->__BC, args); + return tparam1(string, __clib4->tgoto_buf, 50, __clib4->__UP, __clib4->__BC, args); } static char * diff --git a/library/termios/cfgetispeed.c b/library/termios/cfgetispeed.c index 0579d871..2ecb1f0c 100644 --- a/library/termios/cfgetispeed.c +++ b/library/termios/cfgetispeed.c @@ -1,5 +1,5 @@ /* - * $Id: termios_cfgetispeed.c,v 1.2 2006-01-08 12:04:27 clib2devs Exp $ + * $Id: termios_cfgetispeed.c,v 1.2 2006-01-08 12:04:27 clib4devs Exp $ */ #ifndef _TERMIOS_HEADERS_H diff --git a/library/termios/cfgetospeed.c b/library/termios/cfgetospeed.c index ee2a40a9..8c3df1f7 100644 --- a/library/termios/cfgetospeed.c +++ b/library/termios/cfgetospeed.c @@ -1,5 +1,5 @@ /* - * $Id: termios_cfgetospeed.c,v 1.2 2006-01-08 12:04:27 clib2devs Exp $ + * $Id: termios_cfgetospeed.c,v 1.2 2006-01-08 12:04:27 clib4devs Exp $ */ #ifndef _TERMIOS_HEADERS_H diff --git a/library/termios/cfmakeraw.c b/library/termios/cfmakeraw.c index eecd6ca6..3534f1d1 100644 --- a/library/termios/cfmakeraw.c +++ b/library/termios/cfmakeraw.c @@ -1,5 +1,5 @@ /* - * $Id: termios_cfmakeraw.c,v 1.2 2006-01-08 12:04:27 clib2devs Exp $ + * $Id: termios_cfmakeraw.c,v 1.2 2006-01-08 12:04:27 clib4devs Exp $ */ #ifndef _TERMIOS_HEADERS_H diff --git a/library/termios/cfsetispeed.c b/library/termios/cfsetispeed.c index 40f61d34..b90d880b 100644 --- a/library/termios/cfsetispeed.c +++ b/library/termios/cfsetispeed.c @@ -1,5 +1,5 @@ /* - * $Id: termios_cfsetispeed.c,v 1.2 2006-01-08 12:04:27 clib2devs Exp $ + * $Id: termios_cfsetispeed.c,v 1.2 2006-01-08 12:04:27 clib4devs Exp $ */ #ifndef _TERMIOS_HEADERS_H diff --git a/library/termios/cfsetospeed.c b/library/termios/cfsetospeed.c index 5f105561..0c3ae35c 100644 --- a/library/termios/cfsetospeed.c +++ b/library/termios/cfsetospeed.c @@ -1,5 +1,5 @@ /* - * $Id: termios_cfsetospeed.c,v 1.2 2006-01-08 12:04:27 clib2devs Exp $ + * $Id: termios_cfsetospeed.c,v 1.2 2006-01-08 12:04:27 clib4devs Exp $ */ #ifndef _TERMIOS_HEADERS_H diff --git a/library/termios/console_fdhookentry.c b/library/termios/console_fdhookentry.c index b8ec2633..ca3cc215 100644 --- a/library/termios/console_fdhookentry.c +++ b/library/termios/console_fdhookentry.c @@ -1,5 +1,5 @@ /* - * $Id: termios_console_fdhookentry.c,v 1.7 2021-01-31 13:12:59 clib2devs Exp $ + * $Id: termios_console_fdhookentry.c,v 1.7 2021-01-31 13:12:59 clib4devs Exp $ * * Hook for termios emulation on a console. This can probably be cleaned up a bit * by removing things which will (should) never happen on a console. @@ -140,7 +140,7 @@ LineEditor(BPTR file, char *buf, const int buflen, struct termios *tios) { } int64_t -__termios_console_hook(struct _clib2 *__clib2, struct fd *fd, struct file_action_message *fam) { +__termios_console_hook(struct _clib4 *__clib4, struct fd *fd, struct file_action_message *fam) { const unsigned char CR = '\r', NL = '\n'; struct FileHandle *fh; char *buffer = NULL; @@ -153,7 +153,7 @@ __termios_console_hook(struct _clib2 *__clib2, struct fd *fd, struct file_action ENTER(); assert(fam != NULL && fd != NULL); - assert(__is_valid_fd(__clib2, fd)); + assert(__is_valid_fd(__clib4, fd)); assert(FLAG_IS_SET(fd->fd_Flags, FDF_TERMIOS)); assert(fd->fd_Aux != NULL); @@ -163,7 +163,7 @@ __termios_console_hook(struct _clib2 *__clib2, struct fd *fd, struct file_action * table and therefore needs to obtain the stdio lock before * it locks this particular descriptor entry. */ if (fam->fam_Action == file_action_close) - __stdio_lock(__clib2); + __stdio_lock(__clib4); __fd_lock(fd); @@ -560,7 +560,7 @@ __termios_console_hook(struct _clib2 *__clib2, struct fd *fd, struct file_action __fd_unlock(fd); if (fam->fam_Action == file_action_close) - __stdio_unlock(__clib2); + __stdio_unlock(__clib4); if (buffer != NULL) free(buffer); diff --git a/library/termios/openserial.c b/library/termios/openserial.c index 97c171c3..f0ce214c 100644 --- a/library/termios/openserial.c +++ b/library/termios/openserial.c @@ -1,5 +1,5 @@ /* - * $Id: termios_openserial.c,v 1.2 2006-01-08 12:04:27 clib2devs Exp $ + * $Id: termios_openserial.c,v 1.2 2006-01-08 12:04:27 clib4devs Exp $ */ #ifndef _TERMIOS_HEADERS_H @@ -9,7 +9,7 @@ /****************************************************************************/ /* - * This is a clib2/Amiga specific function to obtain a file descriptor + * This is a clib4/Amiga specific function to obtain a file descriptor * for a serial port. This is intended as an easy porting path for Unix * code (which might e.g. open "/dev/ttyS0") and the same concept might * be applied to other device types as well. diff --git a/library/termios/tcdrain.c b/library/termios/tcdrain.c index 7b11be63..ceec20f0 100644 --- a/library/termios/tcdrain.c +++ b/library/termios/tcdrain.c @@ -1,5 +1,5 @@ /* - * $Id: termios_tcdrain.c,v 1.4 2006-11-16 14:39:23 clib2devs Exp $ + * $Id: termios_tcdrain.c,v 1.4 2006-11-16 14:39:23 clib4devs Exp $ */ #ifndef _TERMIOS_HEADERS_H @@ -14,7 +14,7 @@ int tcdrain(int file_descriptor) { int result = ERROR; struct fd *fd; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); @@ -22,7 +22,7 @@ tcdrain(int file_descriptor) { __check_abort(); - __stdio_lock(__clib2); + __stdio_lock(__clib4); fd = __get_file_descriptor(file_descriptor); if (fd == NULL) { @@ -70,7 +70,7 @@ tcdrain(int file_descriptor) { out: - __stdio_unlock(__clib2); + __stdio_unlock(__clib4); RETURN(result); return (result); diff --git a/library/termios/tcflow.c b/library/termios/tcflow.c index 424fcfa8..bdd083d8 100644 --- a/library/termios/tcflow.c +++ b/library/termios/tcflow.c @@ -1,5 +1,5 @@ /* - * $Id: termios_tcflow.c,v 1.3 2006-01-08 12:04:27 clib2devs Exp $ + * $Id: termios_tcflow.c,v 1.3 2006-01-08 12:04:27 clib4devs Exp $ */ #ifndef _TERMIOS_HEADERS_H @@ -10,14 +10,14 @@ int tcflow(int file_descriptor, int UNUSED action) { int result = ERROR; struct fd *fd; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); SHOWVALUE(file_descriptor); SHOWVALUE(action); - __stdio_lock(__clib2); + __stdio_lock(__clib4); fd = __get_file_descriptor(file_descriptor); if (fd == NULL) { @@ -34,7 +34,7 @@ tcflow(int file_descriptor, int UNUSED action) { out: - __stdio_unlock(__clib2); + __stdio_unlock(__clib4); __check_abort(); diff --git a/library/termios/tcflush.c b/library/termios/tcflush.c index 378f21ff..c40e75f9 100644 --- a/library/termios/tcflush.c +++ b/library/termios/tcflush.c @@ -1,5 +1,5 @@ /* - * $Id: termios_tcflush.c,v 1.5 2006-11-16 14:39:23 clib2devs Exp $ + * $Id: termios_tcflush.c,v 1.5 2006-11-16 14:39:23 clib4devs Exp $ */ #ifndef _TERMIOS_HEADERS_H @@ -20,7 +20,7 @@ int tcflush(int file_descriptor, int queue) { int result = ERROR; struct fd *fd; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); @@ -28,7 +28,7 @@ tcflush(int file_descriptor, int queue) { __check_abort(); - __stdio_lock(__clib2); + __stdio_lock(__clib4); fd = __get_file_descriptor(file_descriptor); if (fd == NULL || FLAG_IS_CLEAR(fd->fd_Flags, FDF_TERMIOS)) { @@ -68,7 +68,7 @@ tcflush(int file_descriptor, int queue) { } while (WaitForChar(file, 1) != DOSFALSE) { - if (__clib2->__check_abort_enabled && FLAG_IS_SET(SetSignal(0, 0), __clib2->__break_signal_mask)) + if (__clib4->__check_abort_enabled && FLAG_IS_SET(SetSignal(0, 0), __clib4->__break_signal_mask)) break; /* Read away available data. (upto 8k) */ @@ -98,7 +98,7 @@ tcflush(int file_descriptor, int queue) { out: - __stdio_unlock(__clib2); + __stdio_unlock(__clib4); __check_abort(); diff --git a/library/termios/tcgetattr.c b/library/termios/tcgetattr.c index 53ff3c20..eae18159 100644 --- a/library/termios/tcgetattr.c +++ b/library/termios/tcgetattr.c @@ -1,5 +1,5 @@ /* - * $Id: termios_tcgetattr.c,v 1.4 2022-08-15 12:04:27 clib2devs Exp $ + * $Id: termios_tcgetattr.c,v 1.4 2022-08-15 12:04:27 clib4devs Exp $ */ #ifndef _TERMIOS_HEADERS_H @@ -102,9 +102,9 @@ tcgetattr(int file_descriptor, struct termios *user_tios) { struct fd *fd = NULL; struct termios *tios; BPTR file; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; - __stdio_lock(__clib2); + __stdio_lock(__clib4); if (user_tios == NULL) { __set_errno(EFAULT); @@ -155,7 +155,7 @@ tcgetattr(int file_descriptor, struct termios *user_tios) { out: - __stdio_unlock(__clib2); + __stdio_unlock(__clib4); __check_abort(); return (result); diff --git a/library/termios/tcsendbreak.c b/library/termios/tcsendbreak.c index 1ae9fcef..783e917c 100644 --- a/library/termios/tcsendbreak.c +++ b/library/termios/tcsendbreak.c @@ -1,5 +1,5 @@ /* - * $Id: termios_tcsendbreak.c,v 1.3 2006-01-08 12:04:27 clib2devs Exp $ + * $Id: termios_tcsendbreak.c,v 1.3 2006-01-08 12:04:27 clib4devs Exp $ */ #ifndef _TERMIOS_HEADERS_H @@ -24,7 +24,7 @@ tcsendbreak(int file_descriptor, int duration) { int result = ERROR; struct fd *fd; struct termios *tios; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); @@ -33,7 +33,7 @@ tcsendbreak(int file_descriptor, int duration) { __check_abort(); - __stdio_lock(__clib2); + __stdio_lock(__clib4); fd = __get_file_descriptor(file_descriptor); if (fd == NULL || FLAG_IS_CLEAR(fd->fd_Flags, FDF_TERMIOS)) { @@ -67,7 +67,7 @@ tcsendbreak(int file_descriptor, int duration) { out: - __stdio_unlock(__clib2); + __stdio_unlock(__clib4); __check_abort(); diff --git a/library/termios/tcsetattr.c b/library/termios/tcsetattr.c index cf7bcbe3..03be1efb 100644 --- a/library/termios/tcsetattr.c +++ b/library/termios/tcsetattr.c @@ -1,5 +1,5 @@ /* - * $Id: termios_tcsetattr.c,v 1.5 2006-11-16 14:39:23 clib2devs Exp $ + * $Id: termios_tcsetattr.c,v 1.5 2006-11-16 14:39:23 clib4devs Exp $ */ #ifndef _TERMIOS_HEADERS_H @@ -55,9 +55,9 @@ tcsetattr(int file_descriptor, int how, struct termios *tios) { struct fd *fd = NULL; struct termios new_tios; int type; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; - __stdio_lock(__clib2); + __stdio_lock(__clib4); if (tios == NULL) { __set_errno(EFAULT); @@ -125,7 +125,7 @@ tcsetattr(int file_descriptor, int how, struct termios *tios) { out: - __stdio_unlock(__clib2); + __stdio_unlock(__clib4); return (result); } diff --git a/library/termios/termios_headers.h b/library/termios/termios_headers.h index b83b3256..69bba9a3 100755 --- a/library/termios/termios_headers.h +++ b/library/termios/termios_headers.h @@ -1,5 +1,5 @@ /* - * $Id: termios_headers.h,v 1.3 2006-01-08 12:04:27 clib2devs Exp $ + * $Id: termios_headers.h,v 1.3 2006-01-08 12:04:27 clib4devs Exp $ */ #ifndef _TERMIOS_HEADERS_H @@ -19,8 +19,8 @@ /****************************************************************************/ -extern int64_t __termios_console_hook(struct _clib2 *__clib2, struct fd *,struct file_action_message *); -extern int64_t __termios_serial_hook(struct _clib2 *__clib2, struct fd *,struct file_action_message *); +extern int64_t __termios_console_hook(struct _clib4 *__clib4, struct fd *,struct file_action_message *); +extern int64_t __termios_serial_hook(struct _clib4 *__clib4, struct fd *,struct file_action_message *); extern struct termios *__get_termios(struct fd *, BOOL); extern int openserial(const char *device_name,int unit,int mode); diff --git a/library/time/asctime.c b/library/time/asctime.c index 43f8b8eb..40f29468 100644 --- a/library/time/asctime.c +++ b/library/time/asctime.c @@ -1,5 +1,5 @@ /* - * $Id: time_asctime.c,v 1.5 2006-01-08 12:04:27 clib2devs Exp $ + * $Id: time_asctime.c,v 1.5 2006-01-08 12:04:27 clib4devs Exp $ */ #ifndef _TIME_HEADERS_H diff --git a/library/time/asctime_r.c b/library/time/asctime_r.c index 037aa43a..d77cad9f 100644 --- a/library/time/asctime_r.c +++ b/library/time/asctime_r.c @@ -1,5 +1,5 @@ /* - * $Id: time_asctime_r.c,v 1.10 2006-09-25 13:43:06 clib2devs Exp $ + * $Id: time_asctime_r.c,v 1.10 2006-09-25 13:43:06 clib4devs Exp $ */ #ifndef _TIME_HEADERS_H diff --git a/library/time/clock.c b/library/time/clock.c index ca96f716..5f29abad 100644 --- a/library/time/clock.c +++ b/library/time/clock.c @@ -1,5 +1,5 @@ /* - * $Id: time_clock.c,v 1.8 2022-07-18 12:04:27 clib2devs Exp $ + * $Id: time_clock.c,v 1.8 2022-07-18 12:04:27 clib4devs Exp $ */ #ifndef _TIME_HEADERS_H @@ -16,13 +16,13 @@ CLIB_CONSTRUCTOR(clock_init) { ENTER(); - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; /* Remember when this program was started. */ SHOWMSG("Calling gettimeofday"); - gettimeofday(&__clib2->clock, NULL); + gettimeofday(&__clib4->clock, NULL); /* Generate random seed */ - __clib2->__random_seed = time(NULL); + __clib4->__random_seed = time(NULL); LEAVE(); @@ -34,7 +34,7 @@ clock(void) { struct timeval now; uint64 usec_now, usec_start; clock_t result; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); @@ -44,7 +44,7 @@ clock(void) { gettimeofday(&now, NULL); usec_now = now.tv_sec * 1000000ULL + now.tv_usec; - usec_start = __clib2->clock.tv_sec * 1000000ULL + __clib2->clock.tv_usec; + usec_start = __clib4->clock.tv_sec * 1000000ULL + __clib4->clock.tv_usec; /* Subtract the start time from the current time. */ usec_now -= usec_start; diff --git a/library/time/clock_getres.c b/library/time/clock_getres.c index 6a84394f..e32d094a 100644 --- a/library/time/clock_getres.c +++ b/library/time/clock_getres.c @@ -1,5 +1,5 @@ /* - * $Id: time_getres.c,v 1.0 2020-01-13 17:27:27 clib2devs Exp $ + * $Id: time_getres.c,v 1.0 2020-01-13 17:27:27 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H diff --git a/library/time/clock_gettime.c b/library/time/clock_gettime.c index 19d24e19..bbc78391 100644 --- a/library/time/clock_gettime.c +++ b/library/time/clock_gettime.c @@ -1,5 +1,5 @@ /* - * $Id: time_clock_gettime.c,v 2.0 2023-05-26 16:55:42 clib2devs Exp $ + * $Id: time_clock_gettime.c,v 2.0 2023-05-26 16:55:42 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H @@ -13,7 +13,7 @@ int clock_gettime(clockid_t clk_id, struct timespec *t) { ENTER(); - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; /* Check the supported flags. */ if ((clk_id & ~(CLOCK_MONOTONIC | CLOCK_REALTIME)) != 0) { @@ -22,14 +22,14 @@ clock_gettime(clockid_t clk_id, struct timespec *t) { return -1; } - if (__clib2->__timer_busy) { + if (__clib4->__timer_busy) { __set_errno(EAGAIN); RETURN(-1); return -1; } DECLARE_TIMEZONEBASE(); - struct TimerIFace *ITimer = __clib2->__ITimer; + struct TimerIFace *ITimer = __clib4->__ITimer; struct timeval tv; uint32 gmtoffset = 0; @@ -40,13 +40,13 @@ clock_gettime(clockid_t clk_id, struct timespec *t) { GetTimezoneAttrs(NULL, TZA_UTCOffset, &gmtoffset, TZA_TimeFlag, &dstime, TAG_DONE); - __clib2->__timer_busy = TRUE; + __clib4->__timer_busy = TRUE; if (clk_id == CLOCK_MONOTONIC) { /* CLOCK_MONOTONIC A nonsettable system-wide clock that represents monotonic time since—as described by POSIX—"some unspecified point - in the past". On clib2, that point corresponds to the + in the past". On clib4, that point corresponds to the number of seconds that the system has been running since it was booted. */ @@ -72,7 +72,7 @@ clock_gettime(clockid_t clk_id, struct timespec *t) { if (dstime == TFLG_ISDST) t->tv_sec += (60 * 60); - __clib2->__timer_busy = FALSE; + __clib4->__timer_busy = FALSE; RETURN(0); return 0; diff --git a/library/time/clock_gettime64.c b/library/time/clock_gettime64.c index f9975a09..ab7c2a9d 100755 --- a/library/time/clock_gettime64.c +++ b/library/time/clock_gettime64.c @@ -1,5 +1,5 @@ /* - * $Id: time_clock_gettime64.c,v 1.0 2023-03-03 16:55:42 clib2devs Exp $ + * $Id: time_clock_gettime64.c,v 1.0 2023-03-03 16:55:42 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H @@ -13,7 +13,7 @@ int clock_gettime64(clockid_t clk_id, struct timespec64 *t) { ENTER(); - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; /* Check the supported flags. */ if ((clk_id & ~(CLOCK_MONOTONIC | CLOCK_REALTIME)) != 0) { @@ -22,14 +22,14 @@ clock_gettime64(clockid_t clk_id, struct timespec64 *t) { return -1; } - if (__clib2->__timer_busy) { + if (__clib4->__timer_busy) { __set_errno(EAGAIN); RETURN(-1); return -1; } DECLARE_TIMEZONEBASE(); - struct TimerIFace *ITimer = __clib2->__ITimer; + struct TimerIFace *ITimer = __clib4->__ITimer; struct timeval tv; uint32 gmtoffset = 0; @@ -39,13 +39,13 @@ clock_gettime64(clockid_t clk_id, struct timespec64 *t) { tv.tv_sec = tv.tv_usec = 0; GetTimezoneAttrs(NULL, TZA_UTCOffset, &gmtoffset, TZA_TimeFlag, &dstime, TAG_DONE); - __clib2->__timer_busy = TRUE; + __clib4->__timer_busy = TRUE; if (clk_id == CLOCK_MONOTONIC) { /* CLOCK_MONOTONIC A nonsettable system-wide clock that represents monotonic time since—as described by POSIX—"some unspecified point - in the past". On clib2, that point corresponds to the + in the past". On clib4, that point corresponds to the number of seconds that the system has been running since it was booted. */ @@ -71,7 +71,7 @@ clock_gettime64(clockid_t clk_id, struct timespec64 *t) { /* And then convert it to a 64bit timespec */ *t = valid_timespec_to_timespec64(tr); - __clib2->__timer_busy = FALSE; + __clib4->__timer_busy = FALSE; RETURN(0); return 0; } diff --git a/library/time/clock_nanosleep.c b/library/time/clock_nanosleep.c index 390df238..a2eb8bb0 100644 --- a/library/time/clock_nanosleep.c +++ b/library/time/clock_nanosleep.c @@ -1,5 +1,5 @@ /* - * $Id: time_clock_nanosleep.c,v 1.0 2021-03-01 17:55:42 clib2devs Exp $ + * $Id: time_clock_nanosleep.c,v 1.0 2021-03-01 17:55:42 clib4devs Exp $ */ #ifndef _TIME_HEADERS_H diff --git a/library/time/clock_settime.c b/library/time/clock_settime.c index a58a864e..6e3f715d 100644 --- a/library/time/clock_settime.c +++ b/library/time/clock_settime.c @@ -1,5 +1,5 @@ /* - * $Id: time_settime.c,v 1.0 2020-01-13 17:20:12 clib2devs Exp $ + * $Id: time_settime.c,v 1.0 2020-01-13 17:20:12 clib4devs Exp $ */ #ifndef _TIME_HEADERS_H @@ -17,7 +17,7 @@ int clock_settime(clockid_t clk_id, const struct timespec *t) { ENTER(); - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; int result = -1; @@ -27,7 +27,7 @@ clock_settime(clockid_t clk_id, const struct timespec *t) { return -1; } - if (__clib2->__timer_busy) { + if (__clib4->__timer_busy) { __set_errno(EAGAIN); RETURN(result); return result; @@ -44,15 +44,15 @@ clock_settime(clockid_t clk_id, const struct timespec *t) { if (ITimezone) { GetTimezoneAttrs(NULL, TZA_UTCOffset, &__gmtoffset, TZA_TimeFlag, &__dstime, TAG_DONE); } - __clib2->__timer_busy = TRUE; - __clib2->__timer_request->Request.io_Message.mn_ReplyPort = __clib2->__timer_port; - __clib2->__timer_request->Request.io_Command = TR_SETSYSTIME; + __clib4->__timer_busy = TRUE; + __clib4->__timer_request->Request.io_Message.mn_ReplyPort = __clib4->__timer_port; + __clib4->__timer_request->Request.io_Command = TR_SETSYSTIME; /* 2922 is the number of days between 1.1.1970 and 1.1.1978 */ - __clib2->__timer_request->Time.Seconds = t->tv_sec - ((2922 * 24 * 60 + __gmtoffset) * 60); - __clib2->__timer_request->Time.Microseconds = t->tv_nsec / 1000; + __clib4->__timer_request->Time.Seconds = t->tv_sec - ((2922 * 24 * 60 + __gmtoffset) * 60); + __clib4->__timer_request->Time.Microseconds = t->tv_nsec / 1000; - DoIO((struct IORequest *) __clib2->__timer_request); - GetMsg(__clib2->__timer_port); + DoIO((struct IORequest *) __clib4->__timer_request); + GetMsg(__clib4->__timer_port); result = 0; __set_errno(0); @@ -62,8 +62,8 @@ clock_settime(clockid_t clk_id, const struct timespec *t) { case CLOCK_MONOTONIC: { struct timeval tv; TIMESPEC_TO_TIMEVAL(&tv, t); - __clib2->clock.tv_sec = tv.tv_sec; - __clib2->clock.tv_usec = tv.tv_usec; + __clib4->clock.tv_sec = tv.tv_sec; + __clib4->clock.tv_usec = tv.tv_usec; } break; @@ -72,7 +72,7 @@ clock_settime(clockid_t clk_id, const struct timespec *t) { break; } - __clib2->__timer_busy = FALSE; + __clib4->__timer_busy = FALSE; RETURN(result); return result; diff --git a/library/time/convert_datestamp.c b/library/time/convert_datestamp.c index 88afe1fc..0c4bbde1 100644 --- a/library/time/convert_datestamp.c +++ b/library/time/convert_datestamp.c @@ -1,5 +1,5 @@ /* - * $Id: time_convert_datestamp.c,v 1.3 2006-01-08 12:04:27 clib2devs Exp $ + * $Id: time_convert_datestamp.c,v 1.3 2006-01-08 12:04:27 clib4devs Exp $ */ #ifndef _TIME_HEADERS_H @@ -13,20 +13,20 @@ time_t __convert_datestamp_to_time(const struct DateStamp *ds) { time_t result; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); - __locale_lock(__clib2); + __locale_lock(__clib4); /* If possible, adjust for the local time zone. We do this because the AmigaOS system time is returned in local time and we want to return it in UTC. */ result = UNIX_TIME_OFFSET + ds->ds_Days * (24 * 60 * 60) + ds->ds_Minute * 60 + (ds->ds_Tick / TICKS_PER_SECOND); - if (__clib2->__default_locale != NULL) - result += 60 * __clib2->__default_locale->loc_GMTOffset; + if (__clib4->__default_locale != NULL) + result += 60 * __clib4->__default_locale->loc_GMTOffset; - __locale_unlock(__clib2); + __locale_unlock(__clib4); RETURN(result); return (result); diff --git a/library/time/convert_time.c b/library/time/convert_time.c index 65f3fca8..350f5db3 100644 --- a/library/time/convert_time.c +++ b/library/time/convert_time.c @@ -1,5 +1,5 @@ /* - * $Id: time_convert_time.c,v 2.0 2023-05-26 12:04:27 clib2devs Exp $ + * $Id: time_convert_time.c,v 2.0 2023-05-26 12:04:27 clib4devs Exp $ */ #ifndef _TIME_HEADERS_H @@ -171,18 +171,18 @@ int __secs_to_tm(long long t, struct tm *tm) { BOOL __convert_time_to_datestamp(time_t time_value, struct DateStamp *ds) { BOOL success; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; /* Adjust the time to the AmigaOS epoch. */ time_value -= UNIX_TIME_OFFSET; - __locale_lock(__clib2); + __locale_lock(__clib4); /* If possible, adjust the time to match the local time zone settings. */ - if (__clib2->__default_locale != NULL) - time_value -= 60 * __clib2->__default_locale->loc_GMTOffset; + if (__clib4->__default_locale != NULL) + time_value -= 60 * __clib4->__default_locale->loc_GMTOffset; - __locale_unlock(__clib2); + __locale_unlock(__clib4); ds->ds_Days = (time_value / (24 * 60 * 60)); ds->ds_Minute = (time_value % (24 * 60 * 60)) / 60; diff --git a/library/time/converttime.c b/library/time/converttime.c index a39f88ee..47c6988e 100644 --- a/library/time/converttime.c +++ b/library/time/converttime.c @@ -1,5 +1,5 @@ /* - * $Id: time_converttime.c,v 2.0 2023-05-26 12:04:27 clib2devs Exp $ + * $Id: time_converttime.c,v 2.0 2023-05-26 12:04:27 clib4devs Exp $ */ #ifndef _TIME_HEADERS_H @@ -14,7 +14,7 @@ struct tm * __convert_time(ULONG seconds, LONG gmt_offset, struct tm *tm) { struct ClockData clock_data; struct tm *result; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; DECLARE_UTILITYBASE(); DECLARE_TIMEZONEBASE(); int8 dstime = -1; @@ -55,9 +55,9 @@ __convert_time(ULONG seconds, LONG gmt_offset, struct tm *tm) { tm->tm_mon = clock_data.month - 1; tm->tm_year = clock_data.year - 1900; tm->tm_wday = clock_data.wday; - tm->tm_isdst = __clib2->__daylight; - tm->tm_zone = __clib2->__tzname[0]; - tm->tm_gmtoff = __clib2->__timezone / 60; + tm->tm_isdst = __clib4->__daylight; + tm->tm_zone = __clib4->__tzname[0]; + tm->tm_gmtoff = __clib4->__timezone / 60; /* Now figure out how many days have passed since January 1st. */ tm->tm_yday = __calculate_days_per_date(clock_data.year, clock_data.month, clock_data.mday) - diff --git a/library/time/ctime.c b/library/time/ctime.c index d21623dc..eb71527a 100644 --- a/library/time/ctime.c +++ b/library/time/ctime.c @@ -1,5 +1,5 @@ /* - * $Id: time_ctime.c,v 1.6 2006-01-08 12:04:27 clib2devs Exp $ + * $Id: time_ctime.c,v 1.6 2006-01-08 12:04:27 clib4devs Exp $ */ #ifndef _TIME_HEADERS_H diff --git a/library/time/ctime_r.c b/library/time/ctime_r.c index a839a865..1ef8c446 100644 --- a/library/time/ctime_r.c +++ b/library/time/ctime_r.c @@ -1,5 +1,5 @@ /* - * $Id: time_ctime_r.c,v 1.4 2006-01-08 12:04:27 clib2devs Exp $ + * $Id: time_ctime_r.c,v 1.4 2006-01-08 12:04:27 clib4devs Exp $ */ #ifndef _TIME_HEADERS_H diff --git a/library/time/data.c b/library/time/data.c index cb09a35d..151b7aae 100644 --- a/library/time/data.c +++ b/library/time/data.c @@ -1,5 +1,5 @@ /* - * $Id: time_data.c,v 1.5 2006-01-08 12:04:27 clib2devs Exp $ + * $Id: time_data.c,v 1.5 2006-01-08 12:04:27 clib4devs Exp $ */ #ifndef _TIME_HEADERS_H diff --git a/library/time/days_per_date.c b/library/time/days_per_date.c index 5c6d2090..af87e5b0 100644 --- a/library/time/days_per_date.c +++ b/library/time/days_per_date.c @@ -1,5 +1,5 @@ /* - * $Id: time_days_per_date.c,v 1.2 2006-01-08 12:04:27 clib2devs Exp $ + * $Id: time_days_per_date.c,v 1.2 2006-01-08 12:04:27 clib4devs Exp $ */ /****************************************************************************/ diff --git a/library/time/difftime.c b/library/time/difftime.c index c3436f71..d5616464 100644 --- a/library/time/difftime.c +++ b/library/time/difftime.c @@ -1,5 +1,5 @@ /* - * $Id: time_difftime.c,v 1.3 2006-01-08 12:04:27 clib2devs Exp $ + * $Id: time_difftime.c,v 1.3 2006-01-08 12:04:27 clib4devs Exp $ */ #ifndef _TIME_HEADERS_H diff --git a/library/time/ftime.c b/library/time/ftime.c index 754b797e..303c3859 100644 --- a/library/time/ftime.c +++ b/library/time/ftime.c @@ -1,5 +1,5 @@ /* - * $Id: timeb_ftime.c,v 1.2 2006-07-28 14:37:27 clib2devs Exp $ + * $Id: timeb_ftime.c,v 1.2 2006-07-28 14:37:27 clib4devs Exp $ */ #include diff --git a/library/time/getitimer.c b/library/time/getitimer.c index 841adde1..910ddf31 100644 --- a/library/time/getitimer.c +++ b/library/time/getitimer.c @@ -1,5 +1,5 @@ /* - * $Id: time_getitimer.c,v 1.0 2022-03-14 18:06:24 clib2devs Exp $ + * $Id: time_getitimer.c,v 1.0 2022-03-14 18:06:24 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H @@ -34,7 +34,7 @@ timeval_subtract(struct timeval *result, struct timeval *x, struct timeval *y) { int getitimer(int which, struct itimerval *curr_value) { - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; if (which < ITIMER_REAL || which > ITIMER_PROF) { __set_errno(EINVAL); @@ -51,11 +51,11 @@ getitimer(int which, struct itimerval *curr_value) { struct timeval tv, result; /* Get current time of day */ gettimeofday(&tv, NULL); - timeval_subtract(&result, &tv, &__clib2->tmr_start_time); + timeval_subtract(&result, &tv, &__clib4->tmr_start_time); curr_value->it_value.tv_sec = result.tv_sec; curr_value->it_value.tv_usec = result.tv_usec; - curr_value->it_interval.tv_sec = __clib2->tmr_time.it_interval.tv_sec; - curr_value->it_interval.tv_usec = __clib2->tmr_time.it_interval.tv_usec; + curr_value->it_interval.tv_sec = __clib4->tmr_time.it_interval.tv_sec; + curr_value->it_interval.tv_usec = __clib4->tmr_time.it_interval.tv_usec; } break; case ITIMER_VIRTUAL: diff --git a/library/time/gettimeofday.c b/library/time/gettimeofday.c index 18593a50..172cf8b8 100644 --- a/library/time/gettimeofday.c +++ b/library/time/gettimeofday.c @@ -1,5 +1,5 @@ /* - * $Id: time_gettimeofday.c,v 1.12 2006-12-28 14:30:57 clib2devs Exp $ + * $Id: time_gettimeofday.c,v 1.12 2006-12-28 14:30:57 clib4devs Exp $ */ #ifndef PROTO_TIMER_H @@ -20,7 +20,7 @@ int gettimeofday(struct timeval *tp, struct timezone *tzp) { - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; int32 gmtoffset = 0; int8 dstime = -1; ULONG seconds, microseconds; @@ -30,12 +30,12 @@ gettimeofday(struct timeval *tp, struct timezone *tzp) { ENTER(); - if (!__clib2->__ITimer) { + if (!__clib4->__ITimer) { tp->tv_sec = tp->tv_usec = tzp->tz_minuteswest = tzp->tz_dsttime = 0; RETURN(0); } - ObtainSemaphore(__clib2->__timer_semaphore); + ObtainSemaphore(__clib4->__timer_semaphore); GetTimezoneAttrs(NULL, TZA_UTCOffset, &gmtoffset, TZA_TimeFlag, &dstime, TAG_DONE); @@ -60,7 +60,7 @@ gettimeofday(struct timeval *tp, struct timezone *tzp) { } #endif /* __NEW_TIMEVAL_DEFINITION_USED__ */ - ReleaseSemaphore(__clib2->__timer_semaphore); + ReleaseSemaphore(__clib4->__timer_semaphore); /* Convert the number of seconds so that they match the Unix epoch, which starts (January 1st, 1970) eight years before the AmigaOS epoch. */ diff --git a/library/time/gmtime.c b/library/time/gmtime.c index d63fceb6..b433f587 100644 --- a/library/time/gmtime.c +++ b/library/time/gmtime.c @@ -1,5 +1,5 @@ /* - * $Id: time_gmtime.c,v 1.5 2006-01-08 12:04:27 clib2devs Exp $ + * $Id: time_gmtime.c,v 1.5 2006-01-08 12:04:27 clib4devs Exp $ */ #ifndef _TIME_HEADERS_H diff --git a/library/time/gmtime_r.c b/library/time/gmtime_r.c index d18ca452..3ae316bb 100644 --- a/library/time/gmtime_r.c +++ b/library/time/gmtime_r.c @@ -1,5 +1,5 @@ /* - * $Id: time_gmtime_r.c,v 1.4 2006-01-08 12:04:27 clib2devs Exp $ + * $Id: time_gmtime_r.c,v 1.4 2006-01-08 12:04:27 clib4devs Exp $ */ #ifndef _TIME_HEADERS_H diff --git a/library/time/itimer_tasks.c b/library/time/itimer_tasks.c index f56faf88..71b60a79 100644 --- a/library/time/itimer_tasks.c +++ b/library/time/itimer_tasks.c @@ -1,5 +1,5 @@ /* - * $Id: time_itimer_tasks.c,v 1.0 2022-03-15 08:39:45 clib2devs Exp $ + * $Id: time_itimer_tasks.c,v 1.0 2022-03-15 08:39:45 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H @@ -31,9 +31,9 @@ int itimer_real_task() { struct Process *thisTask = (struct Process *) FindTask(NULL); struct itimer *_itimer = (struct itimer *) thisTask->pr_Task.tc_UserData; - struct _clib2 *__clib2 = _itimer->__clib2; + struct _clib4 *__clib4 = _itimer->__clib4; - SHOWPOINTER(__clib2); + SHOWPOINTER(__clib4); SHOWVALUE(_itimer->which); /* Create itimer timers and message ports */ @@ -58,13 +58,13 @@ int itimer_real_task() { } tmr_real_tr->Request.io_Command = TR_ADDREQUEST; - tmr_real_tr->Time.Seconds = __clib2->tmr_time.it_value.tv_sec; - tmr_real_tr->Time.Microseconds = __clib2->tmr_time.it_value.tv_usec; + tmr_real_tr->Time.Seconds = __clib4->tmr_time.it_value.tv_sec; + tmr_real_tr->Time.Microseconds = __clib4->tmr_time.it_value.tv_usec; /* Loop until timer expires and restart or we interrupt it */ while (TRUE) { /* Get current time of day */ - gettimeofday(&__clib2->tmr_start_time, NULL); + gettimeofday(&__clib4->tmr_start_time, NULL); /* Set wait mask */ wait_mask = SIGBREAKF_CTRL_F | SIGBREAKF_CTRL_D | (1L << tmr_real_mp->mp_SigBit); /* Reset signals */ @@ -88,24 +88,24 @@ int itimer_real_task() { WaitIO((struct IORequest *) tmr_real_tr); /* clean up and remove reply */ AbortIO((struct IORequest *) tmr_real_tr); - tmr_real_tr->Time.Seconds = __clib2->tmr_time.it_value.tv_sec; - tmr_real_tr->Time.Microseconds = __clib2->tmr_time.it_value.tv_usec; + tmr_real_tr->Time.Seconds = __clib4->tmr_time.it_value.tv_sec; + tmr_real_tr->Time.Microseconds = __clib4->tmr_time.it_value.tv_usec; } else { if (CheckIO((struct IORequest *) tmr_real_tr)) WaitIO((struct IORequest *) tmr_real_tr); - tmr_real_tr->Time.Seconds += __clib2->tmr_time.it_interval.tv_sec; - tmr_real_tr->Time.Microseconds += __clib2->tmr_time.it_interval.tv_usec; + tmr_real_tr->Time.Seconds += __clib4->tmr_time.it_interval.tv_sec; + tmr_real_tr->Time.Microseconds += __clib4->tmr_time.it_interval.tv_usec; /* If SIGALRM is blocked kill the timer */ - if (FLAG_IS_SET(__clib2->__signals_blocked, (1 << SIGALRM))) { + if (FLAG_IS_SET(__clib4->__signals_blocked, (1 << SIGALRM))) { break; } raise(SIGALRM); /* Check again if SIGALRM is blocked and then kill the timer */ - if (FLAG_IS_SET(__clib2->__signals_blocked, (1 << SIGALRM))) { + if (FLAG_IS_SET(__clib4->__signals_blocked, (1 << SIGALRM))) { break; } } diff --git a/library/time/localtime.c b/library/time/localtime.c index 9bd51a47..6201de06 100644 --- a/library/time/localtime.c +++ b/library/time/localtime.c @@ -1,5 +1,5 @@ /* - * $Id: time_localtime.c,v 1.5 2006-01-08 12:04:27 clib2devs Exp $ + * $Id: time_localtime.c,v 1.5 2006-01-08 12:04:27 clib4devs Exp $ */ #ifndef _TIME_HEADERS_H diff --git a/library/time/localtime_r.c b/library/time/localtime_r.c index 0e2ab52c..db63d60e 100644 --- a/library/time/localtime_r.c +++ b/library/time/localtime_r.c @@ -1,5 +1,5 @@ /* - * $Id: time_localtime_r.c,v 1.6 2006-01-08 12:04:27 clib2devs Exp $ + * $Id: time_localtime_r.c,v 1.6 2006-01-08 12:04:27 clib4devs Exp $ */ #ifndef _TIME_HEADERS_H @@ -14,7 +14,7 @@ struct tm * localtime_r(const time_t *t, struct tm *tm_ptr) { struct tm *result = NULL; LONG gmt_offset; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); @@ -25,17 +25,17 @@ localtime_r(const time_t *t, struct tm *tm_ptr) { goto out; } - __locale_lock(__clib2); + __locale_lock(__clib4); /* The time parameter given represents UTC and * must be converted to local time before we proceed. */ - if (__clib2->__default_locale != NULL) - gmt_offset = 60 * __clib2->__default_locale->loc_GMTOffset; + if (__clib4->__default_locale != NULL) + gmt_offset = 60 * __clib4->__default_locale->loc_GMTOffset; else gmt_offset = 0; - __locale_unlock(__clib2); + __locale_unlock(__clib4); SHOWVALUE(gmt_offset); diff --git a/library/time/mktime.c b/library/time/mktime.c index b914a4b1..6a9d6e32 100644 --- a/library/time/mktime.c +++ b/library/time/mktime.c @@ -1,5 +1,5 @@ /* - * $Id: time_mktime.c,v 1.11 2015-06-26 11:22:00 clib2devs Exp $ + * $Id: time_mktime.c,v 1.11 2015-06-26 11:22:00 clib4devs Exp $ */ #ifndef _TIME_HEADERS_H @@ -18,7 +18,7 @@ mktime(struct tm *tm) { time_t result = (time_t) - 1; LONG combined_seconds; int month, year; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); @@ -86,14 +86,14 @@ mktime(struct tm *tm) { seconds += combined_seconds; - __locale_lock(__clib2); + __locale_lock(__clib4); /* The data in 'struct tm *tm' was given in local time. We need to convert the result into UTC. */ - if (__clib2->__default_locale != NULL) - seconds += 60 * __clib2->__default_locale->loc_GMTOffset; + if (__clib4->__default_locale != NULL) + seconds += 60 * __clib4->__default_locale->loc_GMTOffset; - __locale_unlock(__clib2); + __locale_unlock(__clib4); /* Adjust for the difference between the Unix and the AmigaOS epochs, which differ by 8 years. */ diff --git a/library/time/nanosleep.c b/library/time/nanosleep.c index c78f0e6b..eae88dc9 100644 --- a/library/time/nanosleep.c +++ b/library/time/nanosleep.c @@ -1,5 +1,5 @@ /* - * $Id: unistd_usleep.c,v 1.4 2021-02-02 18:49:27 clib2devs Exp $ + * $Id: unistd_usleep.c,v 1.4 2021-02-02 18:49:27 clib4devs Exp $ */ #ifndef _TIME_HEADERS_H diff --git a/library/time/numbertostring.c b/library/time/numbertostring.c index 0845cddd..51806fc2 100644 --- a/library/time/numbertostring.c +++ b/library/time/numbertostring.c @@ -1,5 +1,5 @@ /* - * $Id: time_numbertostring.c,v 1.3 2006-01-08 12:04:27 clib2devs Exp $ + * $Id: time_numbertostring.c,v 1.3 2006-01-08 12:04:27 clib4devs Exp $ */ #ifndef _TIME_HEADERS_H diff --git a/library/time/rdtsc.c b/library/time/rdtsc.c index de26c67c..7b6a6d21 100644 --- a/library/time/rdtsc.c +++ b/library/time/rdtsc.c @@ -1,5 +1,5 @@ /* - * $Id: time_srdtsc.c,v 1.1 2023-02-22 18:06:24 clib2devs Exp $ + * $Id: time_srdtsc.c,v 1.1 2023-02-22 18:06:24 clib4devs Exp $ */ #include diff --git a/library/time/setitimer.c b/library/time/setitimer.c index 5f3f2f6a..65a9c11f 100644 --- a/library/time/setitimer.c +++ b/library/time/setitimer.c @@ -1,5 +1,5 @@ /* - * $Id: time_setitimer.c,v 1.0 2022-03-14 18:06:24 clib2devs Exp $ + * $Id: time_setitimer.c,v 1.0 2022-03-14 18:06:24 clib4devs Exp $ * */ @@ -14,7 +14,7 @@ int setitimer(int which, const struct itimerval *new_value, struct itimerval *old_value) { ENTER(); - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; struct itimer _itimer; if (which < ITIMER_REAL || which > ITIMER_PROF) { @@ -28,48 +28,48 @@ setitimer(int which, const struct itimerval *new_value, struct itimerval *old_va } _itimer.which = which; - _itimer.__clib2 = __clib2; + _itimer.__clib4 = __clib4; switch (which) { case ITIMER_REAL: if (old_value != NULL) { /* Store the current time value in old_value */ - old_value->it_value.tv_sec = __clib2->tmr_time.it_value.tv_sec; - old_value->it_value.tv_usec = __clib2->tmr_time.it_value.tv_usec; - old_value->it_interval.tv_sec = __clib2->tmr_time.it_interval.tv_sec; - old_value->it_interval.tv_usec = __clib2->tmr_time.it_interval.tv_usec; + old_value->it_value.tv_sec = __clib4->tmr_time.it_value.tv_sec; + old_value->it_value.tv_usec = __clib4->tmr_time.it_value.tv_usec; + old_value->it_interval.tv_sec = __clib4->tmr_time.it_interval.tv_sec; + old_value->it_interval.tv_usec = __clib4->tmr_time.it_interval.tv_usec; } - __clib2->tmr_time.it_value.tv_sec = new_value->it_value.tv_sec; - __clib2->tmr_time.it_value.tv_usec = new_value->it_value.tv_usec; - __clib2->tmr_time.it_interval.tv_sec = new_value->it_interval.tv_sec; - __clib2->tmr_time.it_interval.tv_usec = new_value->it_interval.tv_usec; + __clib4->tmr_time.it_value.tv_sec = new_value->it_value.tv_sec; + __clib4->tmr_time.it_value.tv_usec = new_value->it_value.tv_usec; + __clib4->tmr_time.it_interval.tv_sec = new_value->it_interval.tv_sec; + __clib4->tmr_time.it_interval.tv_usec = new_value->it_interval.tv_usec; /* If we have a previous running task stop it */ - if (__clib2->tmr_real_task != NULL && (new_value->it_value.tv_sec != 0 || new_value->it_value.tv_usec != 0)) { - Signal((struct Task *)__clib2->tmr_real_task, SIGBREAKF_CTRL_D); + if (__clib4->tmr_real_task != NULL && (new_value->it_value.tv_sec != 0 || new_value->it_value.tv_usec != 0)) { + Signal((struct Task *)__clib4->tmr_real_task, SIGBREAKF_CTRL_D); } - else if (__clib2->tmr_real_task == NULL) { + else if (__clib4->tmr_real_task == NULL) { /* Create timer tasks */ if ((new_value->it_value.tv_sec != 0 || new_value->it_value.tv_usec != 0)) { - __clib2->tmr_real_task = CreateNewProcTags( - NP_Name, "CLIB2_ITIMER_REAL_TASK", + __clib4->tmr_real_task = CreateNewProcTags( + NP_Name, "CLIB4_ITIMER_REAL_TASK", NP_Entry, itimer_real_task, NP_EntryData, GetEntryData(), NP_Child, TRUE, - NP_UserData, (struct _clib2 *) &_itimer, + NP_UserData, (struct _clib4 *) &_itimer, NP_Output, DupFileHandle(Output()), NP_CloseOutput, TRUE, TAG_END); - if (!__clib2->tmr_real_task) { + if (!__clib4->tmr_real_task) { __set_errno(EFAULT); return -1; } } } else { - int pid = __clib2->tmr_real_task->pr_ProcessID; - Signal((struct Task *)__clib2->tmr_real_task, SIGBREAKF_CTRL_F); + int pid = __clib4->tmr_real_task->pr_ProcessID; + Signal((struct Task *)__clib4->tmr_real_task, SIGBREAKF_CTRL_F); WaitForChildExit(pid); } diff --git a/library/time/settimeofday.c b/library/time/settimeofday.c index 23c9beec..e9b824fa 100644 --- a/library/time/settimeofday.c +++ b/library/time/settimeofday.c @@ -1,5 +1,5 @@ /* - * $Id: time_settimeofday.c,v 1.0 2022-02-24 18:31:57 clib2devs Exp $ + * $Id: time_settimeofday.c,v 1.0 2022-02-24 18:31:57 clib4devs Exp $ */ #ifndef _TIME_HEADERS_H @@ -17,35 +17,35 @@ int settimeofday(const struct timeval *t, const struct timezone *tz) { ENTER(); - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; int result = -1; int32 __gmtoffset = 0; - if (__clib2->__timer_busy) { + if (__clib4->__timer_busy) { __set_errno(EPERM); RETURN(result); return result; } - __clib2->__timer_busy = TRUE; + __clib4->__timer_busy = TRUE; - __clib2->__timer_request->Request.io_Message.mn_ReplyPort = __clib2->__timer_port; - __clib2->__timer_request->Request.io_Command = TR_SETSYSTIME; + __clib4->__timer_request->Request.io_Message.mn_ReplyPort = __clib4->__timer_port; + __clib4->__timer_request->Request.io_Command = TR_SETSYSTIME; if (tz != NULL) { __gmtoffset = tz->tz_minuteswest; } /* 2922 is the number of days between 1.1.1970 and 1.1.1978 */ - __clib2->__timer_request->Time.Seconds = t->tv_sec - ((2922 * 24 * 60 + __gmtoffset) * 60); - __clib2->__timer_request->Time.Microseconds = t->tv_usec; + __clib4->__timer_request->Time.Seconds = t->tv_sec - ((2922 * 24 * 60 + __gmtoffset) * 60); + __clib4->__timer_request->Time.Microseconds = t->tv_usec; - DoIO((struct IORequest *) __clib2->__timer_request); - GetMsg(__clib2->__timer_port); + DoIO((struct IORequest *) __clib4->__timer_request); + GetMsg(__clib4->__timer_port); result = 0; __set_errno(0); - __clib2->__timer_busy = FALSE; + __clib4->__timer_busy = FALSE; RETURN(result); return result; diff --git a/library/time/strftime.c b/library/time/strftime.c index afe98520..edc2d46c 100644 --- a/library/time/strftime.c +++ b/library/time/strftime.c @@ -1,5 +1,5 @@ /* - * $Id: time_strftime.c,v 1.19 2006-04-05 06:43:56 clib2devs Exp $ + * $Id: time_strftime.c,v 1.19 2006-04-05 06:43:56 clib4devs Exp $ */ #ifndef _TIME_HEADERS_H @@ -101,7 +101,7 @@ format_date(const char *format, const struct tm *tm, struct Hook *hook) { char buffer[40] = {0}; const char *str; char c; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; assert(format != NULL && tm != NULL && hook != NULL); @@ -429,10 +429,10 @@ format_date(const char *format, const struct tm *tm, struct Hook *hook) { /* ISO 8601 offset of time zone from UTC (C99). */ case 'z': - __locale_lock(__clib2); + __locale_lock(__clib4); - if (__clib2->__default_locale != NULL) { - gmt_offset = __clib2->__default_locale->loc_GMTOffset; + if (__clib4->__default_locale != NULL) { + gmt_offset = __clib4->__default_locale->loc_GMTOffset; if (gmt_offset < 0) gmt_offset = (-gmt_offset); else if (gmt_offset > 0) @@ -441,7 +441,7 @@ format_date(const char *format, const struct tm *tm, struct Hook *hook) { gmt_offset = 0; } - __locale_unlock(__clib2); + __locale_unlock(__clib4); /* The GMT offset is given in minutes. We need to print it as a decimal number. */ @@ -457,13 +457,13 @@ format_date(const char *format, const struct tm *tm, struct Hook *hook) { store_string_via_hook("GMT", 3, hook); - __locale_lock(__clib2); + __locale_lock(__clib4); - if (__clib2->__default_locale != NULL) { + if (__clib4->__default_locale != NULL) { int hours_west_of_gmt; char sign = '?'; - hours_west_of_gmt = __clib2->__default_locale->loc_GMTOffset / 60; + hours_west_of_gmt = __clib4->__default_locale->loc_GMTOffset / 60; if (hours_west_of_gmt < 0) { sign = '+'; @@ -479,7 +479,7 @@ format_date(const char *format, const struct tm *tm, struct Hook *hook) { } } - __locale_unlock(__clib2); + __locale_unlock(__clib4); break; @@ -496,7 +496,7 @@ size_t strftime(char *s, size_t maxsize, const char *format, const struct tm *tm) { DECLARE_LOCALEBASE(); size_t result = 0; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); @@ -527,10 +527,10 @@ strftime(char *s, size_t maxsize, const char *format, const struct tm *tm) { hook.h_Entry = (HOOKFUNC) format_hook_function; hook.h_Data = &data; - __locale_lock(__clib2); + __locale_lock(__clib4); /* Try to use the locale.library date/time conversion function. */ - if (__clib2->__locale_table[LC_TIME] != NULL) { + if (__clib4->__locale_table[LC_TIME] != NULL) { struct DateStamp ds; struct tm tm_copy; time_t time_value; @@ -552,7 +552,7 @@ strftime(char *s, size_t maxsize, const char *format, const struct tm *tm) { assert(LocaleBase != NULL); - FormatDate(__clib2->__locale_table[LC_TIME], (STRPTR) format, &ds, &hook); + FormatDate(__clib4->__locale_table[LC_TIME], (STRPTR) format, &ds, &hook); } else { struct tm copy_tm; @@ -570,7 +570,7 @@ strftime(char *s, size_t maxsize, const char *format, const struct tm *tm) { format_date(format, tm, &hook); } - __locale_unlock(__clib2); + __locale_unlock(__clib4); (*data.buffer) = '\0'; diff --git a/library/time/strptime.c b/library/time/strptime.c index fa515e5d..1f41c479 100644 --- a/library/time/strptime.c +++ b/library/time/strptime.c @@ -1,5 +1,5 @@ /* - * $Id: time_strptime.c,v 1.0 2021-02-03 17:48:06 clib2devs Exp $ + * $Id: time_strptime.c,v 1.0 2021-02-03 17:48:06 clib4devs Exp $ */ #ifndef _TIME_HEADERS_H diff --git a/library/time/time.c b/library/time/time.c index 80084f39..ac2930ef 100644 --- a/library/time/time.c +++ b/library/time/time.c @@ -1,5 +1,5 @@ /* - * $Id: time_time.c,v 1.5 2006-01-08 12:04:27 clib2devs Exp $ + * $Id: time_time.c,v 1.5 2006-01-08 12:04:27 clib4devs Exp $ */ #ifndef _TIME_HEADERS_H diff --git a/library/time/time_headers.h b/library/time/time_headers.h index 27fabe9b..5eff607b 100755 --- a/library/time/time_headers.h +++ b/library/time/time_headers.h @@ -1,5 +1,5 @@ /* - * $Id: time_headers.h,v 1.12 2006-01-08 12:04:27 clib2devs Exp $ + * $Id: time_headers.h,v 1.12 2006-01-08 12:04:27 clib4devs Exp $ */ #ifndef _TIME_HEADERS_H @@ -92,7 +92,7 @@ #endif /* _DEBUG_H */ struct itimer { - struct _clib2 *__clib2; + struct _clib4 *__clib4; int which; }; diff --git a/library/time/timegm.c b/library/time/timegm.c index f5cbc269..ce7a5c9c 100644 --- a/library/time/timegm.c +++ b/library/time/timegm.c @@ -1,5 +1,5 @@ /* - * $Id: time_timegm.c,v 1.0 2023-07-10 12:04:27 clib2devs Exp $ + * $Id: time_timegm.c,v 1.0 2023-07-10 12:04:27 clib4devs Exp $ */ #define _DEFAULT_SOURCE diff --git a/library/time/times.c b/library/time/times.c index a60f1035..b331ad68 100644 --- a/library/time/times.c +++ b/library/time/times.c @@ -1,5 +1,5 @@ /* - * $Id: times_times.c,v 1.0 2021-02-07 12:42:45 clib2devs Exp $ + * $Id: times_times.c,v 1.0 2021-02-07 12:42:45 clib4devs Exp $ */ #ifndef _TIME_HEADERS_H diff --git a/library/time/timezone_headers.h b/library/time/timezone_headers.h index 138fc335..245cd463 100755 --- a/library/time/timezone_headers.h +++ b/library/time/timezone_headers.h @@ -1,5 +1,5 @@ /* - * $Id: timezone_headers.h,v 1.0 2020-01-15 10:00:23 clib2devs Exp $ + * $Id: timezone_headers.h,v 1.0 2020-01-15 10:00:23 clib4devs Exp $ */ #ifndef _TIMEZONE_HEADERS_H diff --git a/library/time/timezone_init_exit.c b/library/time/timezone_init_exit.c index 8e541452..7bbcaa05 100755 --- a/library/time/timezone_init_exit.c +++ b/library/time/timezone_init_exit.c @@ -1,5 +1,5 @@ /* - * $Id: timezone_init_exit.c,v 1.0 2021-01-15 10:01:23 clib2devs Exp $ + * $Id: timezone_init_exit.c,v 1.0 2021-01-15 10:01:23 clib4devs Exp $ */ #ifndef _TIMEZONE_HEADERS_H @@ -13,27 +13,27 @@ void __timezone_exit(void) { ENTER(); - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; __timezone_lock(); - if (__clib2->__TimezoneBase != NULL) { + if (__clib4->__TimezoneBase != NULL) { DECLARE_TIMEZONEBASE(); - if (__clib2->__dyntz == TRUE) { - if (__clib2->__tzname[0]) FreeVec(__clib2->__tzname[0]); - if (__clib2->__tzname[1]) FreeVec(__clib2->__tzname[1]); - __clib2->__tzname[0] = NULL; - __clib2->__tzname[1] = NULL; + if (__clib4->__dyntz == TRUE) { + if (__clib4->__tzname[0]) FreeVec(__clib4->__tzname[0]); + if (__clib4->__tzname[1]) FreeVec(__clib4->__tzname[1]); + __clib4->__tzname[0] = NULL; + __clib4->__tzname[1] = NULL; } - if (__clib2->__ITimezone != NULL) { - DropInterface((struct Interface *) __clib2->__ITimezone); - __clib2->__ITimezone = NULL; + if (__clib4->__ITimezone != NULL) { + DropInterface((struct Interface *) __clib4->__ITimezone); + __clib4->__ITimezone = NULL; } - CloseLibrary(__clib2->__TimezoneBase); - __clib2->__TimezoneBase = NULL; + CloseLibrary(__clib4->__TimezoneBase); + __clib4->__TimezoneBase = NULL; } __timezone_unlock(); @@ -46,50 +46,50 @@ __timezone_init(void) { ENTER(); int result = ERROR; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; __timezone_lock(); - if (__clib2->__TimezoneBase == NULL) { - __clib2->__TimezoneBase = OpenLibrary("timezone.library", 52); + if (__clib4->__TimezoneBase == NULL) { + __clib4->__TimezoneBase = OpenLibrary("timezone.library", 52); - if (__clib2->__TimezoneBase != NULL) { - __clib2->__ITimezone = (struct TimezoneIFace *) GetInterface(__clib2->__TimezoneBase, "main", 1, 0); - if (__clib2->__ITimezone == NULL) { - CloseLibrary(__clib2->__TimezoneBase); - __clib2->__TimezoneBase = NULL; + if (__clib4->__TimezoneBase != NULL) { + __clib4->__ITimezone = (struct TimezoneIFace *) GetInterface(__clib4->__TimezoneBase, "main", 1, 0); + if (__clib4->__ITimezone == NULL) { + CloseLibrary(__clib4->__TimezoneBase); + __clib4->__TimezoneBase = NULL; } } } - if (__clib2->__TimezoneBase != NULL) { + if (__clib4->__TimezoneBase != NULL) { DECLARE_TIMEZONEBASE(); // Set global timezone variable uint32 gmtoffset = 0; int8 dstime = -1; - __clib2->__tzname[0] = AllocVecTags(MAX_TZSIZE + 1, AVT_Type, MEMF_SHARED, AVT_ClearWithValue, 0, TAG_END); - __clib2->__tzname[1] = AllocVecTags(MAX_TZSIZE + 1, AVT_Type, MEMF_SHARED, AVT_ClearWithValue, 0, TAG_END); - __clib2->__dyntz = TRUE; + __clib4->__tzname[0] = AllocVecTags(MAX_TZSIZE + 1, AVT_Type, MEMF_SHARED, AVT_ClearWithValue, 0, TAG_END); + __clib4->__tzname[1] = AllocVecTags(MAX_TZSIZE + 1, AVT_Type, MEMF_SHARED, AVT_ClearWithValue, 0, TAG_END); + __clib4->__dyntz = TRUE; GetTimezoneAttrs(NULL, - TZA_Timezone, __clib2->__tzname[0], - TZA_TimezoneSTD, __clib2->__tzname[1], + TZA_Timezone, __clib4->__tzname[0], + TZA_TimezoneSTD, __clib4->__tzname[1], TZA_UTCOffset, &gmtoffset, TZA_TimeFlag, &dstime, TAG_DONE); - __clib2->__timezone = 60 * gmtoffset; - __clib2->__daylight = dstime & TFLG_ISDST; + __clib4->__timezone = 60 * gmtoffset; + __clib4->__daylight = dstime & TFLG_ISDST; result = OK; } else { /* default values */ - __clib2->__timezone = 0; - __clib2->__daylight = 0; - __clib2->__tzname[0] = (char *) "GMT"; - __clib2->__tzname[1] = (char *) "AMT"; - __clib2->__dyntz = FALSE; + __clib4->__timezone = 0; + __clib4->__daylight = 0; + __clib4->__tzname[0] = (char *) "GMT"; + __clib4->__tzname[1] = (char *) "AMT"; + __clib4->__dyntz = FALSE; } __timezone_unlock(); @@ -100,28 +100,28 @@ __timezone_init(void) { void __timezone_lock(void) { - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; - if (__clib2->timezone_lock != NULL) - ObtainSemaphore(__clib2->timezone_lock); + if (__clib4->timezone_lock != NULL) + ObtainSemaphore(__clib4->timezone_lock); } void __timezone_unlock(void) { - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; - if (__clib2->timezone_lock != NULL) - ReleaseSemaphore(__clib2->timezone_lock); + if (__clib4->timezone_lock != NULL) + ReleaseSemaphore(__clib4->timezone_lock); } CLIB_DESTRUCTOR(timezone_exit) { ENTER(); - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; __timezone_exit(); - __delete_semaphore(__clib2->timezone_lock); - __clib2->timezone_lock = NULL; + __delete_semaphore(__clib4->timezone_lock); + __clib4->timezone_lock = NULL; LEAVE(); } @@ -130,10 +130,10 @@ CLIB_CONSTRUCTOR(timezone_init) { ENTER(); BOOL success = FALSE; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; - __clib2->timezone_lock = __create_semaphore(); - if (__clib2->timezone_lock == NULL) + __clib4->timezone_lock = __create_semaphore(); + if (__clib4->timezone_lock == NULL) goto out; __timezone_init(); diff --git a/library/time/utime.c b/library/time/utime.c index 4c305308..eb927016 100644 --- a/library/time/utime.c +++ b/library/time/utime.c @@ -1,5 +1,5 @@ /* - * $Id: utime_utime.c,v 1.12 2006-01-08 12:04:27 clib2devs Exp $ + * $Id: utime_utime.c,v 1.12 2006-01-08 12:04:27 clib4devs Exp $ */ #ifndef _UTIME_HEADERS_H @@ -12,7 +12,7 @@ utime(const char *path_name, const struct utimbuf *times) { struct DateStamp ds; int result = ERROR; LONG status; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; assert(path_name != NULL); @@ -37,7 +37,7 @@ utime(const char *path_name, const struct utimbuf *times) { DateStamp(&ds); } - if (__clib2->__unix_path_semantics) { + if (__clib4->__unix_path_semantics) { if (path_name[0] == '\0') { SHOWMSG("no name given"); diff --git a/library/time/utime_headers.h b/library/time/utime_headers.h index 99f09e67..757251c0 100755 --- a/library/time/utime_headers.h +++ b/library/time/utime_headers.h @@ -1,5 +1,5 @@ /* - * $Id: utime_headers.h,v 1.4 2006-01-08 12:04:27 clib2devs Exp $ + * $Id: utime_headers.h,v 1.4 2006-01-08 12:04:27 clib4devs Exp $ */ #ifndef _UTIME_HEADERS_H diff --git a/library/time/utimes.c b/library/time/utimes.c index 10f84995..a6862e67 100644 --- a/library/time/utimes.c +++ b/library/time/utimes.c @@ -1,5 +1,5 @@ /* - * $Id: time_utimes.c,v 1.0 2022-02-24 18:08:57 clib2devs Exp $ + * $Id: time_utimes.c,v 1.0 2022-02-24 18:08:57 clib4devs Exp $ */ #ifndef _TIME_HEADERS_H @@ -16,7 +16,7 @@ int utimes(const char *name, const struct timeval *tvp) { struct name_translation_info path_name_nti; struct DateStamp ds; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); @@ -55,7 +55,7 @@ utimes(const char *name, const struct timeval *tvp) { } } - if (__clib2->__unix_path_semantics) { + if (__clib4->__unix_path_semantics) { if (__translate_unix_to_amiga_path_name(&name, &path_name_nti) != 0) { return -1; } diff --git a/library/time/weekday.c b/library/time/weekday.c index 8e9cf374..2b131293 100644 --- a/library/time/weekday.c +++ b/library/time/weekday.c @@ -1,5 +1,5 @@ /* - * $Id: time_weekday.c,v 1.2 2006-01-08 12:04:27 clib2devs Exp $ + * $Id: time_weekday.c,v 1.2 2006-01-08 12:04:27 clib4devs Exp $ */ #ifndef _TIME_HEADERS_H diff --git a/library/unistd/access.c b/library/unistd/access.c index f84718c1..1aac4031 100755 --- a/library/unistd/access.c +++ b/library/unistd/access.c @@ -1,5 +1,5 @@ /* - * $Id: unistd_access.c,v 1.10 2021-03-07 12:04:27 clib2devs Exp $ + * $Id: unistd_access.c,v 1.10 2021-03-07 12:04:27 clib4devs Exp $ */ #ifndef _UNISTD_HEADERS_H @@ -12,7 +12,7 @@ access(const char *path_name, int mode) { int result = ERROR; BPTR lock = BZERO; struct ExamineData *status = NULL; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); @@ -39,7 +39,7 @@ access(const char *path_name, int mode) { STRPTR actual_path_name = NULL; - if (__clib2->__unix_path_semantics) { + if (__clib4->__unix_path_semantics) { { if (path_name[0] == '\0') { SHOWMSG("no name given"); @@ -75,7 +75,7 @@ access(const char *path_name, int mode) { } if ((mode != F_OK) && (mode & (R_OK | W_OK | X_OK)) != 0) { - if (__clib2->__unix_path_semantics) { + if (__clib4->__unix_path_semantics) { if (lock == BZERO) { status = AllocDosObjectTags(DOS_EXAMINEDATA, TAG_END); if(!status) { diff --git a/library/unistd/alarm.c b/library/unistd/alarm.c index 7756dd1e..df5857f9 100644 --- a/library/unistd/alarm.c +++ b/library/unistd/alarm.c @@ -1,5 +1,5 @@ /* - * $Id: unistd_alarm.c.c,v 1.0 2022-03-16 09:34:24 clib2devs Exp $ + * $Id: unistd_alarm.c.c,v 1.0 2022-03-16 09:34:24 clib4devs Exp $ */ #ifndef _UNISTD_HEADERS_H diff --git a/library/unistd/chdir.c b/library/unistd/chdir.c index 40ab7cb9..110b8a82 100755 --- a/library/unistd/chdir.c +++ b/library/unistd/chdir.c @@ -1,5 +1,5 @@ /* - * $Id: unistd_chdir.c,v 1.9 2006-01-08 12:04:27 clib2devs Exp $ + * $Id: unistd_chdir.c,v 1.9 2006-01-08 12:04:27 clib4devs Exp $ */ #ifndef _UNISTD_HEADERS_H @@ -13,7 +13,7 @@ chdir(const char *path_name) { BPTR dir_lock = BZERO; struct ExamineData *status = NULL; int result = ERROR; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); @@ -30,7 +30,7 @@ chdir(const char *path_name) { goto out; } - if (__clib2->__unix_path_semantics) { + if (__clib4->__unix_path_semantics) { if (path_name[0] == '\0') { SHOWMSG("no name given"); @@ -80,24 +80,24 @@ chdir(const char *path_name) { goto out; } - if (__clib2->__current_directory_changed) { + if (__clib4->__current_directory_changed) { BPTR old_dir; old_dir = SetCurrentDir(dir_lock); - if (__clib2->__unlock_current_directory) + if (__clib4->__unlock_current_directory) UnLock(old_dir); } else { - __clib2->__original_current_directory = SetCurrentDir(dir_lock); + __clib4->__original_current_directory = SetCurrentDir(dir_lock); - __clib2->__current_directory_changed = TRUE; + __clib4->__current_directory_changed = TRUE; } - __clib2->__unlock_current_directory = TRUE; + __clib4->__unlock_current_directory = TRUE; dir_lock = BZERO; - if (__clib2->__unix_path_semantics) + if (__clib4->__unix_path_semantics) __restore_path_name(&path_name, &path_name_nti); /* ZZZ this must not fail */ diff --git a/library/unistd/chdir_exit.c b/library/unistd/chdir_exit.c index d08d260c..693e5574 100644 --- a/library/unistd/chdir_exit.c +++ b/library/unistd/chdir_exit.c @@ -1,5 +1,5 @@ /* - * $Id: unistd_chdir_exit.c,v 1.7 2006-01-08 12:04:27 clib2devs Exp $ + * $Id: unistd_chdir_exit.c,v 1.7 2006-01-08 12:04:27 clib4devs Exp $ */ #ifndef _UNISTD_HEADERS_H @@ -12,21 +12,21 @@ CLIB_DESTRUCTOR(__chdir_exit) { ENTER(); - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; - if (__clib2->__current_directory_changed) { + if (__clib4->__current_directory_changed) { BPTR old_dir; - old_dir = SetCurrentDir(__clib2->__original_current_directory); - __clib2->__original_current_directory = BZERO; + old_dir = SetCurrentDir(__clib4->__original_current_directory); + __clib4->__original_current_directory = BZERO; - if (__clib2->__unlock_current_directory) { + if (__clib4->__unlock_current_directory) { UnLock(old_dir); - __clib2->__unlock_current_directory = FALSE; + __clib4->__unlock_current_directory = FALSE; } - __clib2->__current_directory_changed = FALSE; + __clib4->__current_directory_changed = FALSE; } LEAVE(); diff --git a/library/unistd/chown.c b/library/unistd/chown.c index 0da8bfb1..a79874de 100755 --- a/library/unistd/chown.c +++ b/library/unistd/chown.c @@ -1,5 +1,5 @@ /* - * $Id: unistd_chown.c,v 1.12 2006-09-25 15:41:50 clib2devs Exp $ + * $Id: unistd_chown.c,v 1.12 2006-09-25 15:41:50 clib4devs Exp $ */ #ifndef _UNISTD_HEADERS_H @@ -13,7 +13,7 @@ int chown(const char *path_name, uid_t owner, gid_t group) { BOOL owner_changed = TRUE; struct ExamineData *status = NULL; int result = ERROR; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); @@ -32,7 +32,7 @@ int chown(const char *path_name, uid_t owner, gid_t group) { goto out; } - if (__clib2->__unix_path_semantics) { + if (__clib4->__unix_path_semantics) { if (path_name[0] == '\0') { SHOWMSG("no name given"); diff --git a/library/unistd/common_pathconf.c b/library/unistd/common_pathconf.c index 4ec92514..2dd16301 100644 --- a/library/unistd/common_pathconf.c +++ b/library/unistd/common_pathconf.c @@ -1,5 +1,5 @@ /* - * $Id: unistd_common_pathconf.c,v 1.4 2008-04-16 07:38:10 clib2devs Exp $ + * $Id: unistd_common_pathconf.c,v 1.4 2008-04-16 07:38:10 clib4devs Exp $ */ #ifndef _UNISTD_HEADERS_H diff --git a/library/unistd/dup.c b/library/unistd/dup.c index 96592641..e8c60762 100644 --- a/library/unistd/dup.c +++ b/library/unistd/dup.c @@ -1,5 +1,5 @@ /* - * $Id: unistd_dup.c,v 1.4 2006-01-08 12:04:27 clib2devs Exp $ + * $Id: unistd_dup.c,v 1.4 2006-01-08 12:04:27 clib4devs Exp $ */ #ifndef _UNISTD_HEADERS_H @@ -10,7 +10,7 @@ int dup(int file_descriptor1) { struct fd *fd1; int result = ERROR; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; int file_descriptor2 = -1; ENTER(); @@ -20,11 +20,11 @@ dup(int file_descriptor1) { __check_abort(); - __stdio_lock(__clib2); + __stdio_lock(__clib4); - assert(file_descriptor1 >= 0 && file_descriptor1 < __clib2->__num_fd); - assert(__clib2->__fd[file_descriptor1] != NULL); - assert(FLAG_IS_SET(__clib2->__fd[file_descriptor1]->fd_Flags, FDF_IN_USE)); + assert(file_descriptor1 >= 0 && file_descriptor1 < __clib4->__num_fd); + assert(__clib4->__fd[file_descriptor1] != NULL); + assert(FLAG_IS_SET(__clib4->__fd[file_descriptor1]->fd_Flags, FDF_IN_USE)); fd1 = __get_file_descriptor(file_descriptor1); if (fd1 == NULL) { @@ -34,15 +34,15 @@ dup(int file_descriptor1) { if (file_descriptor2 < 0) { /* Try to find a place to put the duplicate into. */ - file_descriptor2 = __find_vacant_fd_entry(__clib2); + file_descriptor2 = __find_vacant_fd_entry(__clib4); if (file_descriptor2 < 0) { /* No free space, so let's grow the table. */ - if (__grow_fd_table(__clib2, 0) < 0) { + if (__grow_fd_table(__clib4, 0) < 0) { SHOWMSG("not enough memory for new file descriptor"); goto out; } - file_descriptor2 = __find_vacant_fd_entry(__clib2); + file_descriptor2 = __find_vacant_fd_entry(__clib4); assert(file_descriptor2 >= 0); } } @@ -51,9 +51,9 @@ dup(int file_descriptor1) { struct fd *fd2; /* Have a look at the requested file descriptor. */ - assert(0 <= file_descriptor2 && file_descriptor2 < __clib2->__num_fd); + assert(0 <= file_descriptor2 && file_descriptor2 < __clib4->__num_fd); - fd2 = __clib2->__fd[file_descriptor2]; + fd2 = __clib4->__fd[file_descriptor2]; assert(fd2 != NULL); @@ -72,7 +72,7 @@ dup(int file_descriptor1) { out: - __stdio_unlock(__clib2); + __stdio_unlock(__clib4); RETURN(result); return (result); diff --git a/library/unistd/dup2.c b/library/unistd/dup2.c index 7cc87c24..db3bdcec 100644 --- a/library/unistd/dup2.c +++ b/library/unistd/dup2.c @@ -1,5 +1,5 @@ /* - * $Id: unistd_dup2.c,v 1.10 2006-01-08 12:04:27 clib2devs Exp $ + * $Id: unistd_dup2.c,v 1.10 2006-01-08 12:04:27 clib4devs Exp $ */ #ifndef _UNISTD_HEADERS_H @@ -10,7 +10,7 @@ int dup2(int file_descriptor1, int file_descriptor2) { struct fd *fd1; int result = ERROR; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); @@ -19,11 +19,11 @@ dup2(int file_descriptor1, int file_descriptor2) { __check_abort(); - __stdio_lock(__clib2); + __stdio_lock(__clib4); - assert(file_descriptor1 >= 0 && file_descriptor1 < __clib2->__num_fd); - assert(__clib2->__fd[file_descriptor1] != NULL); - assert(FLAG_IS_SET(__clib2->__fd[file_descriptor1]->fd_Flags, FDF_IN_USE)); + assert(file_descriptor1 >= 0 && file_descriptor1 < __clib4->__num_fd); + assert(__clib4->__fd[file_descriptor1] != NULL); + assert(FLAG_IS_SET(__clib4->__fd[file_descriptor1]->fd_Flags, FDF_IN_USE)); fd1 = __get_file_descriptor(file_descriptor1); if (fd1 == NULL) { @@ -36,20 +36,20 @@ dup2(int file_descriptor1, int file_descriptor2) { goto out; } else if (file_descriptor1 != file_descriptor2) { /* Make sure the requested duplicate exists. */ - if (__grow_fd_table(__clib2, file_descriptor2 + 1) < 0) + if (__grow_fd_table(__clib4, file_descriptor2 + 1) < 0) goto out; - assert(file_descriptor2 >= 0 && file_descriptor2 < __clib2->__num_fd); - assert(__clib2->__fd[file_descriptor2] != NULL); + assert(file_descriptor2 >= 0 && file_descriptor2 < __clib4->__num_fd); + assert(__clib4->__fd[file_descriptor2] != NULL); } if (file_descriptor1 != file_descriptor2) { struct fd *fd2; /* Have a look at the requested file descriptor. */ - assert(0 <= file_descriptor2 && file_descriptor2 < __clib2->__num_fd); + assert(0 <= file_descriptor2 && file_descriptor2 < __clib4->__num_fd); - fd2 = __clib2->__fd[file_descriptor2]; + fd2 = __clib4->__fd[file_descriptor2]; assert(fd2 != NULL); @@ -68,7 +68,7 @@ dup2(int file_descriptor1, int file_descriptor2) { out: - __stdio_unlock(__clib2); + __stdio_unlock(__clib4); RETURN(result); return (result); diff --git a/library/unistd/environ.c b/library/unistd/environ.c index f110428b..228afa36 100644 --- a/library/unistd/environ.c +++ b/library/unistd/environ.c @@ -1,5 +1,5 @@ /* - * $Id: unistd_environ.c,v 2.0 2023-05-17 08:00:27 clib2devs Exp $ + * $Id: unistd_environ.c,v 2.0 2023-05-17 08:00:27 clib4devs Exp $ */ #ifndef _UNISTD_HEADERS_H @@ -8,6 +8,6 @@ char *** __environ(void) { - struct _clib2 *__clib2 = __CLIB2; - return &__clib2->__environment; + struct _clib4 *__clib4 = __CLIB4; + return &__clib4->__environment; } \ No newline at end of file diff --git a/library/unistd/execl.c b/library/unistd/execl.c index 4fe732a3..4b34f750 100644 --- a/library/unistd/execl.c +++ b/library/unistd/execl.c @@ -1,5 +1,5 @@ /* - * $Id: unistd_execl.c,v 1.3 2006-08-02 08:00:27 clib2devs Exp $ + * $Id: unistd_execl.c,v 1.3 2006-08-02 08:00:27 clib4devs Exp $ */ #ifndef _UNISTD_HEADERS_H @@ -12,7 +12,7 @@ execl(const char *path, const char *arg0, ...) { int result = -1; size_t argc = 0; va_list args; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; /* If there are any, count the number of arguments supplied */ if (arg0 != NULL) { @@ -50,7 +50,7 @@ execl(const char *path, const char *arg0, ...) { argv[argc] = NULL; - result = execve(path, (char *const *) argv, __clib2->__environment); + result = execve(path, (char *const *) argv, __clib4->__environment); out: diff --git a/library/unistd/execle.c b/library/unistd/execle.c index d18f61eb..035932e4 100644 --- a/library/unistd/execle.c +++ b/library/unistd/execle.c @@ -1,5 +1,5 @@ /* - * $Id: unistd_execle.c,v 1.3 2006-08-02 06:49:47 clib2devs Exp $ + * $Id: unistd_execle.c,v 1.3 2006-08-02 06:49:47 clib4devs Exp $ */ #ifndef _UNISTD_HEADERS_H diff --git a/library/unistd/execlp.c b/library/unistd/execlp.c index 334bce75..a1ab5a7b 100644 --- a/library/unistd/execlp.c +++ b/library/unistd/execlp.c @@ -1,5 +1,5 @@ /* - * $Id: unistd_execlp.c,v 1.2 2006-08-02 06:49:47 clib2devs Exp $ + * $Id: unistd_execlp.c,v 1.2 2006-08-02 06:49:47 clib4devs Exp $ */ #ifndef _UNISTD_HEADERS_H diff --git a/library/unistd/execv.c b/library/unistd/execv.c index fabff601..3f162626 100644 --- a/library/unistd/execv.c +++ b/library/unistd/execv.c @@ -1,5 +1,5 @@ /* - * $Id: unistd_execv.c,v 1.3 2006-08-02 08:00:27 clib2devs Exp $ + * $Id: unistd_execv.c,v 1.3 2006-08-02 08:00:27 clib4devs Exp $ */ #ifndef _UNISTD_HEADERS_H @@ -9,9 +9,9 @@ int execv(const char *path, char *const argv[]) { int result; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; - result = execve(path, argv, __clib2->__environment); + result = execve(path, argv, __clib4->__environment); return (result); } diff --git a/library/unistd/execve.c b/library/unistd/execve.c index f8d47273..c2d47537 100644 --- a/library/unistd/execve.c +++ b/library/unistd/execve.c @@ -1,5 +1,5 @@ /* - * $Id: unistd_execve.c,v 1.13 2006-10-02 07:16:06 clib2devs Exp $ + * $Id: unistd_execve.c,v 1.13 2006-10-02 07:16:06 clib4devs Exp $ */ #ifndef _UNISTD_HEADERS_H @@ -60,7 +60,7 @@ get_first_script_line(const char *path, char **line_ptr) { size_t script_line_size = 0; size_t script_line_length = 0; LONG c; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; (*line_ptr) = NULL; @@ -81,7 +81,7 @@ get_first_script_line(const char *path, char **line_ptr) { char *new_script_line; /* Give the user a chance to bail out. */ - if (__clib2->__check_abort_enabled && (SetSignal(0, 0) & __clib2->__break_signal_mask) != 0) { + if (__clib4->__check_abort_enabled && (SetSignal(0, 0) & __clib4->__break_signal_mask) != 0) { __set_errno(EAGAIN); goto out; } @@ -186,7 +186,7 @@ find_command(const char *path, struct program_info **result_ptr) { const char *p; int error; char c; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; (*result_ptr) = NULL; @@ -250,7 +250,7 @@ find_command(const char *path, struct program_info **result_ptr) { do { /* Give the user a chance to bail out. */ - if (__clib2->__check_abort_enabled && (SetSignal(0, 0) & __clib2->__break_signal_mask) != 0) { + if (__clib4->__check_abort_enabled && (SetSignal(0, 0) & __clib4->__break_signal_mask) != 0) { error = EAGAIN; break; } diff --git a/library/unistd/execve_env_exit.c b/library/unistd/execve_env_exit.c index 4061ef3e..a4aae6a9 100644 --- a/library/unistd/execve_env_exit.c +++ b/library/unistd/execve_env_exit.c @@ -1,5 +1,5 @@ /* - * $Id: unistd_execve_env_exit.c,v 1.1 2006-08-02 08:00:27 clib2devs Exp $ + * $Id: unistd_execve_env_exit.c,v 1.1 2006-08-02 08:00:27 clib4devs Exp $ */ #ifndef _UNISTD_HEADERS_H diff --git a/library/unistd/execve_env_init.c b/library/unistd/execve_env_init.c index dcee410d..5f2db71f 100644 --- a/library/unistd/execve_env_init.c +++ b/library/unistd/execve_env_init.c @@ -1,5 +1,5 @@ /* - * $Id: unistd_execve_env_init.c,v 1.1 2006-08-02 08:00:28 clib2devs Exp $ + * $Id: unistd_execve_env_init.c,v 1.1 2006-08-02 08:00:28 clib4devs Exp $ */ #ifndef _UNISTD_HEADERS_H diff --git a/library/unistd/execve_exit.c b/library/unistd/execve_exit.c index a3286b49..44d7a60c 100644 --- a/library/unistd/execve_exit.c +++ b/library/unistd/execve_exit.c @@ -1,5 +1,5 @@ /* - * $Id: unistd_execve_exit.c,v 1.1 2006-08-06 08:15:42 clib2devs Exp $ + * $Id: unistd_execve_exit.c,v 1.1 2006-08-06 08:15:42 clib4devs Exp $ */ #ifndef _UNISTD_HEADERS_H diff --git a/library/unistd/execvp.c b/library/unistd/execvp.c index 70b9bf4f..fe1207f7 100644 --- a/library/unistd/execvp.c +++ b/library/unistd/execvp.c @@ -1,5 +1,5 @@ /* - * $Id: unistd_execvp.c,v 1.7 2006-09-25 14:51:15 clib2devs Exp $ + * $Id: unistd_execvp.c,v 1.7 2006-09-25 14:51:15 clib4devs Exp $ */ #ifndef _UNISTD_HEADERS_H @@ -13,7 +13,7 @@ execvp(const char *command, char *const argv[]) { char *path_copy = NULL; int result = -1; BOOL found_path_separators; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; /* Do not allow null command */ if (command == NULL || (*command) == '\0') { @@ -36,7 +36,7 @@ execvp(const char *command, char *const argv[]) { /* If it's an absolute or relative path name, it's easy. */ if (found_path_separators) { - result = execve(command, argv, __clib2->__environment); + result = execve(command, argv, __clib4->__environment); } else { size_t command_buffer_size = 0; const char *path_delimiter; @@ -51,7 +51,7 @@ execvp(const char *command, char *const argv[]) { lateron when we will be calling getenv() again. */ path = getenv("PATH"); if (path == NULL) - path = (char *) __clib2->__default_path; + path = (char *) __clib4->__default_path; path_copy = strdup(path); if (path_copy == NULL) { @@ -63,7 +63,7 @@ execvp(const char *command, char *const argv[]) { path_delimiter = getenv("PATH_SEPARATOR"); if (path_delimiter == NULL) - path_delimiter = __clib2->__default_path_delimiter; + path_delimiter = __clib4->__default_path_delimiter; while ((search_prefix = strsep(&path, path_delimiter)) != NULL) { if ((*search_prefix) == '\0') @@ -97,7 +97,7 @@ execvp(const char *command, char *const argv[]) { command_buffer[complete_path_len] = '\0'; /* Now try to run that command. */ - result = execve(command_buffer, argv, __clib2->__environment); + result = execve(command_buffer, argv, __clib4->__environment); /* Did it work? And if it didn't work, did it fail because the command to be run could not be executed? */ diff --git a/library/unistd/fchdir.c b/library/unistd/fchdir.c index b26b07a7..375a1f82 100644 --- a/library/unistd/fchdir.c +++ b/library/unistd/fchdir.c @@ -1,5 +1,5 @@ /* - * $Id: unistd_fchdir.c,v 1.0 2021-02-14 18:31:00 clib2devs Exp $ + * $Id: unistd_fchdir.c,v 1.0 2021-02-14 18:31:00 clib4devs Exp $ */ #ifndef _UNISTD_HEADERS_H diff --git a/library/unistd/fchown.c b/library/unistd/fchown.c index b7a60c5a..0dceb628 100644 --- a/library/unistd/fchown.c +++ b/library/unistd/fchown.c @@ -1,5 +1,5 @@ /* - * $Id: unistd_fchown.c,v 1.16 2021-01-31 14:39:23 clib2devs Exp $ + * $Id: unistd_fchown.c,v 1.16 2021-01-31 14:39:23 clib4devs Exp $ */ #ifndef _UNISTD_HEADERS_H @@ -15,7 +15,7 @@ fchown(int file_descriptor, uid_t owner, gid_t group) { int result = ERROR; struct fd *fd = NULL; LONG success; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); @@ -23,13 +23,13 @@ fchown(int file_descriptor, uid_t owner, gid_t group) { SHOWVALUE(owner); SHOWVALUE(group); - assert(file_descriptor >= 0 && file_descriptor < __clib2->__num_fd); - assert(__clib2->__fd[file_descriptor] != NULL); - assert(FLAG_IS_SET(__clib2->__fd[file_descriptor]->fd_Flags, FDF_IN_USE)); + assert(file_descriptor >= 0 && file_descriptor < __clib4->__num_fd); + assert(__clib4->__fd[file_descriptor] != NULL); + assert(FLAG_IS_SET(__clib4->__fd[file_descriptor]->fd_Flags, FDF_IN_USE)); __check_abort(); - __stdio_lock(__clib2); + __stdio_lock(__clib4); fd = __get_file_descriptor(file_descriptor); if (fd == NULL) { @@ -106,7 +106,7 @@ fchown(int file_descriptor, uid_t owner, gid_t group) { if (current_dir_changed) SetCurrentDir(old_current_dir); - __stdio_unlock(__clib2); + __stdio_unlock(__clib4); RETURN(result); return (result); diff --git a/library/unistd/fdatasync.c b/library/unistd/fdatasync.c index c7c3c625..ad5548fb 100644 --- a/library/unistd/fdatasync.c +++ b/library/unistd/fdatasync.c @@ -1,5 +1,5 @@ /* - * $Id: unistd_fdatasync.c,v 1.8 2006-01-08 12:04:27 clib2devs Exp $ + * $Id: unistd_fdatasync.c,v 1.8 2006-01-08 12:04:27 clib4devs Exp $ */ #ifndef _UNISTD_HEADERS_H @@ -14,7 +14,7 @@ int fdatasync(int file_descriptor) { struct fd *fd; int result = ERROR; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); @@ -22,11 +22,11 @@ fdatasync(int file_descriptor) { __check_abort(); - assert(file_descriptor >= 0 && file_descriptor < __clib2->__num_fd); - assert(__clib2->__fd[file_descriptor] != NULL); - assert(FLAG_IS_SET(__clib2->__fd[file_descriptor]->fd_Flags, FDF_IN_USE)); + assert(file_descriptor >= 0 && file_descriptor < __clib4->__num_fd); + assert(__clib4->__fd[file_descriptor] != NULL); + assert(FLAG_IS_SET(__clib4->__fd[file_descriptor]->fd_Flags, FDF_IN_USE)); - __stdio_lock(__clib2); + __stdio_lock(__clib4); fd = __get_file_descriptor(file_descriptor); if (fd == NULL) { @@ -44,7 +44,7 @@ fdatasync(int file_descriptor) { out: __fd_unlock(fd); - __stdio_unlock(__clib2); + __stdio_unlock(__clib4); RETURN(result); return (result); diff --git a/library/unistd/fdopen.c b/library/unistd/fdopen.c index 9da3e6fc..1b05a5ce 100644 --- a/library/unistd/fdopen.c +++ b/library/unistd/fdopen.c @@ -1,5 +1,5 @@ /* - * $Id: unistd_fdopen.c,v 1.7 2006-01-08 12:04:27 clib2devs Exp $ + * $Id: unistd_fdopen.c,v 1.7 2006-01-08 12:04:27 clib4devs Exp $ */ #ifndef _UNISTD_HEADERS_H @@ -10,7 +10,7 @@ FILE * fdopen(int file_descriptor, const char *type) { FILE *result = NULL; int slot_number; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); @@ -21,7 +21,7 @@ fdopen(int file_descriptor, const char *type) { __check_abort(); - __stdio_lock(__clib2); + __stdio_lock(__clib4); if (type == NULL) { SHOWMSG("invalid type parameter"); @@ -30,31 +30,31 @@ fdopen(int file_descriptor, const char *type) { goto out; } - slot_number = __find_vacant_iob_entry(__clib2); + slot_number = __find_vacant_iob_entry(__clib4); if (slot_number < 0) { - if (__grow_iob_table(__clib2, 0) < 0) { + if (__grow_iob_table(__clib4, 0) < 0) { SHOWMSG("not enough memory for a file buffer slot"); goto out; } - slot_number = __find_vacant_iob_entry(__clib2); + slot_number = __find_vacant_iob_entry(__clib4); assert(slot_number >= 0); } - assert(file_descriptor >= 0 && file_descriptor < __clib2->__num_fd); - assert(__clib2->__fd[file_descriptor] != NULL); - assert(FLAG_IS_SET(__clib2->__fd[file_descriptor]->fd_Flags, FDF_IN_USE)); + assert(file_descriptor >= 0 && file_descriptor < __clib4->__num_fd); + assert(__clib4->__fd[file_descriptor] != NULL); + assert(FLAG_IS_SET(__clib4->__fd[file_descriptor]->fd_Flags, FDF_IN_USE)); - if (__open_iob(__clib2, NULL, type, file_descriptor, slot_number) < 0) { + if (__open_iob(__clib4, NULL, type, file_descriptor, slot_number) < 0) { SHOWMSG("couldn't open the file for the file descriptor"); goto out; } - result = (FILE *) __clib2->__iob[slot_number]; + result = (FILE *) __clib4->__iob[slot_number]; out: - __stdio_unlock(__clib2); + __stdio_unlock(__clib4); RETURN(result); return (result); diff --git a/library/unistd/fdopen64.c b/library/unistd/fdopen64.c index b2c2db80..fa2f6448 100644 --- a/library/unistd/fdopen64.c +++ b/library/unistd/fdopen64.c @@ -1,5 +1,5 @@ /* - * $Id: unistd_fdopen64.c,v 1.0 2021-02-05 13:28:00 clib2devs Exp $ + * $Id: unistd_fdopen64.c,v 1.0 2021-02-05 13:28:00 clib4devs Exp $ */ #ifndef _UNISTD_HEADERS_H diff --git a/library/unistd/fileno.c b/library/unistd/fileno.c index 49ae6bd9..5a97fe7c 100644 --- a/library/unistd/fileno.c +++ b/library/unistd/fileno.c @@ -1,5 +1,5 @@ /* - * $Id: unistd_fileno.c,v 1.7 2006-01-08 12:04:27 clib2devs Exp $ + * $Id: unistd_fileno.c,v 1.7 2006-01-08 12:04:27 clib4devs Exp $ */ #ifndef _UNISTD_HEADERS_H @@ -10,7 +10,7 @@ int fileno(FILE *file) { struct iob *iob = (struct iob *) file; int result = ERROR; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); @@ -27,7 +27,7 @@ fileno(FILE *file) { goto out; } - assert(__is_valid_iob(__clib2, iob)); + assert(__is_valid_iob(__clib4, iob)); assert(FLAG_IS_SET(iob->iob_Flags, IOBF_IN_USE)); if (FLAG_IS_CLEAR(iob->iob_Flags, IOBF_IN_USE)) { @@ -35,9 +35,9 @@ fileno(FILE *file) { goto out; } - assert(iob->iob_Descriptor >= 0 && iob->iob_Descriptor < __clib2->__num_fd); - assert(__clib2->__fd[iob->iob_Descriptor] != NULL); - assert(FLAG_IS_SET(__clib2->__fd[iob->iob_Descriptor]->fd_Flags, FDF_IN_USE)); + assert(iob->iob_Descriptor >= 0 && iob->iob_Descriptor < __clib4->__num_fd); + assert(__clib4->__fd[iob->iob_Descriptor] != NULL); + assert(FLAG_IS_SET(__clib4->__fd[iob->iob_Descriptor]->fd_Flags, FDF_IN_USE)); result = iob->iob_Descriptor; diff --git a/library/unistd/fpathconf.c b/library/unistd/fpathconf.c index 9ea53b35..df12b63f 100644 --- a/library/unistd/fpathconf.c +++ b/library/unistd/fpathconf.c @@ -1,5 +1,5 @@ /* - * $Id: unistd_fpathconf.c,v 1.3 2006-09-17 16:36:48 clib2devs Exp $ + * $Id: unistd_fpathconf.c,v 1.3 2006-09-17 16:36:48 clib4devs Exp $ */ #ifndef _UNISTD_HEADERS_H diff --git a/library/unistd/fsync.c b/library/unistd/fsync.c index c44ed5d9..8b9aa5c8 100644 --- a/library/unistd/fsync.c +++ b/library/unistd/fsync.c @@ -1,5 +1,5 @@ /* - * $Id: unistd_fsync.c,v 1.8 2006-01-08 12:04:27 clib2devs Exp $ + * $Id: unistd_fsync.c,v 1.8 2006-01-08 12:04:27 clib4devs Exp $ */ #ifndef _UNISTD_HEADERS_H @@ -13,7 +13,7 @@ int fsync(int file_descriptor) { struct fd *fd; int result = ERROR; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); @@ -21,11 +21,11 @@ fsync(int file_descriptor) { __check_abort(); - assert(file_descriptor >= 0 && file_descriptor < __clib2->__num_fd); - assert(__clib2->__fd[file_descriptor] != NULL); - assert(FLAG_IS_SET(__clib2->__fd[file_descriptor]->fd_Flags, FDF_IN_USE)); + assert(file_descriptor >= 0 && file_descriptor < __clib4->__num_fd); + assert(__clib4->__fd[file_descriptor] != NULL); + assert(FLAG_IS_SET(__clib4->__fd[file_descriptor]->fd_Flags, FDF_IN_USE)); - __stdio_lock(__clib2); + __stdio_lock(__clib4); fd = __get_file_descriptor(file_descriptor); if (fd == NULL) { @@ -43,7 +43,7 @@ fsync(int file_descriptor) { out: __fd_unlock(fd); - __stdio_unlock(__clib2); + __stdio_unlock(__clib4); RETURN(result); return (result); diff --git a/library/unistd/ftruncate.c b/library/unistd/ftruncate.c index 60c5459e..69e08b73 100755 --- a/library/unistd/ftruncate.c +++ b/library/unistd/ftruncate.c @@ -1,5 +1,5 @@ /* - * $Id: unistd_ftruncate.c,v 1.15 2006-11-16 14:39:23 clib2devs Exp $ + * $Id: unistd_ftruncate.c,v 1.15 2006-11-16 14:39:23 clib4devs Exp $ */ #ifndef _UNISTD_HEADERS_H @@ -11,20 +11,20 @@ int ftruncate(int file_descriptor, off_t length) { int result = ERROR; struct fd *fd = NULL; off_t initial_position = 0; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); SHOWVALUE(file_descriptor); SHOWVALUE(length); - assert(file_descriptor >= 0 && file_descriptor < __clib2->__num_fd); - assert(__clib2->__fd[file_descriptor] != NULL); - assert(FLAG_IS_SET(__clib2->__fd[file_descriptor]->fd_Flags, FDF_IN_USE)); + assert(file_descriptor >= 0 && file_descriptor < __clib4->__num_fd); + assert(__clib4->__fd[file_descriptor] != NULL); + assert(FLAG_IS_SET(__clib4->__fd[file_descriptor]->fd_Flags, FDF_IN_USE)); __check_abort(); - __stdio_lock(__clib2); + __stdio_lock(__clib4); fd = __get_file_descriptor(file_descriptor); if (fd == NULL) { @@ -90,7 +90,7 @@ int ftruncate(int file_descriptor, off_t length) { __fd_unlock(fd); - __stdio_unlock(__clib2); + __stdio_unlock(__clib4); RETURN(result); return (result); diff --git a/library/unistd/ftruncate64.c b/library/unistd/ftruncate64.c index 187101c4..b30870ba 100755 --- a/library/unistd/ftruncate64.c +++ b/library/unistd/ftruncate64.c @@ -1,5 +1,5 @@ /* - * $Id: unistd_ftruncate64.c,v 1.0 2021-02-05 18:12:04 clib2devs Exp $ + * $Id: unistd_ftruncate64.c,v 1.0 2021-02-05 18:12:04 clib4devs Exp $ */ #ifndef _UNISTD_HEADERS_H @@ -12,20 +12,20 @@ ftruncate64(int file_descriptor, _off64_t length) { int result = ERROR; struct fd *fd = NULL; _off64_t initial_position = 0; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); SHOWVALUE(file_descriptor); SHOWVALUE(length); - assert(file_descriptor >= 0 && file_descriptor < __clib2->__num_fd); - assert(__clib2->__fd[file_descriptor] != NULL); - assert(FLAG_IS_SET(__clib2->__fd[file_descriptor]->fd_Flags, FDF_IN_USE)); + assert(file_descriptor >= 0 && file_descriptor < __clib4->__num_fd); + assert(__clib4->__fd[file_descriptor] != NULL); + assert(FLAG_IS_SET(__clib4->__fd[file_descriptor]->fd_Flags, FDF_IN_USE)); __check_abort(); - __stdio_lock(__clib2); + __stdio_lock(__clib4); fd = __get_file_descriptor(file_descriptor); if (fd == NULL) { @@ -90,7 +90,7 @@ ftruncate64(int file_descriptor, _off64_t length) { FreeDosObject(DOS_EXAMINEDATA, fib); __fd_unlock(fd); - __stdio_unlock(__clib2); + __stdio_unlock(__clib4); RETURN(result); return (result); diff --git a/library/unistd/get_current_dir_name.c b/library/unistd/get_current_dir_name.c index b6aff5fc..16e19e9f 100644 --- a/library/unistd/get_current_dir_name.c +++ b/library/unistd/get_current_dir_name.c @@ -1,5 +1,5 @@ /* - * $Id: unistd_get_current_dir_name.c,v 1.0 2022-05-06 09:35:04 clib2devs Exp $ + * $Id: unistd_get_current_dir_name.c,v 1.0 2022-05-06 09:35:04 clib4devs Exp $ */ #ifndef _UNISTD_HEADERS_H diff --git a/library/unistd/get_default_file.c b/library/unistd/get_default_file.c index 487c2c6a..3252a6d4 100644 --- a/library/unistd/get_default_file.c +++ b/library/unistd/get_default_file.c @@ -1,5 +1,5 @@ /* - * $Id: fcntl_get_default_file.c,v 1.8 2006-11-16 14:39:23 clib2devs Exp $ + * $Id: fcntl_get_default_file.c,v 1.8 2006-11-16 14:39:23 clib4devs Exp $ */ #ifndef _FCNTL_HEADERS_H @@ -10,11 +10,11 @@ int __get_default_file(int file_descriptor, long *file_ptr) { int result = ERROR; struct fd *fd; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; - assert(file_descriptor >= 0 && file_descriptor < __clib2->__num_fd); - assert(__clib2->__fd[file_descriptor] != NULL); - assert(FLAG_IS_SET(__clib2->__fd[file_descriptor]->fd_Flags, FDF_IN_USE)); + assert(file_descriptor >= 0 && file_descriptor < __clib4->__num_fd); + assert(__clib4->__fd[file_descriptor] != NULL); + assert(FLAG_IS_SET(__clib4->__fd[file_descriptor]->fd_Flags, FDF_IN_USE)); assert(file_ptr != NULL); fd = __get_file_descriptor(file_descriptor); diff --git a/library/unistd/getcwd.c b/library/unistd/getcwd.c index fa43a918..793738fb 100644 --- a/library/unistd/getcwd.c +++ b/library/unistd/getcwd.c @@ -1,5 +1,5 @@ /* - * $Id: unistd_getcwd.c,v 1.10 2006-01-08 12:04:27 clib2devs Exp $ + * $Id: unistd_getcwd.c,v 1.10 2006-01-08 12:04:27 clib4devs Exp $ */ #ifndef _UNISTD_HEADERS_H @@ -19,7 +19,7 @@ getcwd(char *buffer, size_t buffer_size) { struct name_translation_info buffer_nti; char *result = NULL; BPTR dir_lock = BZERO; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); @@ -56,16 +56,16 @@ getcwd(char *buffer, size_t buffer_size) { goto out; } - if (__clib2->__unix_path_semantics) { - if (__clib2->__current_path_name[0] != '\0') { - if (buffer_size < strlen(__clib2->__current_path_name) + 1) { + if (__clib4->__unix_path_semantics) { + if (__clib4->__current_path_name[0] != '\0') { + if (buffer_size < strlen(__clib4->__current_path_name) + 1) { SHOWMSG("buffer is too small"); __set_errno(ERANGE); goto out; } - strcpy(buffer, __clib2->__current_path_name); + strcpy(buffer, __clib4->__current_path_name); D(("returning absolute path name '%s'", buffer)); @@ -95,7 +95,7 @@ getcwd(char *buffer, size_t buffer_size) { goto out; } - if (__clib2->__unix_path_semantics) { + if (__clib4->__unix_path_semantics) { const char *path_name = buffer; if (__translate_amiga_to_unix_path_name(&path_name, &buffer_nti) != 0) diff --git a/library/unistd/getdomainname.c b/library/unistd/getdomainname.c index 8e3a742f..4c4bedd6 100644 --- a/library/unistd/getdomainname.c +++ b/library/unistd/getdomainname.c @@ -1,5 +1,5 @@ /* - * $Id: socket_getdomainname.c,v 1.0 2022-04-20 12:04:24 clib2devs Exp $ + * $Id: socket_getdomainname.c,v 1.0 2022-04-20 12:04:24 clib4devs Exp $ */ #ifndef _SOCKET_HEADERS_H diff --git a/library/unistd/getentropy.c b/library/unistd/getentropy.c index 66053870..29ecabbc 100644 --- a/library/unistd/getentropy.c +++ b/library/unistd/getentropy.c @@ -1,5 +1,5 @@ /* - * $Id: unistd_getentropy.c,v 1.0 2023-06-15 12:04:27 clib2devs Exp $ + * $Id: unistd_getentropy.c,v 1.0 2023-06-15 12:04:27 clib4devs Exp $ */ #define _DEFAULT_SOURCE diff --git a/library/unistd/getlogin.c b/library/unistd/getlogin.c index 35c8cfca..2ff0f68a 100644 --- a/library/unistd/getlogin.c +++ b/library/unistd/getlogin.c @@ -1,5 +1,5 @@ /* - * $Id: unistd_getlogin.c,v 1.1 2023-04-13 09:51:53 clib2devs Exp $ + * $Id: unistd_getlogin.c,v 1.1 2023-04-13 09:51:53 clib4devs Exp $ */ #ifndef _UNISTD_HEADERS_H diff --git a/library/unistd/getlogin_r.c b/library/unistd/getlogin_r.c index 81236646..3d4ca8e6 100644 --- a/library/unistd/getlogin_r.c +++ b/library/unistd/getlogin_r.c @@ -1,5 +1,5 @@ /* - * $Id: unistd_getlogin_r.c,v 1.1 2023-04-13 09:51:53 clib2devs Exp $ + * $Id: unistd_getlogin_r.c,v 1.1 2023-04-13 09:51:53 clib4devs Exp $ */ #ifndef _UNISTD_HEADERS_H diff --git a/library/unistd/getopt.c b/library/unistd/getopt.c index 5efca56b..6b849a1c 100644 --- a/library/unistd/getopt.c +++ b/library/unistd/getopt.c @@ -1,5 +1,5 @@ /* - * $Id: unistd_getopt.c,v 1.7 2006-11-13 09:51:53 clib2devs Exp $ + * $Id: unistd_getopt.c,v 1.7 2006-11-13 09:51:53 clib4devs Exp $ */ #ifndef _UNISTD_HEADERS_H diff --git a/library/unistd/getopt_long.c b/library/unistd/getopt_long.c index e6f11101..a3ba92fa 100644 --- a/library/unistd/getopt_long.c +++ b/library/unistd/getopt_long.c @@ -1,5 +1,5 @@ /* - * $Id: getopt_getopt_long.c,v 1.5 2022-09-11 12:04:22 clib2devs Exp $ + * $Id: getopt_getopt_long.c,v 1.5 2022-09-11 12:04:22 clib4devs Exp $ */ #ifndef _UNISTD_HEADERS_H diff --git a/library/unistd/getpagesize.c b/library/unistd/getpagesize.c index e551e8a1..e7c1420a 100644 --- a/library/unistd/getpagesize.c +++ b/library/unistd/getpagesize.c @@ -1,5 +1,5 @@ /* - * $Id: getpagesize.c,v 1.0 2022-12-28 12:04:22 clib2devs Exp $ + * $Id: getpagesize.c,v 1.0 2022-12-28 12:04:22 clib4devs Exp $ */ #ifndef _UNISTD_HEADERS_H diff --git a/library/unistd/getpid.c b/library/unistd/getpid.c index 332088c5..0f2aa2b5 100644 --- a/library/unistd/getpid.c +++ b/library/unistd/getpid.c @@ -1,5 +1,5 @@ /* - * $Id: unistd_getpid.c,v 1.5 2021-02-07 19:24:11 clib2devs Exp $ + * $Id: unistd_getpid.c,v 1.5 2021-02-07 19:24:11 clib4devs Exp $ */ #ifndef _UNISTD_HEADERS_H diff --git a/library/unistd/getppid.c b/library/unistd/getppid.c index 320e5bfa..85c13757 100644 --- a/library/unistd/getppid.c +++ b/library/unistd/getppid.c @@ -1,5 +1,5 @@ /* - * $Id: unistd_getppid.c,v 1.5 2021-02-07 19:24:11 clib2devs Exp $ + * $Id: unistd_getppid.c,v 1.5 2021-02-07 19:24:11 clib4devs Exp $ */ #ifndef _UNISTD_HEADERS_H diff --git a/library/unistd/getwd.c b/library/unistd/getwd.c index 6f399308..b1fd3ae8 100644 --- a/library/unistd/getwd.c +++ b/library/unistd/getwd.c @@ -1,5 +1,5 @@ /* - * $Id: unistd_getwd.c,v 1.0 2022-05-06 09:35:04 clib2devs Exp $ + * $Id: unistd_getwd.c,v 1.0 2022-05-06 09:35:04 clib4devs Exp $ */ #ifndef _UNISTD_HEADERS_H diff --git a/library/unistd/init_exit.c b/library/unistd/init_exit.c index 37a6e78e..7ec9aa5a 100644 --- a/library/unistd/init_exit.c +++ b/library/unistd/init_exit.c @@ -1,5 +1,5 @@ /* - * $Id: unistd_init_exit.c,v 1.14 2006-09-27 09:40:06 clib2devs Exp $ + * $Id: unistd_init_exit.c,v 1.14 2006-09-27 09:40:06 clib4devs Exp $ */ #ifndef _UNISTD_HEADERS_H @@ -12,10 +12,10 @@ CLIB_CONSTRUCTOR(unistd_init) { ENTER(); - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; - NewList((struct List *)&__clib2->__unlink_list); - InitSemaphore(&__clib2->__unlink_semaphore); + NewList((struct List *)&__clib4->__unlink_list); + InitSemaphore(&__clib4->__unlink_semaphore); LEAVE(); @@ -24,16 +24,16 @@ CLIB_CONSTRUCTOR(unistd_init) { CLIB_DESTRUCTOR(unistd_exit) { ENTER(); - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; - if (__clib2->__unlink_list.mlh_Head != NULL && NOT IsMinListEmpty(&__clib2->__unlink_list)) { + if (__clib4->__unlink_list.mlh_Head != NULL && NOT IsMinListEmpty(&__clib4->__unlink_list)) { struct UnlinkNode *uln; BPTR old_dir; /* Close all the files that still might be open. */ - __close_all_files(__clib2); + __close_all_files(__clib4); - while ((uln = (struct UnlinkNode *) RemHead((struct List *) &__clib2->__unlink_list))) { + while ((uln = (struct UnlinkNode *) RemHead((struct List *) &__clib4->__unlink_list))) { D(("deleting '%s'", uln->uln_Name)); old_dir = SetCurrentDir(uln->uln_Lock); diff --git a/library/unistd/isatty.c b/library/unistd/isatty.c index fd5ac641..84f9670b 100644 --- a/library/unistd/isatty.c +++ b/library/unistd/isatty.c @@ -1,5 +1,5 @@ /* - * $Id: unistd_isatty.c,v 1.11 2010-10-20 13:12:59 clib2devs Exp $ + * $Id: unistd_isatty.c,v 1.11 2010-10-20 13:12:59 clib4devs Exp $ */ #ifndef _UNISTD_HEADERS_H @@ -10,19 +10,19 @@ int isatty(int file_descriptor) { int result = ERROR; struct fd *fd; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); SHOWVALUE(file_descriptor); - assert(file_descriptor >= 0 && file_descriptor < __clib2->__num_fd); - assert(__clib2->__fd[file_descriptor] != NULL); - assert(FLAG_IS_SET(__clib2->__fd[file_descriptor]->fd_Flags, FDF_IN_USE)); + assert(file_descriptor >= 0 && file_descriptor < __clib4->__num_fd); + assert(__clib4->__fd[file_descriptor] != NULL); + assert(FLAG_IS_SET(__clib4->__fd[file_descriptor]->fd_Flags, FDF_IN_USE)); __check_abort(); - __stdio_lock(__clib2); + __stdio_lock(__clib4); fd = __get_file_descriptor(file_descriptor); if (fd == NULL) { @@ -50,7 +50,7 @@ isatty(int file_descriptor) { out: __fd_unlock(fd); - __stdio_unlock(__clib2); + __stdio_unlock(__clib4); RETURN(result); return (result); diff --git a/library/unistd/lchown.c b/library/unistd/lchown.c index 3a6d3c2d..e70a7688 100644 --- a/library/unistd/lchown.c +++ b/library/unistd/lchown.c @@ -1,5 +1,5 @@ /* - * $Id: unistd_lchown.c,v 1.7 2006-01-08 12:04:27 clib2devs Exp $ + * $Id: unistd_lchown.c,v 1.7 2006-01-08 12:04:27 clib4devs Exp $ */ #ifndef _UNISTD_HEADERS_H diff --git a/library/unistd/link.c b/library/unistd/link.c index f730a695..843ff32f 100644 --- a/library/unistd/link.c +++ b/library/unistd/link.c @@ -1,5 +1,5 @@ /* - * $Id: unistd_link.c,v 1.8 2006-01-08 12:04:27 clib2devs Exp $ + * $Id: unistd_link.c,v 1.8 2006-01-08 12:04:27 clib4devs Exp $ */ #ifndef _UNISTD_HEADERS_H @@ -13,7 +13,7 @@ link(const char *existing_path, const char *new_path) { BPTR existing_path_lock = BZERO; int result = ERROR; LONG status; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); @@ -31,7 +31,7 @@ link(const char *existing_path, const char *new_path) { goto out; } - if (__clib2->__unix_path_semantics) { + if (__clib4->__unix_path_semantics) { if (existing_path[0] == '\0' || new_path[0] == '\0') { SHOWMSG("no name given"); diff --git a/library/unistd/lock.c b/library/unistd/lock.c index 09d161e6..3bd045d7 100644 --- a/library/unistd/lock.c +++ b/library/unistd/lock.c @@ -1,5 +1,5 @@ /* - * $Id: fcntl_lock.c,v 1.4 2006-01-08 12:04:22 clib2devs Exp $ + * $Id: fcntl_lock.c,v 1.4 2006-01-08 12:04:22 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H diff --git a/library/unistd/lockf.c b/library/unistd/lockf.c index 54653a2c..59f33424 100644 --- a/library/unistd/lockf.c +++ b/library/unistd/lockf.c @@ -1,5 +1,5 @@ /* - * $Id: unistd_flock.c,v 1.0 2022-08-21 12:04:22 clib2devs Exp $ + * $Id: unistd_flock.c,v 1.0 2022-08-21 12:04:22 clib4devs Exp $ */ #ifndef _UNISTD_HEADERS_H diff --git a/library/unistd/lseek.c b/library/unistd/lseek.c index 8b2692ca..69acc83e 100644 --- a/library/unistd/lseek.c +++ b/library/unistd/lseek.c @@ -1,5 +1,5 @@ /* - * $Id: fcntl_lseek.c,v 1.12 2022-08-11 12:04:22 clib2devs Exp $ + * $Id: fcntl_lseek.c,v 1.12 2022-08-11 12:04:22 clib4devs Exp $ */ #ifndef _UNISTD_HEADERS_H @@ -12,7 +12,7 @@ lseek(int file_descriptor, off_t offset, int mode) { off_t result = CHANGE_FILE_ERROR; struct fd *fd = NULL; off_t position; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); @@ -20,13 +20,13 @@ lseek(int file_descriptor, off_t offset, int mode) { SHOWVALUE(offset); SHOWVALUE(mode); - assert(file_descriptor >= 0 && file_descriptor < __clib2->__num_fd); - assert(__clib2->__fd[file_descriptor] != NULL); - assert(FLAG_IS_SET(__clib2->__fd[file_descriptor]->fd_Flags, FDF_IN_USE)); + assert(file_descriptor >= 0 && file_descriptor < __clib4->__num_fd); + assert(__clib4->__fd[file_descriptor] != NULL); + assert(FLAG_IS_SET(__clib4->__fd[file_descriptor]->fd_Flags, FDF_IN_USE)); __check_abort(); - __stdio_lock(__clib2); + __stdio_lock(__clib4); fd = __get_file_descriptor(file_descriptor); if (fd == NULL) { @@ -54,7 +54,7 @@ lseek(int file_descriptor, off_t offset, int mode) { to be sure, we therefore also check the secondary error to verify that what could be a file position is really an error indication. */ - position = (*fd->fd_Action)(__clib2, fd, &fam); + position = (*fd->fd_Action)(__clib4, fd, &fam); if (position == CHANGE_FILE_ERROR && fam.fam_Error != OK) { __set_errno(fam.fam_Error); goto out; @@ -71,7 +71,7 @@ lseek(int file_descriptor, off_t offset, int mode) { __fd_unlock(fd); - __stdio_unlock(__clib2); + __stdio_unlock(__clib4); RETURN(result); return (result); diff --git a/library/unistd/lseek64.c b/library/unistd/lseek64.c index 5313cb7e..63e54a6d 100644 --- a/library/unistd/lseek64.c +++ b/library/unistd/lseek64.c @@ -1,5 +1,5 @@ /* - * $Id: fcntl_lseek.c,v 1.0 2022-03-30 12:04:22 clib2devs Exp $ + * $Id: fcntl_lseek.c,v 1.0 2022-03-30 12:04:22 clib4devs Exp $ */ #ifndef _UNISTD_HEADERS_H #include "unistd_headers.h" diff --git a/library/unistd/pathconf.c b/library/unistd/pathconf.c index c4ddad35..f66366db 100644 --- a/library/unistd/pathconf.c +++ b/library/unistd/pathconf.c @@ -1,5 +1,5 @@ /* - * $Id: unistd_pathconf.c,v 1.1 2006-07-28 14:37:28 clib2devs Exp $ + * $Id: unistd_pathconf.c,v 1.1 2006-07-28 14:37:28 clib4devs Exp $ */ #ifndef _UNISTD_HEADERS_H @@ -12,7 +12,7 @@ pathconf(const char *path, int name) { struct DevProc *dvp = NULL; BOOL ignore_port = FALSE; long ret = -1; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); @@ -26,7 +26,7 @@ pathconf(const char *path, int name) { goto out; } - if (__clib2->__unix_path_semantics) { + if (__clib4->__unix_path_semantics) { if (path[0] == '\0') { SHOWMSG("Empty name"); diff --git a/library/unistd/pause.c b/library/unistd/pause.c index d447bc72..43867768 100644 --- a/library/unistd/pause.c +++ b/library/unistd/pause.c @@ -1,5 +1,5 @@ /* - * $Id: unistd_pause.c,v 1.0 2022-03-15 08:39:45 clib2devs Exp $ + * $Id: unistd_pause.c,v 1.0 2022-03-15 08:39:45 clib4devs Exp $ */ #ifndef _UNISTD_HEADERS_H diff --git a/library/unistd/pipe.c b/library/unistd/pipe.c index 1c1a3e3b..f8d2d9d4 100644 --- a/library/unistd/pipe.c +++ b/library/unistd/pipe.c @@ -1,5 +1,5 @@ /* - * $Id: unistd_pipe.c,v 1.0 2020-01-14 12:35:27 clib2devs Exp $ + * $Id: unistd_pipe.c,v 1.0 2020-01-14 12:35:27 clib4devs Exp $ */ #ifndef _UNISTD_HEADERS_H @@ -10,14 +10,14 @@ int pipe(int fd[2]) { ENTER(); DECLARE_UTILITYBASE(); char pipe_name[1024] = {0}; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; #ifdef USE_TEMPFILES - snprintf(pipe_name, sizeof(pipe_name), "T:%x.%08x", __clib2->pipenum++, ((struct Process *)FindTask(NULL))->pr_ProcessID); + snprintf(pipe_name, sizeof(pipe_name), "T:%x.%08x", __clib4->pipenum++, ((struct Process *)FindTask(NULL))->pr_ProcessID); // Delete the file if exists (we don't need to check if file exists) Delete(pipe_name); #else - snprintf(pipe_name, sizeof(pipe_name), "PIPE:%x%lu/32768/0", __clib2->pipenum++, ((struct Process *) FindTask(NULL))->pr_ProcessID); + snprintf(pipe_name, sizeof(pipe_name), "PIPE:%x%lu/32768/0", __clib4->pipenum++, ((struct Process *) FindTask(NULL))->pr_ProcessID); #endif // USE_TEMPFILES fd[1] = open(pipe_name, O_WRONLY | O_CREAT); diff --git a/library/unistd/pipe2.c b/library/unistd/pipe2.c index 618e0ade..dd51020a 100644 --- a/library/unistd/pipe2.c +++ b/library/unistd/pipe2.c @@ -1,5 +1,5 @@ /* - * $Id: unistd_pipe2.c,v 1.0 2020-01-14 12:35:27 clib2devs Exp $ + * $Id: unistd_pipe2.c,v 1.0 2020-01-14 12:35:27 clib4devs Exp $ */ #ifndef _UNISTD_HEADERS_H diff --git a/library/unistd/pread.c b/library/unistd/pread.c index 0312a18f..c9fd079c 100644 --- a/library/unistd/pread.c +++ b/library/unistd/pread.c @@ -1,5 +1,5 @@ /* - * $Id: unistd_pread.c,v 1.0 2021-02-21 23:05:27 clib2devs Exp $ + * $Id: unistd_pread.c,v 1.0 2021-02-21 23:05:27 clib4devs Exp $ */ #ifndef _UNISTD_HEADERS_H diff --git a/library/unistd/pread64.c b/library/unistd/pread64.c index 2857e45b..1b5fef40 100644 --- a/library/unistd/pread64.c +++ b/library/unistd/pread64.c @@ -1,5 +1,5 @@ /* - * $Id: unistd_pread64.c,v 1.0 2023-03-03 23:05:27 clib2devs Exp $ + * $Id: unistd_pread64.c,v 1.0 2023-03-03 23:05:27 clib4devs Exp $ */ #ifndef _UNISTD_HEADERS_H diff --git a/library/unistd/pwrite.c b/library/unistd/pwrite.c index 5d113759..5bf96c6b 100644 --- a/library/unistd/pwrite.c +++ b/library/unistd/pwrite.c @@ -1,5 +1,5 @@ /* - * $Id: unistd_pwrite.c,v 1.1 2022-03-04 23:09:27 clib2devs Exp $ + * $Id: unistd_pwrite.c,v 1.1 2022-03-04 23:09:27 clib4devs Exp $ */ #ifndef _UNISTD_HEADERS_H diff --git a/library/unistd/pwrite64.c b/library/unistd/pwrite64.c index a8123369..ce38a339 100644 --- a/library/unistd/pwrite64.c +++ b/library/unistd/pwrite64.c @@ -1,5 +1,5 @@ /* - * $Id: unistd_pwrite64.c,v 1.0 2023-03-03 23:09:27 clib2devs Exp $ + * $Id: unistd_pwrite64.c,v 1.0 2023-03-03 23:09:27 clib4devs Exp $ */ #ifndef _UNISTD_HEADERS_H diff --git a/library/unistd/readlink.c b/library/unistd/readlink.c index 48a80588..92c75cfe 100644 --- a/library/unistd/readlink.c +++ b/library/unistd/readlink.c @@ -1,5 +1,5 @@ /* - * $Id: unistd_readlink.c,v 1.9 2006-11-13 09:25:28 clib2devs Exp $ + * $Id: unistd_readlink.c,v 1.9 2006-11-13 09:25:28 clib4devs Exp $ */ #ifndef _UNISTD_HEADERS_H @@ -17,7 +17,7 @@ readlink(const char *path_name, char *buffer, int buffer_size) { BPTR lock = BZERO; int result = ERROR; int target_length = -1; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); @@ -36,7 +36,7 @@ readlink(const char *path_name, char *buffer, int buffer_size) { goto out; } - if (__clib2->__unix_path_semantics) { + if (__clib4->__unix_path_semantics) { if (path_name[0] == '\0') { SHOWMSG("no name given"); @@ -61,7 +61,7 @@ readlink(const char *path_name, char *buffer, int buffer_size) { goto out; } - if (__clib2->__unix_path_semantics) { + if (__clib4->__unix_path_semantics) { if (__translate_amiga_to_unix_path_name((char const **) &buffer, &buffer_nti) != 0) goto out; diff --git a/library/unistd/reallocarray.c b/library/unistd/reallocarray.c index 3707b67f..5bb5e6d5 100644 --- a/library/unistd/reallocarray.c +++ b/library/unistd/reallocarray.c @@ -1,5 +1,5 @@ /* - * $Id: unistd_readlink.c,v 1.9 2006-11-13 09:25:28 clib2devs Exp $ + * $Id: unistd_readlink.c,v 1.9 2006-11-13 09:25:28 clib4devs Exp $ */ #define _DEFAULT_SOURCE diff --git a/library/unistd/realpath.c b/library/unistd/realpath.c index 57846619..e5e655c8 100644 --- a/library/unistd/realpath.c +++ b/library/unistd/realpath.c @@ -1,5 +1,5 @@ /* - * $Id: unistd_realpath.c,v 1.7 2006-01-08 12:04:27 clib2devs Exp $ + * $Id: unistd_realpath.c,v 1.7 2006-01-08 12:04:27 clib4devs Exp $ */ #ifndef _UNISTD_HEADERS_H @@ -13,7 +13,7 @@ realpath(const char *path_name, char *buffer) { struct DevProc *dvp = NULL; BPTR lock = BZERO; char *result = NULL; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); @@ -29,7 +29,7 @@ realpath(const char *path_name, char *buffer) { goto out; } - if (__clib2->__unix_path_semantics) { + if (__clib4->__unix_path_semantics) { if (path_name[0] == '\0') { SHOWMSG("no name given"); @@ -63,7 +63,7 @@ realpath(const char *path_name, char *buffer) { goto out; } - if (__clib2->__unix_path_semantics) { + if (__clib4->__unix_path_semantics) { if (__translate_amiga_to_unix_path_name((char const **) &buffer, &buffer_nti) != 0) goto out; diff --git a/library/unistd/restorepathname.c b/library/unistd/restorepathname.c index 59418948..e1f523bc 100644 --- a/library/unistd/restorepathname.c +++ b/library/unistd/restorepathname.c @@ -1,5 +1,5 @@ /* - * $Id: unistd_restorepathname.c,v 1.3 2006-01-08 12:04:27 clib2devs Exp $ + * $Id: unistd_restorepathname.c,v 1.3 2006-01-08 12:04:27 clib4devs Exp $ */ #ifndef _UNISTD_HEADERS_H diff --git a/library/unistd/setcurrentpath.c b/library/unistd/setcurrentpath.c index 1e989322..3ffa05c9 100644 --- a/library/unistd/setcurrentpath.c +++ b/library/unistd/setcurrentpath.c @@ -1,5 +1,5 @@ /* - * $Id: unistd_setcurrentpath.c,v 1.6 2023-03-05 12:04:27 clib2devs Exp $ + * $Id: unistd_setcurrentpath.c,v 1.6 2023-03-05 12:04:27 clib4devs Exp $ */ #ifndef _UNISTD_HEADERS_H @@ -9,7 +9,7 @@ int __set_current_path(const char *path_name) { int result = ERROR; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; SHOWSTRING(path_name); @@ -17,7 +17,7 @@ __set_current_path(const char *path_name) { assert(path_name != NULL); - if (strlen(path_name) + 1 > sizeof(__clib2->__current_path_name)) { + if (strlen(path_name) + 1 > sizeof(__clib4->__current_path_name)) { SHOWMSG("path is too long"); __set_errno(ENAMETOOLONG); @@ -25,16 +25,16 @@ __set_current_path(const char *path_name) { } /* Only store the path if it's absolute. */ - if (__clib2->__unix_path_semantics) { + if (__clib4->__unix_path_semantics) { if (path_name[0] == '/') - strcpy(__clib2->__current_path_name, path_name); + strcpy(__clib4->__current_path_name, path_name); else - strcpy(__clib2->__current_path_name, ""); + strcpy(__clib4->__current_path_name, ""); } else { if (strchr(path_name, ':')) - strcpy(__clib2->__current_path_name, path_name); + strcpy(__clib4->__current_path_name, path_name); else - strcpy(__clib2->__current_path_name, ""); + strcpy(__clib4->__current_path_name, ""); } diff --git a/library/unistd/setdomainname.c b/library/unistd/setdomainname.c index 256db2fa..b0140579 100644 --- a/library/unistd/setdomainname.c +++ b/library/unistd/setdomainname.c @@ -1,5 +1,5 @@ /* - * $Id: socket_setdomainname.c,v 1.0 2022-04-20 12:04:24 clib2devs Exp $ + * $Id: socket_setdomainname.c,v 1.0 2022-04-20 12:04:24 clib4devs Exp $ */ #ifndef _SOCKET_HEADERS_H diff --git a/library/unistd/setlogin.c b/library/unistd/setlogin.c index 35366a38..25305264 100644 --- a/library/unistd/setlogin.c +++ b/library/unistd/setlogin.c @@ -1,5 +1,5 @@ /* - * $Id: unistd_setlogin.c,v 1.0 2023-04-13 09:51:53 clib2devs Exp $ + * $Id: unistd_setlogin.c,v 1.0 2023-04-13 09:51:53 clib4devs Exp $ */ #ifndef _UNISTD_HEADERS_H diff --git a/library/unistd/sleep.c b/library/unistd/sleep.c index d5f93ebc..6394afc6 100644 --- a/library/unistd/sleep.c +++ b/library/unistd/sleep.c @@ -1,5 +1,5 @@ /* - * $Id: unistd_sleep.c,v 1.6 2006-01-08 12:04:27 clib2devs Exp $ + * $Id: unistd_sleep.c,v 1.6 2006-01-08 12:04:27 clib4devs Exp $ */ #ifndef _UNISTD_HEADERS_H @@ -10,7 +10,7 @@ unsigned int sleep(unsigned int seconds) { ENTER(); - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; int microseconds = seconds * 1000000; unsigned int result; @@ -21,9 +21,9 @@ sleep(unsigned int seconds) { tv.tv_sec = 0; tv.tv_usec = microseconds; - __clib2->__timer_busy = TRUE; + __clib4->__timer_busy = TRUE; result = __time_delay(TR_ADDREQUEST, &tv); // EINTR can be returned inside the call - __clib2->__timer_busy = FALSE; + __clib4->__timer_busy = FALSE; if (result == EINTR) { /* If a timer has been interrupted by a SIGALRM do we have to exit like on Linux? * At moment EINTR is returned only if we got an alarm() signal diff --git a/library/unistd/spawnv.c b/library/unistd/spawnv.c index 3054292a..5e235aa5 100644 --- a/library/unistd/spawnv.c +++ b/library/unistd/spawnv.c @@ -1,5 +1,5 @@ /* - * $Id: unistd_spawnv.c,v 1.0 2021-01-21 18:26:47 clib2devs Exp $ + * $Id: unistd_spawnv.c,v 1.0 2021-01-21 18:26:47 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H @@ -123,7 +123,7 @@ spawnv(int mode, const char *file, const char **argv) { size_t arg_string_len = 0; size_t parameter_string_len = 0; struct name_translation_info path_nti; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; if (mode != P_WAIT && mode != P_NOWAIT) { __set_errno(ENOSYS); @@ -132,7 +132,7 @@ spawnv(int mode, const char *file, const char **argv) { __set_errno(0); - if (__clib2->__unix_path_semantics) { + if (__clib4->__unix_path_semantics) { if (__translate_unix_to_amiga_path_name(&file, &path_nti) != 0) { __set_errno(EINVAL); return ret; diff --git a/library/unistd/spawnvp.c b/library/unistd/spawnvp.c index a4e96bf0..0d7b970e 100644 --- a/library/unistd/spawnvp.c +++ b/library/unistd/spawnvp.c @@ -1,5 +1,5 @@ /* - * $Id: unistd_spawnvp.c,v 1.0 2021-01-21 19:58:27 clib2devs Exp $ + * $Id: unistd_spawnvp.c,v 1.0 2021-01-21 19:58:27 clib4devs Exp $ */ #ifndef _UNISTD_HEADERS_H diff --git a/library/unistd/strip_double_slash.c b/library/unistd/strip_double_slash.c index 0d423a2d..615a61b7 100644 --- a/library/unistd/strip_double_slash.c +++ b/library/unistd/strip_double_slash.c @@ -1,5 +1,5 @@ /* - * $Id: unistd_strip_double_slash.c,v 1.4 2006-01-08 12:04:27 clib2devs Exp $ + * $Id: unistd_strip_double_slash.c,v 1.4 2006-01-08 12:04:27 clib4devs Exp $ */ #ifndef _UNISTD_HEADERS_H diff --git a/library/unistd/symlink.c b/library/unistd/symlink.c index adb99b32..446520d3 100644 --- a/library/unistd/symlink.c +++ b/library/unistd/symlink.c @@ -1,5 +1,5 @@ /* - * $Id: unistd_symlink.c,v 1.8 2006-01-29 09:17:00 clib2devs Exp $ + * $Id: unistd_symlink.c,v 1.8 2006-01-29 09:17:00 clib4devs Exp $ */ #ifndef _UNISTD_HEADERS_H @@ -12,7 +12,7 @@ symlink(const char *actual_path, const char *symbolic_path) { struct name_translation_info symbolic_path_name_nti; int result = ERROR; LONG status; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); @@ -30,7 +30,7 @@ symlink(const char *actual_path, const char *symbolic_path) { goto out; } - if (__clib2->__unix_path_semantics) { + if (__clib4->__unix_path_semantics) { if (actual_path[0] == '\0' || symbolic_path[0] == '\0') { SHOWMSG("no name given"); diff --git a/library/unistd/sync_fd.c b/library/unistd/sync_fd.c index b2f5d2ce..c00407a0 100644 --- a/library/unistd/sync_fd.c +++ b/library/unistd/sync_fd.c @@ -1,5 +1,5 @@ /* - * $Id: unistd_sync_fd.c,v 1.8 2006-11-16 14:39:23 clib2devs Exp $ + * $Id: unistd_sync_fd.c,v 1.8 2006-11-16 14:39:23 clib4devs Exp $ */ #ifndef _UNISTD_HEADERS_H diff --git a/library/unistd/sysconf.c b/library/unistd/sysconf.c index d19b27be..d50df983 100644 --- a/library/unistd/sysconf.c +++ b/library/unistd/sysconf.c @@ -1,5 +1,5 @@ /* - * $Id: unistd_sysconf.c,v 1.1 2022-09-09 10:09:27 clib2devs Exp $ + * $Id: unistd_sysconf.c,v 1.1 2022-09-09 10:09:27 clib4devs Exp $ */ #ifndef _UNISTD_HEADERS_H diff --git a/library/unistd/time_delay.c b/library/unistd/time_delay.c index 42218812..0e05312c 100644 --- a/library/unistd/time_delay.c +++ b/library/unistd/time_delay.c @@ -1,5 +1,5 @@ /* - * $Id: unistd_time_delay.c,v 1.9 2006-04-05 08:39:45 clib2devs Exp $ + * $Id: unistd_time_delay.c,v 1.9 2006-04-05 08:39:45 clib4devs Exp $ */ #ifndef _UNISTD_HEADERS_H diff --git a/library/unistd/timer.c b/library/unistd/timer.c index 42d89012..005c4b9b 100644 --- a/library/unistd/timer.c +++ b/library/unistd/timer.c @@ -1,5 +1,5 @@ /* - * $Id: unistd_timer.c,v 1.11 2021-02-01 16:35:56 clib2devs Exp $ + * $Id: unistd_timer.c,v 1.11 2021-02-01 16:35:56 clib4devs Exp $ */ #ifndef _UNISTD_HEADERS_H @@ -28,47 +28,47 @@ CLIB_CONSTRUCTOR(timer_init) { ENTER(); BOOL success = FALSE; - struct _clib2 *__clib2 = __CLIB2; - __clib2->__timer_semaphore = __create_semaphore(); - if (!__clib2->__timer_semaphore) { + struct _clib4 *__clib4 = __CLIB4; + __clib4->__timer_semaphore = __create_semaphore(); + if (!__clib4->__timer_semaphore) { goto out; } - __clib2->__timer_port = AllocSysObjectTags(ASOT_PORT, + __clib4->__timer_port = AllocSysObjectTags(ASOT_PORT, ASOPORT_Action, PA_SIGNAL, ASOPORT_Target, FindTask(NULL), ASOPORT_AllocSig, FALSE, ASOPORT_Signal, SIGB_SINGLE, TAG_DONE); - if (__clib2->__timer_port == NULL) { + if (__clib4->__timer_port == NULL) { __show_error("The timer message port could not be created."); goto out; } - SHOWMSG("__clib2->__timer_port allocated"); + SHOWMSG("__clib4->__timer_port allocated"); - __clib2->__timer_request = AllocSysObjectTags(ASOT_IOREQUEST, + __clib4->__timer_request = AllocSysObjectTags(ASOT_IOREQUEST, ASOMSG_Size, sizeof(struct TimeRequest), - ASOMSG_ReplyPort, __clib2->__timer_port, + ASOMSG_ReplyPort, __clib4->__timer_port, TAG_DONE); - if (__clib2->__timer_request == NULL) { + if (__clib4->__timer_request == NULL) { __show_error("The timer I/O request could not be created."); goto out; } - SHOWMSG("__clib2->__timer_request allocated"); + SHOWMSG("__clib4->__timer_request allocated"); - if (OpenDevice(TIMERNAME, UNIT_VBLANK, (struct IORequest *)__clib2->__timer_request, 0) != OK) { + if (OpenDevice(TIMERNAME, UNIT_VBLANK, (struct IORequest *)__clib4->__timer_request, 0) != OK) { __show_error("The timer could not be opened."); goto out; } SHOWMSG("OpenDevice success"); - __clib2->__TimerBase = (struct Library *) __clib2->__timer_request->tr_node.io_Device; - SHOWPOINTER(__clib2->__TimerBase); - __clib2->__ITimer = (struct TimerIFace *) GetInterface(__clib2->__TimerBase, "main", 1, 0); - SHOWPOINTER(__clib2->__ITimer); - if (__clib2->__ITimer == NULL) { - SHOWMSG("__clib2->__ITimer is NULL"); + __clib4->__TimerBase = (struct Library *) __clib4->__timer_request->tr_node.io_Device; + SHOWPOINTER(__clib4->__TimerBase); + __clib4->__ITimer = (struct TimerIFace *) GetInterface(__clib4->__TimerBase, "main", 1, 0); + SHOWPOINTER(__clib4->__ITimer); + if (__clib4->__ITimer == NULL) { + SHOWMSG("__clib4->__ITimer is NULL"); __show_error("The timer interface could not be obtained."); goto out; } @@ -88,27 +88,27 @@ CLIB_CONSTRUCTOR(timer_init) { CLIB_DESTRUCTOR(timer_exit) { ENTER(); - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; - if (__clib2->__ITimer != NULL) - DropInterface((struct Interface *) __clib2->__ITimer); + if (__clib4->__ITimer != NULL) + DropInterface((struct Interface *) __clib4->__ITimer); - __clib2->__ITimer = NULL; - __clib2->__TimerBase = NULL; + __clib4->__ITimer = NULL; + __clib4->__TimerBase = NULL; - if (__clib2->__timer_request != NULL) { - if (__clib2->__timer_request->tr_node.io_Device != NULL) - CloseDevice((struct IORequest *) __clib2->__timer_request); + if (__clib4->__timer_request != NULL) { + if (__clib4->__timer_request->tr_node.io_Device != NULL) + CloseDevice((struct IORequest *) __clib4->__timer_request); - FreeSysObject(ASOT_IOREQUEST, __clib2->__timer_request); - __clib2->__timer_request = NULL; + FreeSysObject(ASOT_IOREQUEST, __clib4->__timer_request); + __clib4->__timer_request = NULL; } - FreeSysObject(ASOT_PORT, __clib2->__timer_port); - __clib2->__timer_port = NULL; + FreeSysObject(ASOT_PORT, __clib4->__timer_port); + __clib4->__timer_port = NULL; - __delete_semaphore(__clib2->__timer_semaphore); - __clib2->__timer_semaphore = NULL; + __delete_semaphore(__clib4->__timer_semaphore); + __clib4->__timer_semaphore = NULL; LEAVE(); } diff --git a/library/unistd/translatea2u.c b/library/unistd/translatea2u.c index 8e769e74..5db4ca66 100644 --- a/library/unistd/translatea2u.c +++ b/library/unistd/translatea2u.c @@ -1,5 +1,5 @@ /* - * $Id: unistd_translatea2u.c,v 1.7 2006-01-08 12:04:27 clib2devs Exp $ + * $Id: unistd_translatea2u.c,v 1.7 2006-01-08 12:04:27 clib4devs Exp $ */ #ifndef _UNISTD_HEADERS_H diff --git a/library/unistd/translaterel.c b/library/unistd/translaterel.c index 4aa0eb57..45c93a28 100644 --- a/library/unistd/translaterel.c +++ b/library/unistd/translaterel.c @@ -1,5 +1,5 @@ /* - * $Id: unistd_translaterel.c,v 1.5 2006-01-08 12:04:27 clib2devs Exp $ + * $Id: unistd_translaterel.c,v 1.5 2006-01-08 12:04:27 clib4devs Exp $ */ #ifndef _UNISTD_HEADERS_H @@ -10,7 +10,7 @@ int __translate_relative_path_name(char const **name_ptr, char *replacement_buffer, size_t replacement_buffer_size) { int result = ERROR; char *name; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; assert(name_ptr != NULL && (*name_ptr) != NULL && replacement_buffer != NULL); @@ -19,17 +19,17 @@ __translate_relative_path_name(char const **name_ptr, char *replacement_buffer, * are not modified, though. */ name = (char *) (*name_ptr); - if (__clib2->__current_path_name[0] != '\0' && name[0] != '/') { + if (__clib4->__current_path_name[0] != '\0' && name[0] != '/') { size_t total_len; BOOL add_slash; /* Get the current directory name and get * ready to attach the file name at the end. */ - total_len = strlen(__clib2->__current_path_name); + total_len = strlen(__clib4->__current_path_name); - if (__clib2->__current_path_name[total_len - 1] != '/' && - __clib2->__current_path_name[total_len - 1] != ':' && + if (__clib4->__current_path_name[total_len - 1] != '/' && + __clib4->__current_path_name[total_len - 1] != ':' && name[0] != '\0') { add_slash = TRUE; @@ -47,7 +47,7 @@ __translate_relative_path_name(char const **name_ptr, char *replacement_buffer, } /* Put the file name together. */ - strcpy(replacement_buffer, __clib2->__current_path_name); + strcpy(replacement_buffer, __clib4->__current_path_name); if (add_slash) strcat(replacement_buffer, "/"); diff --git a/library/unistd/translateu2a.c b/library/unistd/translateu2a.c index c8ebb9bd..54e68d11 100644 --- a/library/unistd/translateu2a.c +++ b/library/unistd/translateu2a.c @@ -1,5 +1,5 @@ /* - * $Id: unistd_translateu2a.c,v 1.13 2015-06-26 11:22:00 clib2devs Exp $ + * $Id: unistd_translateu2a.c,v 1.13 2015-06-26 11:22:00 clib4devs Exp $ */ /*#define DEBUG*/ diff --git a/library/unistd/truncate.c b/library/unistd/truncate.c index a568f0b9..dd679896 100644 --- a/library/unistd/truncate.c +++ b/library/unistd/truncate.c @@ -1,5 +1,5 @@ /* - * $Id: unistd_truncate.c,v 1.7 2006-01-08 12:04:27 clib2devs Exp $ + * $Id: unistd_truncate.c,v 1.7 2006-01-08 12:04:27 clib4devs Exp $ */ #ifndef _UNISTD_HEADERS_H diff --git a/library/unistd/truncate64.c b/library/unistd/truncate64.c index ce943aed..ad408817 100644 --- a/library/unistd/truncate64.c +++ b/library/unistd/truncate64.c @@ -1,5 +1,5 @@ /* - * $Id: unistd_truncate.c,v 1.0 2021-02-05 18:16:39 clib2devs Exp $ + * $Id: unistd_truncate.c,v 1.0 2021-02-05 18:16:39 clib4devs Exp $ */ #ifndef _UNISTD_HEADERS_H diff --git a/library/unistd/ttyname.c b/library/unistd/ttyname.c index d97d1499..83897cce 100644 --- a/library/unistd/ttyname.c +++ b/library/unistd/ttyname.c @@ -1,5 +1,5 @@ /* - * $Id: unistd_ttyname.c,v 1.5 2006-09-25 14:05:31 clib2devs Exp $ + * $Id: unistd_ttyname.c,v 1.5 2006-09-25 14:05:31 clib4devs Exp $ */ #ifndef _UNISTD_HEADERS_H diff --git a/library/unistd/ttyname_r.c b/library/unistd/ttyname_r.c index deaafcd2..8d821d68 100644 --- a/library/unistd/ttyname_r.c +++ b/library/unistd/ttyname_r.c @@ -1,5 +1,5 @@ /* - * $Id: unistd_ttyname_r.c,v 1.6 2006-11-16 14:39:23 clib2devs Exp $ + * $Id: unistd_ttyname_r.c,v 1.6 2006-11-16 14:39:23 clib4devs Exp $ */ #ifndef _UNISTD_HEADERS_H @@ -15,13 +15,13 @@ ttyname_r(int file_descriptor, char *name, size_t buflen) { const char *tty_file_name; struct fd *fd; int result; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); SHOWVALUE(file_descriptor); - __stdio_lock(__clib2); + __stdio_lock(__clib4); fd = __get_file_descriptor(file_descriptor); if (fd == NULL) { @@ -42,7 +42,7 @@ ttyname_r(int file_descriptor, char *name, size_t buflen) { } } - if (__clib2->__unix_path_semantics) + if (__clib4->__unix_path_semantics) tty_file_name = "/CONSOLE"; else tty_file_name = "CONSOLE:"; @@ -61,7 +61,7 @@ ttyname_r(int file_descriptor, char *name, size_t buflen) { __fd_unlock(fd); - __stdio_unlock(__clib2); + __stdio_unlock(__clib4); RETURN(result); return (result); diff --git a/library/unistd/ualarm.c b/library/unistd/ualarm.c index 5ae1cb4e..ae73ae08 100644 --- a/library/unistd/ualarm.c +++ b/library/unistd/ualarm.c @@ -1,5 +1,5 @@ /* - * $Id: unistd_ualarm.c.c,v 1.0 2022-03-16 09:34:24 clib2devs Exp $ + * $Id: unistd_ualarm.c.c,v 1.0 2022-03-16 09:34:24 clib4devs Exp $ */ #ifndef _UNISTD_HEADERS_H diff --git a/library/unistd/unistd_headers.h b/library/unistd/unistd_headers.h index d7074cb0..03eb63bb 100755 --- a/library/unistd/unistd_headers.h +++ b/library/unistd/unistd_headers.h @@ -1,5 +1,5 @@ /* - * $Id: unistd_headers.h,v 2.0 2023-05-03 09:40:06 clib2devs Exp $ + * $Id: unistd_headers.h,v 2.0 2023-05-03 09:40:06 clib4devs Exp $ */ #ifndef _UNISTD_HEADERS_H diff --git a/library/unistd/unlink.c b/library/unistd/unlink.c index 450c70a1..798fd088 100644 --- a/library/unistd/unlink.c +++ b/library/unistd/unlink.c @@ -1,5 +1,5 @@ /* - * $Id: unistd_unlink.c,v 1.11 2006-09-27 09:40:06 clib2devs Exp $ + * $Id: unistd_unlink.c,v 1.11 2006-09-27 09:40:06 clib4devs Exp $ */ #ifndef _UNISTD_HEADERS_H @@ -17,7 +17,7 @@ unlink(const char *path_name) { BPTR current_dir = BZERO; int result = ERROR; LONG status; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); @@ -34,7 +34,7 @@ unlink(const char *path_name) { goto out; } - if (__clib2->__unix_path_semantics) { + if (__clib4->__unix_path_semantics) { if (path_name[0] == '\0') { SHOWMSG("no name given"); @@ -55,14 +55,14 @@ unlink(const char *path_name) { status = Delete((STRPTR) path_name); if (status == DOSFALSE) { - if (__clib2->__unix_path_semantics) { + if (__clib4->__unix_path_semantics) { struct UnlinkNode *uln = NULL; struct UnlinkNode *node; BOOL found = FALSE; assert(UtilityBase != NULL); - if (NOT __clib2->__unlink_retries || IoErr() != ERROR_OBJECT_IN_USE) { + if (NOT __clib4->__unlink_retries || IoErr() != ERROR_OBJECT_IN_USE) { __set_errno(__translate_access_io_error_to_errno(IoErr())); goto out; } @@ -78,11 +78,11 @@ unlink(const char *path_name) { goto out; } - ObtainSemaphore(&__clib2->__unlink_semaphore); + ObtainSemaphore(&__clib4->__unlink_semaphore); - assert(__clib2->__unlink_list.mlh_Head != NULL); + assert(__clib4->__unlink_list.mlh_Head != NULL); - for (node = (struct UnlinkNode *) __clib2->__unlink_list.mlh_Head; + for (node = (struct UnlinkNode *) __clib4->__unlink_list.mlh_Head; node->uln_MinNode.mln_Succ != NULL; node = (struct UnlinkNode *) node->uln_MinNode.mln_Succ) { if (Stricmp(node->uln_Name, path_name) == SAME && SameLock(node->uln_Lock, current_dir) == LOCK_SAME) { @@ -98,13 +98,13 @@ unlink(const char *path_name) { uln->uln_Name = (char *) (uln + 1); strcpy(uln->uln_Name, path_name); - AddTail((struct List *) &__clib2->__unlink_list, (struct Node *) uln); + AddTail((struct List *) &__clib4->__unlink_list, (struct Node *) uln); current_dir = BZERO; } } - ReleaseSemaphore(&__clib2->__unlink_semaphore); + ReleaseSemaphore(&__clib4->__unlink_semaphore); if (NOT found && uln == NULL) { diff --git a/library/unistd/usleep.c b/library/unistd/usleep.c index 0c74120e..7e968273 100644 --- a/library/unistd/usleep.c +++ b/library/unistd/usleep.c @@ -1,5 +1,5 @@ /* - * $Id: unistd_usleep.c,v 1.3 2006-01-08 12:04:27 clib2devs Exp $ + * $Id: unistd_usleep.c,v 1.3 2006-01-08 12:04:27 clib4devs Exp $ */ #ifndef _UNISTD_HEADERS_H diff --git a/library/unistd/wildcard_expand.c b/library/unistd/wildcard_expand.c index c5b3181c..6658d6ea 100644 --- a/library/unistd/wildcard_expand.c +++ b/library/unistd/wildcard_expand.c @@ -1,5 +1,5 @@ /* - * $Id: unistd_wildcard_expand.c,v 1.17 2006-04-05 08:39:46 clib2devs Exp $ + * $Id: unistd_wildcard_expand.c,v 1.17 2006-04-05 08:39:46 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H @@ -60,12 +60,12 @@ int __wildcard_quote_parameter(unsigned int parameter) { CLIB_DESTRUCTOR(__wildcard_expand_exit) { ENTER(); - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; - if (__clib2->anchor != NULL) { - MatchEnd(__clib2->anchor); - FreeDosObject(DOS_ANCHORPATH, __clib2->anchor); - __clib2->anchor = NULL; + if (__clib4->anchor != NULL) { + MatchEnd(__clib4->anchor); + FreeDosObject(DOS_ANCHORPATH, __clib4->anchor); + __clib4->anchor = NULL; } LEAVE(); @@ -95,7 +95,7 @@ int __wildcard_expand_init(void) { char **argv; int error; int i; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; /* Disable dos.library requesters during pattern matching below. We do this so early in order to make it easier to reset the window @@ -103,17 +103,17 @@ int __wildcard_expand_init(void) { old_window_pointer = __set_process_window((APTR) - 1); /* No work to be done? */ - if (__clib2->__argc == 0 || __clib2->__argv == NULL) { + if (__clib4->__argc == 0 || __clib4->__argv == NULL) { error = OK; goto out; } - argc = __clib2->__argc; - argv = __clib2->__argv; + argc = __clib4->__argc; + argv = __clib4->__argv; ap = AllocDosObjectTags(DOS_ANCHORPATH, ADO_Strlen, 2 * MAXPATHLEN, - ADO_Mask, (__clib2->__check_abort_enabled) ? __clib2->__break_signal_mask : 0, + ADO_Mask, (__clib4->__check_abort_enabled) ? __clib4->__break_signal_mask : 0, TAG_END); if (ap == NULL) { @@ -122,7 +122,7 @@ int __wildcard_expand_init(void) { } /* This may have to be cleaned up later. */ - __clib2->anchor = ap; + __clib4->anchor = ap; /* The argument list will go in here. */ NewList((struct List *) &argument_list); @@ -199,7 +199,7 @@ int __wildcard_expand_init(void) { if (rc == ERROR_BREAK) { __set_process_window(old_window_pointer); - SetSignal(__clib2->__break_signal_mask, __clib2->__break_signal_mask); + SetSignal(__clib4->__break_signal_mask, __clib4->__break_signal_mask); __check_abort(); old_window_pointer = __set_process_window((APTR) - 1); @@ -281,8 +281,8 @@ int __wildcard_expand_init(void) { goto out; } - __clib2->__argc = argument_list_size; - __clib2->__argv = table; + __clib4->__argc = argument_list_size; + __clib4->__argv = table; /* Fill in the table, sorting the wildcard matches. */ last_wild = 0; @@ -352,15 +352,15 @@ int __wildcard_expand_init(void) { if (ap != NULL) { MatchEnd(ap); - FreeDosObject(DOS_ANCHORPATH, __clib2->anchor); + FreeDosObject(DOS_ANCHORPATH, __clib4->anchor); } - __clib2->anchor = NULL; + __clib4->anchor = NULL; if (error != OK) { __set_errno(error); - perror(__clib2->__argv[0]); + perror(__clib4->__argv[0]); abort(); } diff --git a/library/usergroup/endgrent.c b/library/usergroup/endgrent.c index 5927c0e3..40f1f432 100644 --- a/library/usergroup/endgrent.c +++ b/library/usergroup/endgrent.c @@ -1,5 +1,5 @@ /* - * $Id: usergroup_endgrent.c,v 1.3 2006-01-08 12:04:27 clib2devs Exp $ + * $Id: usergroup_endgrent.c,v 1.3 2006-01-08 12:04:27 clib4devs Exp $ */ #ifndef _USERGROUP_HEADERS_H diff --git a/library/usergroup/endpwent.c b/library/usergroup/endpwent.c index bc3da56b..66458fbe 100644 --- a/library/usergroup/endpwent.c +++ b/library/usergroup/endpwent.c @@ -1,5 +1,5 @@ /* - * $Id: usergroup_endpwent.c,v 1.3 2006-01-08 12:04:27 clib2devs Exp $ + * $Id: usergroup_endpwent.c,v 1.3 2006-01-08 12:04:27 clib4devs Exp $ */ #ifndef _USERGROUP_HEADERS_H diff --git a/library/usergroup/getegid.c b/library/usergroup/getegid.c index 137cc879..0a9eb3e5 100644 --- a/library/usergroup/getegid.c +++ b/library/usergroup/getegid.c @@ -1,5 +1,5 @@ /* - * $Id: usergroup_getegid.c,v 1.3 2006-01-08 12:04:27 clib2devs Exp $ + * $Id: usergroup_getegid.c,v 1.3 2006-01-08 12:04:27 clib4devs Exp $ */ #ifndef _USERGROUP_HEADERS_H @@ -14,12 +14,12 @@ gid_t getegid(void) { gid_t result; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); - if (__clib2->__root_mode) { - result = __clib2->__root_egid; + if (__clib4->__root_mode) { + result = __clib4->__root_egid; } else { result = __getegid(); } diff --git a/library/usergroup/geteuid.c b/library/usergroup/geteuid.c index 58eafe93..c3480038 100644 --- a/library/usergroup/geteuid.c +++ b/library/usergroup/geteuid.c @@ -1,5 +1,5 @@ /* - * $Id: usergroup_geteuid.c,v 1.3 2006-01-08 12:04:27 clib2devs Exp $ + * $Id: usergroup_geteuid.c,v 1.3 2006-01-08 12:04:27 clib4devs Exp $ */ #ifndef _USERGROUP_HEADERS_H @@ -14,12 +14,12 @@ uid_t geteuid(void) { uid_t result; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); - if (__clib2->__root_mode) { - result = __clib2->__root_euid; + if (__clib4->__root_mode) { + result = __clib4->__root_euid; } else { result = __geteuid(); } diff --git a/library/usergroup/getgid.c b/library/usergroup/getgid.c index ec32ac66..b6696d27 100644 --- a/library/usergroup/getgid.c +++ b/library/usergroup/getgid.c @@ -1,5 +1,5 @@ /* - * $Id: usergroup_getgid.c,v 1.3 2006-01-08 12:04:27 clib2devs Exp $ + * $Id: usergroup_getgid.c,v 1.3 2006-01-08 12:04:27 clib4devs Exp $ */ #ifndef _USERGROUP_HEADERS_H @@ -12,12 +12,12 @@ gid_t getgid(void) { gid_t result; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); - if (__clib2->__root_mode) { - result = __clib2->__root_gid; + if (__clib4->__root_mode) { + result = __clib4->__root_gid; } else { result = __getgid(); } diff --git a/library/usergroup/getgrent.c b/library/usergroup/getgrent.c index 529c0f0c..f79d3bab 100644 --- a/library/usergroup/getgrent.c +++ b/library/usergroup/getgrent.c @@ -1,5 +1,5 @@ /* - * $Id: usergroup_getgrent.c,v 1.3 2006-01-08 12:04:27 clib2devs Exp $ + * $Id: usergroup_getgrent.c,v 1.3 2006-01-08 12:04:27 clib4devs Exp $ */ #ifndef _USERGROUP_HEADERS_H diff --git a/library/usergroup/getgrgid.c b/library/usergroup/getgrgid.c index cca93e84..003333dd 100644 --- a/library/usergroup/getgrgid.c +++ b/library/usergroup/getgrgid.c @@ -1,5 +1,5 @@ /* - * $Id: usergroup_getgrgid.c,v 1.3 2006-01-08 12:04:27 clib2devs Exp $ + * $Id: usergroup_getgrgid.c,v 1.3 2006-01-08 12:04:27 clib4devs Exp $ */ #ifndef _USERGROUP_HEADERS_H diff --git a/library/usergroup/getgrnam.c b/library/usergroup/getgrnam.c index 417c69de..2b5ace2a 100644 --- a/library/usergroup/getgrnam.c +++ b/library/usergroup/getgrnam.c @@ -1,5 +1,5 @@ /* - * $Id: usergroup_getgrnam.c,v 1.4 2006-01-08 12:04:27 clib2devs Exp $ + * $Id: usergroup_getgrnam.c,v 1.4 2006-01-08 12:04:27 clib4devs Exp $ */ #ifndef _USERGROUP_HEADERS_H diff --git a/library/usergroup/getgroups.c b/library/usergroup/getgroups.c index a3297d4f..99f74349 100644 --- a/library/usergroup/getgroups.c +++ b/library/usergroup/getgroups.c @@ -1,5 +1,5 @@ /* - * $Id: usergroup_getgroups.c,v 1.5 2006-01-08 12:04:27 clib2devs Exp $ + * $Id: usergroup_getgroups.c,v 1.5 2006-01-08 12:04:27 clib4devs Exp $ */ #ifndef _USERGROUP_HEADERS_H diff --git a/library/usergroup/getpass.c b/library/usergroup/getpass.c index d088ad6f..9ae79fd1 100644 --- a/library/usergroup/getpass.c +++ b/library/usergroup/getpass.c @@ -1,5 +1,5 @@ /* - * $Id: usergroup_getpass.c,v 1.4 2006-01-08 12:04:27 clib2devs Exp $ + * $Id: usergroup_getpass.c,v 1.4 2006-01-08 12:04:27 clib4devs Exp $ */ #ifndef _USERGROUP_HEADERS_H diff --git a/library/usergroup/getpgrp.c b/library/usergroup/getpgrp.c index 0a378a82..1ea7b060 100644 --- a/library/usergroup/getpgrp.c +++ b/library/usergroup/getpgrp.c @@ -1,5 +1,5 @@ /* - * $Id: usergroup_getpgrp.c,v 1.0 2021-02-14 18:17:00 clib2devs Exp $ + * $Id: usergroup_getpgrp.c,v 1.0 2021-02-14 18:17:00 clib4devs Exp $ */ #ifndef _USERGROUP_HEADERS_H diff --git a/library/usergroup/getpwent.c b/library/usergroup/getpwent.c index 219f75fd..2ede305f 100644 --- a/library/usergroup/getpwent.c +++ b/library/usergroup/getpwent.c @@ -1,5 +1,5 @@ /* - * $Id: usergroup_getpwent.c,v 1.3 2006-01-08 12:04:27 clib2devs Exp $ + * $Id: usergroup_getpwent.c,v 1.3 2006-01-08 12:04:27 clib4devs Exp $ */ #ifndef _USERGROUP_HEADERS_H diff --git a/library/usergroup/getpwnam.c b/library/usergroup/getpwnam.c index 06d6d4aa..d614c60c 100644 --- a/library/usergroup/getpwnam.c +++ b/library/usergroup/getpwnam.c @@ -1,5 +1,5 @@ /* - * $Id: usergroup_getpwnam.c,v 1.4 2006-01-08 12:04:27 clib2devs Exp $ + * $Id: usergroup_getpwnam.c,v 1.4 2006-01-08 12:04:27 clib4devs Exp $ */ #ifndef _USERGROUP_HEADERS_H diff --git a/library/usergroup/getpwnam_r.c b/library/usergroup/getpwnam_r.c index 3ee3e4af..dbae48c3 100644 --- a/library/usergroup/getpwnam_r.c +++ b/library/usergroup/getpwnam_r.c @@ -1,5 +1,5 @@ /* - * $Id: usergroup_getpwnam_r.c,v 1.0 2023-04-13 12:04:27 clib2devs Exp $ + * $Id: usergroup_getpwnam_r.c,v 1.0 2023-04-13 12:04:27 clib4devs Exp $ */ #ifndef _USERGROUP_HEADERS_H diff --git a/library/usergroup/getpwuid.c b/library/usergroup/getpwuid.c index f959eb56..f9cee2d5 100644 --- a/library/usergroup/getpwuid.c +++ b/library/usergroup/getpwuid.c @@ -1,5 +1,5 @@ /* - * $Id: usergroup_getpwuid.c,v 1.3 2006-01-08 12:04:27 clib2devs Exp $ + * $Id: usergroup_getpwuid.c,v 1.3 2006-01-08 12:04:27 clib4devs Exp $ */ #ifndef _USERGROUP_HEADERS_H diff --git a/library/usergroup/getpwuid_r.c b/library/usergroup/getpwuid_r.c index 56f4d678..070a7797 100644 --- a/library/usergroup/getpwuid_r.c +++ b/library/usergroup/getpwuid_r.c @@ -1,5 +1,5 @@ /* - * $Id: usergroup_getpwuid_r.c,v 1.0 2023-04-13 12:04:27 clib2devs Exp $ + * $Id: usergroup_getpwuid_r.c,v 1.0 2023-04-13 12:04:27 clib4devs Exp $ */ #ifndef _STRING_HEADERS_H diff --git a/library/usergroup/getuid.c b/library/usergroup/getuid.c index 63788dd1..94a77b79 100644 --- a/library/usergroup/getuid.c +++ b/library/usergroup/getuid.c @@ -1,5 +1,5 @@ /* - * $Id: usergroup_getuid.c,v 1.3 2006-01-08 12:04:27 clib2devs Exp $ + * $Id: usergroup_getuid.c,v 1.3 2006-01-08 12:04:27 clib4devs Exp $ */ #ifndef _USERGROUP_HEADERS_H @@ -8,12 +8,12 @@ uid_t getuid(void) { uid_t result; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); - if (__clib2->__root_mode) { - result = __clib2->__root_uid; + if (__clib4->__root_mode) { + result = __clib4->__root_uid; } else { result = __getuid(); } diff --git a/library/usergroup/init_exit.c b/library/usergroup/init_exit.c index 0008515c..c7f0170d 100644 --- a/library/usergroup/init_exit.c +++ b/library/usergroup/init_exit.c @@ -1,5 +1,5 @@ /* - * $Id: usergroup_init_exit.c,v 1.12 2006-01-08 12:04:27 clib2devs Exp $ + * $Id: usergroup_init_exit.c,v 1.12 2006-01-08 12:04:27 clib4devs Exp $ */ #ifndef _USERGROUP_HEADERS_H @@ -17,16 +17,16 @@ CLIB_DESTRUCTOR(usergroup_exit) { ENTER(); - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; - if (__clib2->__IUserGroup != NULL) { - DropInterface((struct Interface *)__clib2->__IUserGroup); - __clib2->__IUserGroup = NULL; + if (__clib4->__IUserGroup != NULL) { + DropInterface((struct Interface *)__clib4->__IUserGroup); + __clib4->__IUserGroup = NULL; } - if (__clib2->__UserGroupBase != NULL) { - CloseLibrary(__clib2->__UserGroupBase); - __clib2->__UserGroupBase = NULL; + if (__clib4->__UserGroupBase != NULL) { + CloseLibrary(__clib4->__UserGroupBase); + __clib4->__UserGroupBase = NULL; } LEAVE(); @@ -35,21 +35,21 @@ CLIB_DESTRUCTOR(usergroup_exit) { CLIB_CONSTRUCTOR(usergroup_init) { struct TagItem tags[2]; BOOL success = FALSE; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); - __clib2->__UserGroupBase = OpenLibrary("usergroup.library", 0); + __clib4->__UserGroupBase = OpenLibrary("usergroup.library", 0); - if (__clib2->__UserGroupBase != NULL) { - __clib2->__IUserGroup = (struct UserGroupIFace *)GetInterface(__clib2->__UserGroupBase, "main", 1, 0); - if (__clib2->__IUserGroup == NULL) { - CloseLibrary(__clib2->__UserGroupBase); - __clib2->__UserGroupBase = NULL; + if (__clib4->__UserGroupBase != NULL) { + __clib4->__IUserGroup = (struct UserGroupIFace *)GetInterface(__clib4->__UserGroupBase, "main", 1, 0); + if (__clib4->__IUserGroup == NULL) { + CloseLibrary(__clib4->__UserGroupBase); + __clib4->__UserGroupBase = NULL; } } - if (__clib2->__UserGroupBase == NULL) { + if (__clib4->__UserGroupBase == NULL) { SHOWMSG("usergroup.library did not open"); __show_error("\"usergroup.library\" could not be opened."); @@ -62,7 +62,7 @@ CLIB_CONSTRUCTOR(usergroup_init) { tags[1].ti_Tag = TAG_END; - if (__ug_SetupContextTagList(__clib2->__progname, tags) != 0) + if (__ug_SetupContextTagList(__clib4->__progname, tags) != 0) { SHOWMSG("could not initialize usergroup.library"); diff --git a/library/usergroup/initgroups.c b/library/usergroup/initgroups.c index 5ae863d4..f80dc39b 100644 --- a/library/usergroup/initgroups.c +++ b/library/usergroup/initgroups.c @@ -1,5 +1,5 @@ /* - * $Id: usergroup_initgroups.c,v 1.5 2006-01-08 12:04:27 clib2devs Exp $ + * $Id: usergroup_initgroups.c,v 1.5 2006-01-08 12:04:27 clib4devs Exp $ */ #ifndef _USERGROUP_HEADERS_H diff --git a/library/usergroup/setegid.c b/library/usergroup/setegid.c index 083db08f..8822205e 100644 --- a/library/usergroup/setegid.c +++ b/library/usergroup/setegid.c @@ -1,5 +1,5 @@ /* - * $Id: usergroup_setegid.c,v 1.3 2006-01-08 12:04:27 clib2devs Exp $ + * $Id: usergroup_setegid.c,v 1.3 2006-01-08 12:04:27 clib4devs Exp $ */ #ifndef _USERGROUP_HEADERS_H diff --git a/library/usergroup/seteuid.c b/library/usergroup/seteuid.c index c5c65c0d..4362be4d 100644 --- a/library/usergroup/seteuid.c +++ b/library/usergroup/seteuid.c @@ -1,5 +1,5 @@ /* - * $Id: usergroup_seteuid.c,v 1.3 2006-01-08 12:04:27 clib2devs Exp $ + * $Id: usergroup_seteuid.c,v 1.3 2006-01-08 12:04:27 clib4devs Exp $ */ #ifndef _USERGROUP_HEADERS_H diff --git a/library/usergroup/setgid.c b/library/usergroup/setgid.c index 732d8c93..66512ef2 100644 --- a/library/usergroup/setgid.c +++ b/library/usergroup/setgid.c @@ -1,5 +1,5 @@ /* - * $Id: usergroup_setgid.c,v 1.4 2006-01-08 12:04:27 clib2devs Exp $ + * $Id: usergroup_setgid.c,v 1.4 2006-01-08 12:04:27 clib4devs Exp $ */ #ifndef _USERGROUP_HEADERS_H @@ -8,14 +8,14 @@ int setgid(gid_t id) { int result; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); SHOWVALUE(id); - if (__clib2->__root_mode) { - __clib2->__root_gid = id; + if (__clib4->__root_mode) { + __clib4->__root_gid = id; result = OK; } else { diff --git a/library/usergroup/setgrent.c b/library/usergroup/setgrent.c index a5497b43..764485cc 100644 --- a/library/usergroup/setgrent.c +++ b/library/usergroup/setgrent.c @@ -1,5 +1,5 @@ /* - * $Id: usergroup_setgrent.c,v 1.3 2006-01-08 12:04:27 clib2devs Exp $ + * $Id: usergroup_setgrent.c,v 1.3 2006-01-08 12:04:27 clib4devs Exp $ */ #ifndef _USERGROUP_HEADERS_H diff --git a/library/usergroup/setgroups.c b/library/usergroup/setgroups.c index b68fde4e..849f893c 100644 --- a/library/usergroup/setgroups.c +++ b/library/usergroup/setgroups.c @@ -1,5 +1,5 @@ /* - * $Id: usergroup_setgroups.c,v 1.5 2006-01-08 12:04:27 clib2devs Exp $ + * $Id: usergroup_setgroups.c,v 1.5 2006-01-08 12:04:27 clib4devs Exp $ */ #ifndef _USERGROUP_HEADERS_H diff --git a/library/usergroup/setpwent.c b/library/usergroup/setpwent.c index b79ac4d3..70cebdc3 100644 --- a/library/usergroup/setpwent.c +++ b/library/usergroup/setpwent.c @@ -1,5 +1,5 @@ /* - * $Id: usergroup_setpwent.c,v 1.3 2006-01-08 12:04:27 clib2devs Exp $ + * $Id: usergroup_setpwent.c,v 1.3 2006-01-08 12:04:27 clib4devs Exp $ */ #ifndef _USERGROUP_HEADERS_H diff --git a/library/usergroup/setregid.c b/library/usergroup/setregid.c index 055d59fb..2c13e083 100644 --- a/library/usergroup/setregid.c +++ b/library/usergroup/setregid.c @@ -1,5 +1,5 @@ /* - * $Id: usergroup_setregid.c,v 1.4 2006-01-08 12:04:27 clib2devs Exp $ + * $Id: usergroup_setregid.c,v 1.4 2006-01-08 12:04:27 clib4devs Exp $ */ #ifndef _USERGROUP_HEADERS_H @@ -8,19 +8,19 @@ int setregid(gid_t real, gid_t eff) { int result; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); SHOWVALUE(real); SHOWVALUE(eff); - if (__clib2->__root_mode) { + if (__clib4->__root_mode) { if (real != (gid_t) - 1) - __clib2->__root_gid = real; + __clib4->__root_gid = real; if (eff != (gid_t) - 1) - __clib2->__root_egid = eff; + __clib4->__root_egid = eff; result = OK; } else { diff --git a/library/usergroup/setreuid.c b/library/usergroup/setreuid.c index d941cd55..1805b9cc 100644 --- a/library/usergroup/setreuid.c +++ b/library/usergroup/setreuid.c @@ -1,5 +1,5 @@ /* - * $Id: usergroup_setreuid.c,v 1.4 2006-01-08 12:04:27 clib2devs Exp $ + * $Id: usergroup_setreuid.c,v 1.4 2006-01-08 12:04:27 clib4devs Exp $ */ #ifndef _USERGROUP_HEADERS_H @@ -9,19 +9,19 @@ int setreuid(uid_t real, uid_t eff) { int result; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); SHOWVALUE(real); SHOWVALUE(eff); - if (__clib2->__root_mode) { + if (__clib4->__root_mode) { if (real != (uid_t) - 1) - __clib2->__root_uid = real; + __clib4->__root_uid = real; if (eff != (uid_t) - 1) - __clib2->__root_euid = eff; + __clib4->__root_euid = eff; result = OK; } else { diff --git a/library/usergroup/setsid.c b/library/usergroup/setsid.c index 695f881f..578eaa94 100644 --- a/library/usergroup/setsid.c +++ b/library/usergroup/setsid.c @@ -1,5 +1,5 @@ /* - * $Id: usergroup_setsid.c,v 1.4 2006-01-08 12:04:27 clib2devs Exp $ + * $Id: usergroup_setsid.c,v 1.4 2006-01-08 12:04:27 clib4devs Exp $ */ #ifndef _USERGROUP_HEADERS_H diff --git a/library/usergroup/setuid.c b/library/usergroup/setuid.c index 8144bef7..07da3969 100644 --- a/library/usergroup/setuid.c +++ b/library/usergroup/setuid.c @@ -1,5 +1,5 @@ /* - * $Id: usergroup_setuid.c,v 1.4 2006-01-08 12:04:27 clib2devs Exp $ + * $Id: usergroup_setuid.c,v 1.4 2006-01-08 12:04:27 clib4devs Exp $ */ #ifndef _USERGROUP_HEADERS_H @@ -9,14 +9,14 @@ int setuid(uid_t id) { int result; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); SHOWVALUE(id); - if (__clib2->__root_mode) { - __clib2->__root_uid = id; + if (__clib4->__root_mode) { + __clib4->__root_uid = id; result = OK; } else { diff --git a/library/usergroup/tcgetpgrp.c b/library/usergroup/tcgetpgrp.c index ea581a99..60b13f2c 100644 --- a/library/usergroup/tcgetpgrp.c +++ b/library/usergroup/tcgetpgrp.c @@ -1,5 +1,5 @@ /* - * $Id: usergroup_tcgetpgrp.c,v 1.0 2022-02-16 18:17:00 clib2devs Exp $ + * $Id: usergroup_tcgetpgrp.c,v 1.0 2022-02-16 18:17:00 clib4devs Exp $ */ #ifndef _USERGROUP_HEADERS_H diff --git a/library/usergroup/tcsetpgrp.c b/library/usergroup/tcsetpgrp.c index 9482a227..b8872ce4 100644 --- a/library/usergroup/tcsetpgrp.c +++ b/library/usergroup/tcsetpgrp.c @@ -1,5 +1,5 @@ /* - * $Id: usergroup_tcgetpgrp.c,v 1.0 2022-02-16 18:17:00 clib2devs Exp $ + * $Id: usergroup_tcgetpgrp.c,v 1.0 2022-02-16 18:17:00 clib4devs Exp $ */ #ifndef _USERGROUP_HEADERS_H diff --git a/library/usergroup/usergroup_headers.h b/library/usergroup/usergroup_headers.h index cc833aa5..128cd9e7 100755 --- a/library/usergroup/usergroup_headers.h +++ b/library/usergroup/usergroup_headers.h @@ -1,5 +1,5 @@ /* - * $Id: usergroup_headers.h,v 1.8 2006-01-08 12:04:27 clib2devs Exp $ + * $Id: usergroup_headers.h,v 1.8 2006-01-08 12:04:27 clib4devs Exp $ */ #ifndef _USERGROUP_HEADERS_H @@ -26,8 +26,8 @@ #endif /* _GRP_H */ #define DECLARE_USERGROUPBASE() \ - struct Library UNUSED *UserGroupBase = __CLIB2->__UserGroupBase; \ - struct UserGroupIFace *IUserGroup = __CLIB2->__IUserGroup + struct Library UNUSED *UserGroupBase = __CLIB4->__UserGroupBase; \ + struct UserGroupIFace *IUserGroup = __CLIB4->__IUserGroup #ifndef _PATH_SERVICES @@ -36,44 +36,44 @@ #include -#define __ug_SetupContextTagList(name, tags) __CLIB2->__IUserGroup->ug_SetupContextTagList(name, tags) -#define __ug_GetErr() __CLIB2->__IUserGroup->ug_GetErr() -#define __ug_StrError(err) __CLIB2->__IUserGroup->ug_StrError(err) -#define __getuid() __CLIB2->__IUserGroup->getuid() -#define __geteuid() __CLIB2->__IUserGroup->geteuid() -#define __setreuid(real, effective) __CLIB2->__IUserGroup->setreuid(real, effective) -#define __setuid(uid) __CLIB2->__IUserGroup->setuid(uid) -#define __getgid() __CLIB2->__IUserGroup->getgid() -#define __getegid() __CLIB2->__IUserGroup->getegid() -#define __setregid(real, effective) __CLIB2->__IUserGroup->setregid(real, effective) -#define __setgid(gid) __CLIB2->__IUserGroup->setgid(gid) -#define __getgroups(gidsetlen, gidset) __CLIB2->__IUserGroup->getgroups(gidsetlen, gidset) -#define __setgroups(gidsetlen, gidset) __CLIB2->__IUserGroup->setgroups(gidsetlen, gidset) -#define __initgroups(name, basegid) __CLIB2->__IUserGroup->initgroups(name, basegid) -#define __getpwnam(login) __CLIB2->__IUserGroup->getpwnam(login) -#define __getpwuid(uid) __CLIB2->__IUserGroup->getpwuid(uid) -#define __setpwent() __CLIB2->__IUserGroup->setpwent() -#define __getpwent() __CLIB2->__IUserGroup->getpwent() -#define __endpwent() __CLIB2->__IUserGroup->endpwent() -#define __getgrnam(name) __CLIB2->__IUserGroup->getgrnam(name) -#define __getgrgid(gid) __CLIB2->__IUserGroup->getgrgid(gid) -#define __setgrent() __CLIB2->__IUserGroup->setgrent() -#define __getgrent() __CLIB2->__IUserGroup->getgrent() -#define __endgrent() __CLIB2->__IUserGroup->endgrent() -#define __crypt(key, set) __CLIB2->__IUserGroup->crypt(key, set) -#define __ug_GetSalt(user, buf, size) __CLIB2->__IUserGroup->ug_GetSalt(user, buf, size) -#define __getpass(prompt) __CLIB2->__IUserGroup->getpass(prompt) -#define __umask(mask) __CLIB2->__IUserGroup->umask(mask) -#define __getumask() __CLIB2->__IUserGroup->getumask() -#define __setsid() __CLIB2->__IUserGroup->setsid() -#define __getpgrp() __CLIB2->__IUserGroup->getpgrp() -#define __getlogin() __CLIB2->__IUserGroup->getlogin() -#define __setlogin(name) __CLIB2->__IUserGroup->setlogin(name) -#define __setutent() __CLIB2->__IUserGroup->setutent() -#define __getutent() __CLIB2->__IUserGroup->getutent() -#define __endutent() __CLIB2->__IUserGroup->endutent() -#define __getlastlog(uid) __CLIB2->__IUserGroup->getlastlog(uid) -#define __setlastlog(uid, name, host) __CLIB2->__IUserGroup->setlastlog(uid, name, host) -#define __getcredentials(task) __CLIB2->__IUserGroup->getcredentials(task) +#define __ug_SetupContextTagList(name, tags) __CLIB4->__IUserGroup->ug_SetupContextTagList(name, tags) +#define __ug_GetErr() __CLIB4->__IUserGroup->ug_GetErr() +#define __ug_StrError(err) __CLIB4->__IUserGroup->ug_StrError(err) +#define __getuid() __CLIB4->__IUserGroup->getuid() +#define __geteuid() __CLIB4->__IUserGroup->geteuid() +#define __setreuid(real, effective) __CLIB4->__IUserGroup->setreuid(real, effective) +#define __setuid(uid) __CLIB4->__IUserGroup->setuid(uid) +#define __getgid() __CLIB4->__IUserGroup->getgid() +#define __getegid() __CLIB4->__IUserGroup->getegid() +#define __setregid(real, effective) __CLIB4->__IUserGroup->setregid(real, effective) +#define __setgid(gid) __CLIB4->__IUserGroup->setgid(gid) +#define __getgroups(gidsetlen, gidset) __CLIB4->__IUserGroup->getgroups(gidsetlen, gidset) +#define __setgroups(gidsetlen, gidset) __CLIB4->__IUserGroup->setgroups(gidsetlen, gidset) +#define __initgroups(name, basegid) __CLIB4->__IUserGroup->initgroups(name, basegid) +#define __getpwnam(login) __CLIB4->__IUserGroup->getpwnam(login) +#define __getpwuid(uid) __CLIB4->__IUserGroup->getpwuid(uid) +#define __setpwent() __CLIB4->__IUserGroup->setpwent() +#define __getpwent() __CLIB4->__IUserGroup->getpwent() +#define __endpwent() __CLIB4->__IUserGroup->endpwent() +#define __getgrnam(name) __CLIB4->__IUserGroup->getgrnam(name) +#define __getgrgid(gid) __CLIB4->__IUserGroup->getgrgid(gid) +#define __setgrent() __CLIB4->__IUserGroup->setgrent() +#define __getgrent() __CLIB4->__IUserGroup->getgrent() +#define __endgrent() __CLIB4->__IUserGroup->endgrent() +#define __crypt(key, set) __CLIB4->__IUserGroup->crypt(key, set) +#define __ug_GetSalt(user, buf, size) __CLIB4->__IUserGroup->ug_GetSalt(user, buf, size) +#define __getpass(prompt) __CLIB4->__IUserGroup->getpass(prompt) +#define __umask(mask) __CLIB4->__IUserGroup->umask(mask) +#define __getumask() __CLIB4->__IUserGroup->getumask() +#define __setsid() __CLIB4->__IUserGroup->setsid() +#define __getpgrp() __CLIB4->__IUserGroup->getpgrp() +#define __getlogin() __CLIB4->__IUserGroup->getlogin() +#define __setlogin(name) __CLIB4->__IUserGroup->setlogin(name) +#define __setutent() __CLIB4->__IUserGroup->setutent() +#define __getutent() __CLIB4->__IUserGroup->getutent() +#define __endutent() __CLIB4->__IUserGroup->endutent() +#define __getlastlog(uid) __CLIB4->__IUserGroup->getlastlog(uid) +#define __setlastlog(uid, name, host) __CLIB4->__IUserGroup->setlastlog(uid, name, host) +#define __getcredentials(task) __CLIB4->__IUserGroup->getcredentials(task) #endif /* _USERGROUP_HEADERS_H */ diff --git a/library/wait/wait.c b/library/wait/wait.c index 0a881e7b..f53e8aaf 100644 --- a/library/wait/wait.c +++ b/library/wait/wait.c @@ -1,5 +1,5 @@ /* - * $Id: wait_wait.c,v 1.0 2023-06-09 12:04:27 clib2devs Exp $ + * $Id: wait_wait.c,v 1.0 2023-06-09 12:04:27 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H diff --git a/library/wchar/_mbstowcs_r.c b/library/wchar/_mbstowcs_r.c index a59d5f99..658f50a2 100644 --- a/library/wchar/_mbstowcs_r.c +++ b/library/wchar/_mbstowcs_r.c @@ -1,5 +1,5 @@ /* - * $Id: _mbstowcs_r.c,v 1.0 2022-01-05 16:12:27 clib2devs Exp $ + * $Id: _mbstowcs_r.c,v 1.0 2022-01-05 16:12:27 clib4devs Exp $ */ #ifndef _WCHAR_HEADERS_H diff --git a/library/wchar/_mbtowc_r.c b/library/wchar/_mbtowc_r.c index f0c8853b..84c40d7b 100644 --- a/library/wchar/_mbtowc_r.c +++ b/library/wchar/_mbtowc_r.c @@ -1,5 +1,5 @@ /* - * $Id: wchar__mbtowc.c,v 1.0 2021-02-06 16:12:27 clib2devs Exp $ + * $Id: wchar__mbtowc.c,v 1.0 2021-02-06 16:12:27 clib4devs Exp $ */ #ifndef _WCHAR_HEADERS_H @@ -40,7 +40,7 @@ static JIS_ACTION JIS_action_table[JIS_S_NUM][JIS_C_NUM] = { int _mbtowc_r(wchar_t *pwc, const char *s, size_t n, mbstate_t *state) { wchar_t dummy; unsigned char *t = (unsigned char *) s; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; if (pwc == NULL) pwc = &dummy; @@ -48,10 +48,10 @@ int _mbtowc_r(wchar_t *pwc, const char *s, size_t n, mbstate_t *state) { if (s != NULL && n == 0) return -2; - if (__clib2->_current_locale == NULL || (strlen(__clib2->_current_locale) <= 1)) { + if (__clib4->_current_locale == NULL || (strlen(__clib4->_current_locale) <= 1)) { /* fall-through */ } - else if (!strcmp(__clib2->_current_locale, "C-UTF-8")) { + else if (!strcmp(__clib4->_current_locale, "C-UTF-8")) { int ch; int i = 0; @@ -276,7 +276,7 @@ int _mbtowc_r(wchar_t *pwc, const char *s, size_t n, mbstate_t *state) { return i; } else return -1; - } else if (!strcmp(__clib2->_current_locale, "C-SJIS")) { + } else if (!strcmp(__clib4->_current_locale, "C-SJIS")) { int ch; int i = 0; if (s == NULL) @@ -299,7 +299,7 @@ int _mbtowc_r(wchar_t *pwc, const char *s, size_t n, mbstate_t *state) { } else return -1; } - } else if (!strcmp(__clib2->_current_locale, "C-EUCJP")) { + } else if (!strcmp(__clib4->_current_locale, "C-EUCJP")) { int ch; int i = 0; if (s == NULL) @@ -322,7 +322,7 @@ int _mbtowc_r(wchar_t *pwc, const char *s, size_t n, mbstate_t *state) { } else return -1; } - } else if (!strcmp(__clib2->_current_locale, "C-JIS")) { + } else if (!strcmp(__clib4->_current_locale, "C-JIS")) { JIS_STATE curr_state; JIS_ACTION action; JIS_CHAR_TYPE ch; diff --git a/library/wchar/_wcstombs_r.c b/library/wchar/_wcstombs_r.c index 6d13fb9f..68b457d5 100644 --- a/library/wchar/_wcstombs_r.c +++ b/library/wchar/_wcstombs_r.c @@ -1,5 +1,5 @@ /* - * $Id: _wcstombs_r.c,v 1.0 2022-01-05 16:12:27 clib2devs Exp $ + * $Id: _wcstombs_r.c,v 1.0 2022-01-05 16:12:27 clib4devs Exp $ */ #ifndef _WCHAR_HEADERS_H diff --git a/library/wchar/bittab.c b/library/wchar/bittab.c index f1ed99d7..83b12e12 100644 --- a/library/wchar/bittab.c +++ b/library/wchar/bittab.c @@ -1,5 +1,5 @@ /* - * $Id: wchar_bittab.c,v 1.0 2021-02-03 19:11:16 clib2devs Exp $ + * $Id: wchar_bittab.c,v 1.0 2021-02-03 19:11:16 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H diff --git a/library/wchar/btowc.c b/library/wchar/btowc.c index b4294be4..bb298549 100755 --- a/library/wchar/btowc.c +++ b/library/wchar/btowc.c @@ -1,5 +1,5 @@ /* - * $Id: wchar_btowc.c,v 1.4 2021-02-03 19:11:16 clib2devs Exp $ + * $Id: wchar_btowc.c,v 1.4 2021-02-03 19:11:16 clib4devs Exp $ */ #ifndef _WCHAR_HEADERS_H @@ -10,9 +10,9 @@ wint_t btowc(int c) { - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; - mbstate_t *mbs = &__clib2->wide_status->_mbtowc_state; + mbstate_t *mbs = &__clib4->wide_status->_mbtowc_state; int retval = 0; wchar_t pwc; char b; diff --git a/library/wchar/c16rtomb.c b/library/wchar/c16rtomb.c index 4d70c6fb..61951775 100644 --- a/library/wchar/c16rtomb.c +++ b/library/wchar/c16rtomb.c @@ -1,5 +1,5 @@ /* - * $Id: wchar_c16rtomb.c,v 1.0 2022-08-04 19:11:16 clib2devs Exp $ + * $Id: wchar_c16rtomb.c,v 1.0 2022-08-04 19:11:16 clib4devs Exp $ */ #ifndef _WCHAR_HEADERS_H diff --git a/library/wchar/c32rtomb.c b/library/wchar/c32rtomb.c index 43b67c2a..0cb7f678 100644 --- a/library/wchar/c32rtomb.c +++ b/library/wchar/c32rtomb.c @@ -1,5 +1,5 @@ /* - * $Id: wchar_c32rtomb.c,v 1.0 2022-08-04 19:11:16 clib2devs Exp $ + * $Id: wchar_c32rtomb.c,v 1.0 2022-08-04 19:11:16 clib4devs Exp $ */ #ifndef _WCHAR_HEADERS_H diff --git a/library/wchar/fgetwc.c b/library/wchar/fgetwc.c index da305e2a..854fe786 100644 --- a/library/wchar/fgetwc.c +++ b/library/wchar/fgetwc.c @@ -1,5 +1,5 @@ /* - * $Id: wchar_fgetwc.c,v 1.3 2006-01-08 12:04:27 clib2devs Exp $ + * $Id: wchar_fgetwc.c,v 1.3 2006-01-08 12:04:27 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H diff --git a/library/wchar/fgetws.c b/library/wchar/fgetws.c index 753bb43a..f78946f6 100644 --- a/library/wchar/fgetws.c +++ b/library/wchar/fgetws.c @@ -1,5 +1,5 @@ /* - * $Id: wchar_fgetws.c,v 1.3 2006-01-08 12:04:27 clib2devs Exp $ + * $Id: wchar_fgetws.c,v 1.3 2006-01-08 12:04:27 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H diff --git a/library/wchar/fputwc.c b/library/wchar/fputwc.c index 66e0040e..a15e164b 100644 --- a/library/wchar/fputwc.c +++ b/library/wchar/fputwc.c @@ -1,5 +1,5 @@ /* - * $Id: wchar_fputwc.c,v 1.4 2021-02-03 18:49:27 clib2devs Exp $ + * $Id: wchar_fputwc.c,v 1.4 2021-02-03 18:49:27 clib4devs Exp $ */ #ifndef _WCHAR_HEADERS_H diff --git a/library/wchar/fputws.c b/library/wchar/fputws.c index 85d6cea4..bb63823c 100644 --- a/library/wchar/fputws.c +++ b/library/wchar/fputws.c @@ -1,5 +1,5 @@ /* - * $Id: wchar_fputws.c,v 1.3 2006-01-08 12:04:27 clib2devs Exp $ + * $Id: wchar_fputws.c,v 1.3 2006-01-08 12:04:27 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H diff --git a/library/wchar/fwide.c b/library/wchar/fwide.c index 95f134e7..09b0bb17 100644 --- a/library/wchar/fwide.c +++ b/library/wchar/fwide.c @@ -1,5 +1,5 @@ /* - * $Id: wchar_fwide.c,v 1.3 2006-01-08 12:04:27 clib2devs Exp $ + * $Id: wchar_fwide.c,v 1.3 2006-01-08 12:04:27 clib4devs Exp $ */ #ifndef _WCHAR_HEADERS_H diff --git a/library/wchar/fwprintf.c b/library/wchar/fwprintf.c index 6f6df4ae..57ce2d81 100644 --- a/library/wchar/fwprintf.c +++ b/library/wchar/fwprintf.c @@ -1,5 +1,5 @@ /* - * $Id: wchar_fwprintf.c,v 1.1 2022-03-04 16:32:11 clib2devs Exp $ + * $Id: wchar_fwprintf.c,v 1.1 2022-03-04 16:32:11 clib4devs Exp $ */ #ifndef _WCHAR_HEADERS_H diff --git a/library/wchar/fwscanf.c b/library/wchar/fwscanf.c index 617455de..2dc8d76f 100644 --- a/library/wchar/fwscanf.c +++ b/library/wchar/fwscanf.c @@ -1,5 +1,5 @@ /* - * $Id: wchar_fwscanf.c,v 1.0 2022-03-05 18:32:07 clib2devs Exp $ + * $Id: wchar_fwscanf.c,v 1.0 2022-03-05 18:32:07 clib4devs Exp $ */ #ifndef _WCHAR_HEADERS_H diff --git a/library/wchar/getwc.c b/library/wchar/getwc.c index 1a1dcc94..d27b75db 100644 --- a/library/wchar/getwc.c +++ b/library/wchar/getwc.c @@ -1,5 +1,5 @@ /* - * $Id: wchar_getwc.c,v 1.3 2006-01-08 12:04:27 clib2devs Exp $ + * $Id: wchar_getwc.c,v 1.3 2006-01-08 12:04:27 clib4devs Exp $ */ #ifndef _WCHAR_HEADERS_H diff --git a/library/wchar/getwchar.c b/library/wchar/getwchar.c index 5cdfa3de..a9642907 100644 --- a/library/wchar/getwchar.c +++ b/library/wchar/getwchar.c @@ -1,5 +1,5 @@ /* - * $Id: wchar_getwchar.c,v 1.1 2022-03-05 19:36:27 clib2devs Exp $ + * $Id: wchar_getwchar.c,v 1.1 2022-03-05 19:36:27 clib4devs Exp $ */ #ifndef _WCHAR_HEADERS_H diff --git a/library/wchar/iswalnum.c b/library/wchar/iswalnum.c index c2230d53..e06253cf 100644 --- a/library/wchar/iswalnum.c +++ b/library/wchar/iswalnum.c @@ -1,5 +1,5 @@ /* - * $Id: wctype_iswalnum.c,v 1.4 2021-02-04 00:16:27 clib2devs Exp $ + * $Id: wctype_iswalnum.c,v 1.4 2021-02-04 00:16:27 clib4devs Exp $ */ #ifndef _WCTYPE_HEADERS_H diff --git a/library/wchar/iswalpha.c b/library/wchar/iswalpha.c index f84ef88b..de523b89 100644 --- a/library/wchar/iswalpha.c +++ b/library/wchar/iswalpha.c @@ -1,5 +1,5 @@ /* - * $Id: wctype_iswalpha.c,v 1.4 2021-02-03 23:55:27 clib2devs Exp $ + * $Id: wctype_iswalpha.c,v 1.4 2021-02-03 23:55:27 clib4devs Exp $ */ #ifndef _WCHAR_HEADERS_H @@ -17,21 +17,21 @@ int iswalpha(wint_t c) { int unicode = 0; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; - if (__clib2->_current_locale[0] == 'C' && __clib2->_current_locale[1] == '\0') { + if (__clib4->_current_locale[0] == 'C' && __clib4->_current_locale[1] == '\0') { unicode = 0; /* fall-through */ - } else if (!strcmp(__clib2->_current_locale, "C-JIS")) { + } else if (!strcmp(__clib4->_current_locale, "C-JIS")) { c = __jp2uc(c, JP_JIS); unicode = 1; - } else if (!strcmp(__clib2->_current_locale, "C-SJIS")) { + } else if (!strcmp(__clib4->_current_locale, "C-SJIS")) { c = __jp2uc(c, JP_SJIS); unicode = 1; - } else if (!strcmp(__clib2->_current_locale, "C-EUCJP")) { + } else if (!strcmp(__clib4->_current_locale, "C-EUCJP")) { c = __jp2uc(c, JP_EUCJP); unicode = 1; - } else if (!strcmp(__clib2->_current_locale, "C-UTF-8")) { + } else if (!strcmp(__clib4->_current_locale, "C-UTF-8")) { unicode = 1; } diff --git a/library/wchar/iswblank.c b/library/wchar/iswblank.c index d31caf61..ada4677e 100644 --- a/library/wchar/iswblank.c +++ b/library/wchar/iswblank.c @@ -1,5 +1,5 @@ /* - * $Id: wctype_iswblank.c,v 1.4 2021-02-03 23:57:27 clib2devs Exp $ + * $Id: wctype_iswblank.c,v 1.4 2021-02-03 23:57:27 clib4devs Exp $ */ #ifndef _WCHAR_HEADERS_H @@ -16,23 +16,23 @@ int iswblank(wint_t c) { int unicode = 0; int result; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); - if (__clib2->_current_locale[0] == 'C' && __clib2->_current_locale[1] == '\0') { + if (__clib4->_current_locale[0] == 'C' && __clib4->_current_locale[1] == '\0') { unicode = 0; /* fall-through */ - } else if (!strcmp(__clib2->_current_locale, "C-JIS")) { + } else if (!strcmp(__clib4->_current_locale, "C-JIS")) { c = __jp2uc(c, JP_JIS); unicode = 1; - } else if (!strcmp(__clib2->_current_locale, "C-SJIS")) { + } else if (!strcmp(__clib4->_current_locale, "C-SJIS")) { c = __jp2uc(c, JP_SJIS); unicode = 1; - } else if (!strcmp(__clib2->_current_locale, "C-EUCJP")) { + } else if (!strcmp(__clib4->_current_locale, "C-EUCJP")) { c = __jp2uc(c, JP_EUCJP); unicode = 1; - } else if (!strcmp(__clib2->_current_locale, "C-UTF-8")) { + } else if (!strcmp(__clib4->_current_locale, "C-UTF-8")) { unicode = 1; } diff --git a/library/wchar/iswcntrl.c b/library/wchar/iswcntrl.c index dcf83b1c..938284ce 100644 --- a/library/wchar/iswcntrl.c +++ b/library/wchar/iswcntrl.c @@ -1,5 +1,5 @@ /* - * $Id: wctype_iswcntrl.c,v 1.4 2021-02-03 23:58:27 clib2devs Exp $ + * $Id: wctype_iswcntrl.c,v 1.4 2021-02-03 23:58:27 clib4devs Exp $ */ #ifndef _WCHAR_HEADERS_H @@ -16,23 +16,23 @@ int iswcntrl(wint_t c) { int unicode = 0; int result; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); - if (__clib2->_current_locale[0] == 'C' && __clib2->_current_locale[1] == '\0') { + if (__clib4->_current_locale[0] == 'C' && __clib4->_current_locale[1] == '\0') { unicode = 0; /* fall-through */ - } else if (!strcmp(__clib2->_current_locale, "C-JIS")) { + } else if (!strcmp(__clib4->_current_locale, "C-JIS")) { c = __jp2uc(c, JP_JIS); unicode = 1; - } else if (!strcmp(__clib2->_current_locale, "C-SJIS")) { + } else if (!strcmp(__clib4->_current_locale, "C-SJIS")) { c = __jp2uc(c, JP_SJIS); unicode = 1; - } else if (!strcmp(__clib2->_current_locale, "C-EUCJP")) { + } else if (!strcmp(__clib4->_current_locale, "C-EUCJP")) { c = __jp2uc(c, JP_EUCJP); unicode = 1; - } else if (!strcmp(__clib2->_current_locale, "C-UTF-8")) { + } else if (!strcmp(__clib4->_current_locale, "C-UTF-8")) { unicode = 1; } diff --git a/library/wchar/iswctype.c b/library/wchar/iswctype.c index 4ab97f45..019f9b92 100644 --- a/library/wchar/iswctype.c +++ b/library/wchar/iswctype.c @@ -1,5 +1,5 @@ /* - * $Id: wctype_iswctype.c,v 1.4 2021-02-03 23:59:27 clib2devs Exp $ + * $Id: wctype_iswctype.c,v 1.4 2021-02-03 23:59:27 clib4devs Exp $ */ #ifndef _WCHAR_HEADERS_H diff --git a/library/wchar/iswdigit.c b/library/wchar/iswdigit.c index 73f411d6..2aea1b96 100644 --- a/library/wchar/iswdigit.c +++ b/library/wchar/iswdigit.c @@ -1,5 +1,5 @@ /* - * $Id: wctype_iswdigit.c,v 1.4 2021-02-04 00:00:27 clib2devs Exp $ + * $Id: wctype_iswdigit.c,v 1.4 2021-02-04 00:00:27 clib4devs Exp $ */ #ifndef _WCHAR_HEADERS_H diff --git a/library/wchar/iswgraph.c b/library/wchar/iswgraph.c index 62710340..068bc6dd 100644 --- a/library/wchar/iswgraph.c +++ b/library/wchar/iswgraph.c @@ -1,5 +1,5 @@ /* - * $Id: wctype_iswgraph.c,v 1.4 2021-02-04 00:01:27 clib2devs Exp $ + * $Id: wctype_iswgraph.c,v 1.4 2021-02-04 00:01:27 clib4devs Exp $ */ #ifndef _WCTYPE_HEADERS_H diff --git a/library/wchar/iswlower.c b/library/wchar/iswlower.c index 4140c783..7d9147c5 100644 --- a/library/wchar/iswlower.c +++ b/library/wchar/iswlower.c @@ -1,5 +1,5 @@ /* - * $Id: wctype_iswlower.c,v 1.4 2021-02-04 00:02:27 clib2devs Exp $ + * $Id: wctype_iswlower.c,v 1.4 2021-02-04 00:02:27 clib4devs Exp $ */ #ifndef _WCTYPE_HEADERS_H diff --git a/library/wchar/iswprint.c b/library/wchar/iswprint.c index cd1e375e..875043e9 100644 --- a/library/wchar/iswprint.c +++ b/library/wchar/iswprint.c @@ -1,5 +1,5 @@ /* - * $Id: wctype_iswprint.c,v 1.4 2021-02-04 00:03:27 clib2devs Exp $ + * $Id: wctype_iswprint.c,v 1.4 2021-02-04 00:03:27 clib4devs Exp $ */ #ifndef _WCHAR_HEADERS_H @@ -17,21 +17,21 @@ int iswprint(wint_t c) { int unicode = 0; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; - if (__clib2->_current_locale[0] == 'C' && __clib2->_current_locale[1] == '\0') { + if (__clib4->_current_locale[0] == 'C' && __clib4->_current_locale[1] == '\0') { unicode = 0; /* fall-through */ - } else if (!strcmp(__clib2->_current_locale, "C-JIS")) { + } else if (!strcmp(__clib4->_current_locale, "C-JIS")) { c = __jp2uc(c, JP_JIS); unicode = 1; - } else if (!strcmp(__clib2->_current_locale, "C-SJIS")) { + } else if (!strcmp(__clib4->_current_locale, "C-SJIS")) { c = __jp2uc(c, JP_SJIS); unicode = 1; - } else if (!strcmp(__clib2->_current_locale, "C-EUCJP")) { + } else if (!strcmp(__clib4->_current_locale, "C-EUCJP")) { c = __jp2uc(c, JP_EUCJP); unicode = 1; - } else if (!strcmp(__clib2->_current_locale, "C-UTF-8")) { + } else if (!strcmp(__clib4->_current_locale, "C-UTF-8")) { unicode = 1; } diff --git a/library/wchar/iswpunc.c b/library/wchar/iswpunc.c index 9b64c198..a450b4e6 100644 --- a/library/wchar/iswpunc.c +++ b/library/wchar/iswpunc.c @@ -1,5 +1,5 @@ /* - * $Id: wctype_iswpunc.c,v 1.4 2021-02-03 00:14:27 clib2devs Exp $ + * $Id: wctype_iswpunc.c,v 1.4 2021-02-03 00:14:27 clib4devs Exp $ */ @@ -18,21 +18,21 @@ int iswpunct(wint_t c) { int unicode = 0; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; - if (__clib2->_current_locale[0] == 'C' && __clib2->_current_locale[1] == '\0') { + if (__clib4->_current_locale[0] == 'C' && __clib4->_current_locale[1] == '\0') { unicode = 0; /* fall-through */ - } else if (!strcmp(__clib2->_current_locale, "C-JIS")) { + } else if (!strcmp(__clib4->_current_locale, "C-JIS")) { c = __jp2uc(c, JP_JIS); unicode = 1; - } else if (!strcmp(__clib2->_current_locale, "C-SJIS")) { + } else if (!strcmp(__clib4->_current_locale, "C-SJIS")) { c = __jp2uc(c, JP_SJIS); unicode = 1; - } else if (!strcmp(__clib2->_current_locale, "C-EUCJP")) { + } else if (!strcmp(__clib4->_current_locale, "C-EUCJP")) { c = __jp2uc(c, JP_EUCJP); unicode = 1; - } else if (!strcmp(__clib2->_current_locale, "C-UTF-8")) { + } else if (!strcmp(__clib4->_current_locale, "C-UTF-8")) { unicode = 1; } diff --git a/library/wchar/iswspace.c b/library/wchar/iswspace.c index d8626b79..afc6f55f 100644 --- a/library/wchar/iswspace.c +++ b/library/wchar/iswspace.c @@ -1,5 +1,5 @@ /* - * $Id: wctype_iswspace.c,v 1.4 2021-02-03 00:15:27 clib2devs Exp $ + * $Id: wctype_iswspace.c,v 1.4 2021-02-03 00:15:27 clib4devs Exp $ */ #ifndef _WCHAR_HEADERS_H @@ -16,23 +16,23 @@ int iswspace(wint_t c) { int unicode = 0; int result; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); - if (__clib2->_current_locale[0] == 'C' && __clib2->_current_locale[1] == '\0') { + if (__clib4->_current_locale[0] == 'C' && __clib4->_current_locale[1] == '\0') { unicode = 0; /* fall-through */ - } else if (!strcmp(__clib2->_current_locale, "C-JIS")) { + } else if (!strcmp(__clib4->_current_locale, "C-JIS")) { c = __jp2uc(c, JP_JIS); unicode = 1; - } else if (!strcmp(__clib2->_current_locale, "C-SJIS")) { + } else if (!strcmp(__clib4->_current_locale, "C-SJIS")) { c = __jp2uc(c, JP_SJIS); unicode = 1; - } else if (!strcmp(__clib2->_current_locale, "C-EUCJP")) { + } else if (!strcmp(__clib4->_current_locale, "C-EUCJP")) { c = __jp2uc(c, JP_EUCJP); unicode = 1; - } else if (!strcmp(__clib2->_current_locale, "C-UTF-8")) { + } else if (!strcmp(__clib4->_current_locale, "C-UTF-8")) { unicode = 1; } diff --git a/library/wchar/iswupper.c b/library/wchar/iswupper.c index 57fabe05..ff03fdc1 100644 --- a/library/wchar/iswupper.c +++ b/library/wchar/iswupper.c @@ -1,5 +1,5 @@ /* - * $Id: wctype_iswupper.c,v 1.4 2021-02-04 00:16:27 clib2devs Exp $ + * $Id: wctype_iswupper.c,v 1.4 2021-02-04 00:16:27 clib4devs Exp $ */ #ifndef _WCTYPE_HEADERS_H diff --git a/library/wchar/iswxdigit.c b/library/wchar/iswxdigit.c index d60f5687..2c09821c 100644 --- a/library/wchar/iswxdigit.c +++ b/library/wchar/iswxdigit.c @@ -1,5 +1,5 @@ /* - * $Id: wctype_iswxdigit.c,v 1.4 2021-02-04 00:17:27 clib2devs Exp $ + * $Id: wctype_iswxdigit.c,v 1.4 2021-02-04 00:17:27 clib4devs Exp $ */ #ifndef _WCHAR_HEADERS_H diff --git a/library/wchar/jp2uc.c b/library/wchar/jp2uc.c index 0b073808..e0afe339 100644 --- a/library/wchar/jp2uc.c +++ b/library/wchar/jp2uc.c @@ -1,5 +1,5 @@ /* - * $Id: wctype_jp2uc.c,v 1.0 2021-03-02 23:48:27 clib2devs Exp $ + * $Id: wctype_jp2uc.c,v 1.0 2021-03-02 23:48:27 clib4devs Exp $ */ #ifndef _WCHAR_HEADERS_H diff --git a/library/wchar/mbrlen.c b/library/wchar/mbrlen.c index f391817e..28c30256 100644 --- a/library/wchar/mbrlen.c +++ b/library/wchar/mbrlen.c @@ -1,5 +1,5 @@ /* - * $Id: wchar_mbrlen.c,v 1.4 2021-02-03 19:11:16 clib2devs Exp $ + * $Id: wchar_mbrlen.c,v 1.4 2021-02-03 19:11:16 clib4devs Exp $ */ #ifndef _WCHAR_HEADERS_H @@ -8,10 +8,10 @@ size_t mbrlen(const char *restrict s, size_t n, mbstate_t *restrict ps) { - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; if (ps == NULL) { - ps = &__clib2->wide_status->_mbrlen_state; + ps = &__clib4->wide_status->_mbrlen_state; } return mbrtowc(NULL, s, n, ps); diff --git a/library/wchar/mbrtoc16.c b/library/wchar/mbrtoc16.c index 94aae976..372496a6 100644 --- a/library/wchar/mbrtoc16.c +++ b/library/wchar/mbrtoc16.c @@ -1,5 +1,5 @@ /* - * $Id: wchar_mbrtoc16.c,v 1.0 2022-08-04 19:11:16 clib2devs Exp $ + * $Id: wchar_mbrtoc16.c,v 1.0 2022-08-04 19:11:16 clib4devs Exp $ */ #ifndef _WCHAR_HEADERS_H diff --git a/library/wchar/mbrtoc32.c b/library/wchar/mbrtoc32.c index cd0a49e5..73117234 100644 --- a/library/wchar/mbrtoc32.c +++ b/library/wchar/mbrtoc32.c @@ -1,5 +1,5 @@ /* - * $Id: wchar_mbrtoc32.c,v 1.0 2022-08-04 19:11:16 clib2devs Exp $ + * $Id: wchar_mbrtoc32.c,v 1.0 2022-08-04 19:11:16 clib4devs Exp $ */ #ifndef _WCHAR_HEADERS_H diff --git a/library/wchar/mbrtowc.c b/library/wchar/mbrtowc.c index 96939906..154b9894 100644 --- a/library/wchar/mbrtowc.c +++ b/library/wchar/mbrtowc.c @@ -1,5 +1,5 @@ /* - * $Id: wchar_mbrlen.c,v 1.4 2021-02-03 19:11:16 clib2devs Exp $ + * $Id: wchar_mbrlen.c,v 1.4 2021-02-03 19:11:16 clib4devs Exp $ */ #ifndef _WCHAR_HEADERS_H @@ -9,12 +9,12 @@ size_t mbrtowc(wchar_t *pwc, const char *src, size_t n, mbstate_t *ps) { int retval = 0; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); if (ps == NULL) { - ps = &__clib2->wide_status->_mbrtowc_state; + ps = &__clib4->wide_status->_mbrtowc_state; } if (src == NULL) { diff --git a/library/wchar/mbsinit.c b/library/wchar/mbsinit.c index 67214e60..e85f5cb1 100644 --- a/library/wchar/mbsinit.c +++ b/library/wchar/mbsinit.c @@ -1,5 +1,5 @@ /* - * $Id: wchar_mbsinit.c,v 1.3 2006-01-08 12:04:27 clib2devs Exp $ + * $Id: wchar_mbsinit.c,v 1.3 2006-01-08 12:04:27 clib4devs Exp $ */ #ifndef _WCHAR_HEADERS_H diff --git a/library/wchar/mbsnrtowcs.c b/library/wchar/mbsnrtowcs.c index 075da8bb..eb3a0fac 100644 --- a/library/wchar/mbsnrtowcs.c +++ b/library/wchar/mbsnrtowcs.c @@ -1,5 +1,5 @@ /* - * $Id: wchar_mbsnrtowcs.c,v 1.3 2006-01-08 12:04:27 clib2devs Exp $ + * $Id: wchar_mbsnrtowcs.c,v 1.3 2006-01-08 12:04:27 clib4devs Exp $ */ #ifndef _WCHAR_HEADERS_H diff --git a/library/wchar/mbsrtowcs.c b/library/wchar/mbsrtowcs.c index e3d7cb2c..1fad0b5e 100644 --- a/library/wchar/mbsrtowcs.c +++ b/library/wchar/mbsrtowcs.c @@ -1,5 +1,5 @@ /* - * $Id: wchar_mbsrtowcs.c,v 1.3 2006-01-08 12:04:27 clib2devs Exp $ + * $Id: wchar_mbsrtowcs.c,v 1.3 2006-01-08 12:04:27 clib4devs Exp $ */ #ifndef _WCHAR_HEADERS_H diff --git a/library/wchar/putwc.c b/library/wchar/putwc.c index 0bb24038..4f73ae9d 100644 --- a/library/wchar/putwc.c +++ b/library/wchar/putwc.c @@ -1,5 +1,5 @@ /* - * $Id: wchar_putwc.c,v 1.3 2006-01-08 12:04:27 clib2devs Exp $ + * $Id: wchar_putwc.c,v 1.3 2006-01-08 12:04:27 clib4devs Exp $ */ #ifndef _WCHAR_HEADERS_H diff --git a/library/wchar/putwchar.c b/library/wchar/putwchar.c index 7814552b..29da534c 100644 --- a/library/wchar/putwchar.c +++ b/library/wchar/putwchar.c @@ -1,5 +1,5 @@ /* - * $Id: wchar_putwchar.c,v 1.4 2021-02-04 19:42:27 clib2devs Exp $ + * $Id: wchar_putwchar.c,v 1.4 2021-02-04 19:42:27 clib4devs Exp $ */ #ifndef _WCHAR_HEADERS_H diff --git a/library/wchar/swprintf.c b/library/wchar/swprintf.c index 5151f866..34674f97 100644 --- a/library/wchar/swprintf.c +++ b/library/wchar/swprintf.c @@ -1,5 +1,5 @@ /* - * $Id: wchar_swprintf.c,v 1.3 2006-01-08 12:04:27 clib2devs Exp $ + * $Id: wchar_swprintf.c,v 1.3 2006-01-08 12:04:27 clib4devs Exp $ */ #ifndef _WCHAR_HEADERS_H diff --git a/library/wchar/swscanf.c b/library/wchar/swscanf.c index 07cba050..11569140 100644 --- a/library/wchar/swscanf.c +++ b/library/wchar/swscanf.c @@ -1,5 +1,5 @@ /* - * $Id: wchar_swscanf.c,v 1.3 2006-01-08 12:04:27 clib2devs Exp $ + * $Id: wchar_swscanf.c,v 1.3 2006-01-08 12:04:27 clib4devs Exp $ */ #ifndef _WCHAR_HEADERS_H diff --git a/library/wchar/towctrans.c b/library/wchar/towctrans.c index f7a4ed78..b98f934c 100644 --- a/library/wchar/towctrans.c +++ b/library/wchar/towctrans.c @@ -1,5 +1,5 @@ /* - * $Id: wctype_towctrans.c,v 1.4 2021-02-04 00:20:27 clib2devs Exp $ + * $Id: wctype_towctrans.c,v 1.4 2021-02-04 00:20:27 clib4devs Exp $ */ #ifndef _WCHAR_HEADERS_H diff --git a/library/wchar/towlower.c b/library/wchar/towlower.c index fabdd581..ff6e5347 100644 --- a/library/wchar/towlower.c +++ b/library/wchar/towlower.c @@ -1,5 +1,5 @@ /* - * $Id: wctype_towlower.c,v 1.4 2021-02-04 00:21:27 clib2devs Exp $ + * $Id: wctype_towlower.c,v 1.4 2021-02-04 00:21:27 clib4devs Exp $ */ #ifndef _WCHAR_HEADERS_H @@ -13,23 +13,23 @@ wint_t towlower(wint_t c) { int unicode = 0; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); - if (__clib2->_current_locale[0] == 'C' && __clib2->_current_locale[1] == '\0') { + if (__clib4->_current_locale[0] == 'C' && __clib4->_current_locale[1] == '\0') { unicode = 0; /* fall-through */ - } else if (!strcmp(__clib2->_current_locale, "C-JIS")) { + } else if (!strcmp(__clib4->_current_locale, "C-JIS")) { c = __jp2uc(c, JP_JIS); unicode = 1; - } else if (!strcmp(__clib2->_current_locale, "C-SJIS")) { + } else if (!strcmp(__clib4->_current_locale, "C-SJIS")) { c = __jp2uc(c, JP_SJIS); unicode = 1; - } else if (!strcmp(__clib2->_current_locale, "C-EUCJP")) { + } else if (!strcmp(__clib4->_current_locale, "C-EUCJP")) { c = __jp2uc(c, JP_EUCJP); unicode = 1; - } else if (!strcmp(__clib2->_current_locale, "C-UTF-8")) { + } else if (!strcmp(__clib4->_current_locale, "C-UTF-8")) { unicode = 1; } diff --git a/library/wchar/towupper.c b/library/wchar/towupper.c index 900d6cd5..f57b82e1 100644 --- a/library/wchar/towupper.c +++ b/library/wchar/towupper.c @@ -1,5 +1,5 @@ /* - * $Id: wctype_towupper.c,v 1.4 2021-02-04 00:25:27 clib2devs Exp $ + * $Id: wctype_towupper.c,v 1.4 2021-02-04 00:25:27 clib4devs Exp $ */ #ifndef _WCHAR_HEADERS_H @@ -13,23 +13,23 @@ wint_t towupper(wint_t c) { int unicode = 0; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; ENTER(); - if (__clib2->_current_locale[0] == 'C' && __clib2->_current_locale[1] == '\0') { + if (__clib4->_current_locale[0] == 'C' && __clib4->_current_locale[1] == '\0') { unicode = 0; /* fall-through */ - } else if (!strcmp(__clib2->_current_locale, "C-JIS")) { + } else if (!strcmp(__clib4->_current_locale, "C-JIS")) { c = __jp2uc(c, JP_JIS); unicode = 1; - } else if (!strcmp(__clib2->_current_locale, "C-SJIS")) { + } else if (!strcmp(__clib4->_current_locale, "C-SJIS")) { c = __jp2uc(c, JP_SJIS); unicode = 1; - } else if (!strcmp(__clib2->_current_locale, "C-EUCJP")) { + } else if (!strcmp(__clib4->_current_locale, "C-EUCJP")) { c = __jp2uc(c, JP_EUCJP); unicode = 1; - } else if (!strcmp(__clib2->_current_locale, "C-UTF-8")) { + } else if (!strcmp(__clib4->_current_locale, "C-UTF-8")) { unicode = 1; } diff --git a/library/wchar/ungetwc.c b/library/wchar/ungetwc.c index b83f0281..67c4eb07 100755 --- a/library/wchar/ungetwc.c +++ b/library/wchar/ungetwc.c @@ -1,5 +1,5 @@ /* - * $Id: wchar_ungetwc.c,v 1.3 2006-01-08 12:04:27 clib2devs Exp $ + * $Id: wchar_ungetwc.c,v 1.3 2006-01-08 12:04:27 clib4devs Exp $ */ #ifndef _WCHAR_HEADERS_H diff --git a/library/wchar/utf8alpha.h b/library/wchar/utf8alpha.h index f85d425c..93ebc167 100755 --- a/library/wchar/utf8alpha.h +++ b/library/wchar/utf8alpha.h @@ -1,5 +1,5 @@ /* - * $Id: utf8alpha.h,v 1.0 2021-02-04 00:03:27 clib2devs Exp $ + * $Id: utf8alpha.h,v 1.0 2021-02-04 00:03:27 clib4devs Exp $ */ /* Generated using unicode.txt 3.2 */ diff --git a/library/wchar/utf8print.h b/library/wchar/utf8print.h index f21b4106..1ed0b92b 100755 --- a/library/wchar/utf8print.h +++ b/library/wchar/utf8print.h @@ -1,5 +1,5 @@ /* - * $Id: utf8print.h,v 1.0 2021-02-04 00:03:27 clib2devs Exp $ + * $Id: utf8print.h,v 1.0 2021-02-04 00:03:27 clib4devs Exp $ */ /* Generated using unicode.txt 3.2 */ diff --git a/library/wchar/utf8punct.h b/library/wchar/utf8punct.h index 9f64ad4a..16100fa2 100755 --- a/library/wchar/utf8punct.h +++ b/library/wchar/utf8punct.h @@ -1,5 +1,5 @@ /* - * $Id: utf8punct.h,v 1.0 2021-02-04 00:03:27 clib2devs Exp $ + * $Id: utf8punct.h,v 1.0 2021-02-04 00:03:27 clib4devs Exp $ */ /* Generated using unicode.txt 3.2 */ diff --git a/library/wchar/vfwprintf.c b/library/wchar/vfwprintf.c index bd8b57d1..12bfe7b8 100644 --- a/library/wchar/vfwprintf.c +++ b/library/wchar/vfwprintf.c @@ -1,5 +1,5 @@ /* - * $Id: wchar_vfwprintf.c,v 1.4 2021-02-05 00:41:13 clib2devs Exp $ + * $Id: wchar_vfwprintf.c,v 1.4 2021-02-05 00:41:13 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H diff --git a/library/wchar/vfwscanf.c b/library/wchar/vfwscanf.c index 24977225..ca9d6455 100644 --- a/library/wchar/vfwscanf.c +++ b/library/wchar/vfwscanf.c @@ -1,5 +1,5 @@ /* - * $Id: wchar_vfwscanf.c,v 1.0 2021-09-28 12:04:27 clib2devs Exp $ + * $Id: wchar_vfwscanf.c,v 1.0 2021-09-28 12:04:27 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H diff --git a/library/wchar/vswprintf.c b/library/wchar/vswprintf.c index 46c7e7d2..3b17dd18 100644 --- a/library/wchar/vswprintf.c +++ b/library/wchar/vswprintf.c @@ -1,5 +1,5 @@ /* - * $Id: wchar_vswprintf.c,v 1.3 2006-01-08 12:04:27 clib2devs Exp $ + * $Id: wchar_vswprintf.c,v 1.3 2006-01-08 12:04:27 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H diff --git a/library/wchar/vswscanf.c b/library/wchar/vswscanf.c index e3a6fbea..5cc88e47 100644 --- a/library/wchar/vswscanf.c +++ b/library/wchar/vswscanf.c @@ -1,5 +1,5 @@ /* - * $Id: wchar_vswscanf.c,v 1.0 2022-03-04 16:29:27 clib2devs Exp $ + * $Id: wchar_vswscanf.c,v 1.0 2022-03-04 16:29:27 clib4devs Exp $ */ #ifndef _STDIO_HEADERS_H diff --git a/library/wchar/vwprintf.c b/library/wchar/vwprintf.c index fae55017..50554b7c 100644 --- a/library/wchar/vwprintf.c +++ b/library/wchar/vwprintf.c @@ -1,5 +1,5 @@ /* - * $Id: wchar_vwprintf.c,v 1.1 2022-03-05 19:47:27 clib2devs Exp $ + * $Id: wchar_vwprintf.c,v 1.1 2022-03-05 19:47:27 clib4devs Exp $ */ #ifndef _WCHAR_HEADERS_H diff --git a/library/wchar/vwscanf.c b/library/wchar/vwscanf.c index a2e39fad..35bf63b2 100644 --- a/library/wchar/vwscanf.c +++ b/library/wchar/vwscanf.c @@ -1,5 +1,5 @@ /* - * $Id: wchar_vwscanf.c,v 1.0 2022-08-04 19:47:27 clib2devs Exp $ + * $Id: wchar_vwscanf.c,v 1.0 2022-08-04 19:47:27 clib4devs Exp $ */ #ifndef _WCHAR_HEADERS_H diff --git a/library/wchar/wchar_headers.h b/library/wchar/wchar_headers.h index 94d47545..a14dd372 100755 --- a/library/wchar/wchar_headers.h +++ b/library/wchar/wchar_headers.h @@ -1,5 +1,5 @@ /* - * $Id: wchar_headers.h,v 1.3 2006-01-08 12:04:27 clib2devs Exp $ + * $Id: wchar_headers.h,v 1.3 2006-01-08 12:04:27 clib4devs Exp $ */ #ifndef _WCHAR_HEADERS_H diff --git a/library/wchar/wcpcpy.c b/library/wchar/wcpcpy.c index 6a7ffd56..7e872820 100644 --- a/library/wchar/wcpcpy.c +++ b/library/wchar/wcpcpy.c @@ -1,5 +1,5 @@ /* - * $Id: wchar_wcpcpy.c,v 1.0 2022-08-04 12:04:27 clib2devs Exp $ + * $Id: wchar_wcpcpy.c,v 1.0 2022-08-04 12:04:27 clib4devs Exp $ */ #ifndef _WCHAR_HEADERS_H diff --git a/library/wchar/wcpncpy.c b/library/wchar/wcpncpy.c index 5e04a5ed..91fdc2a8 100644 --- a/library/wchar/wcpncpy.c +++ b/library/wchar/wcpncpy.c @@ -1,5 +1,5 @@ /* - * $Id: wchar_wcpncpy.c,v 1.0 2022-08-04 12:04:27 clib2devs Exp $ + * $Id: wchar_wcpncpy.c,v 1.0 2022-08-04 12:04:27 clib4devs Exp $ */ #ifndef _WCHAR_HEADERS_H diff --git a/library/wchar/wcrtomb.c b/library/wchar/wcrtomb.c index 742ef5e8..1c377830 100755 --- a/library/wchar/wcrtomb.c +++ b/library/wchar/wcrtomb.c @@ -1,5 +1,5 @@ /* - * $Id: wchar_wcrtomb.c,v 1.4 2021-02-03 18:48:27 clib2devs Exp $ + * $Id: wchar_wcrtomb.c,v 1.4 2021-02-03 18:48:27 clib4devs Exp $ */ #ifndef _WCHAR_HEADERS_H @@ -8,10 +8,10 @@ size_t wcrtomb(char *s, wchar_t wchar, mbstate_t *state) { - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; - if (strlen(__clib2->_current_locale) <= 1) { /* fall-through */ - } else if (!strcmp(__clib2->_current_locale, "C-UTF-8")) { + if (strlen(__clib4->_current_locale) <= 1) { /* fall-through */ + } else if (!strcmp(__clib4->_current_locale, "C-UTF-8")) { if (s == NULL) { return 0; /* UTF-8 encoding is not state-dependent */ } @@ -56,7 +56,7 @@ wcrtomb(char *s, wchar_t wchar, mbstate_t *state) { return 6; } else return -1; - } else if (!strcmp(__clib2->_current_locale, "C-SJIS")) { + } else if (!strcmp(__clib4->_current_locale, "C-SJIS")) { unsigned char char2 = (unsigned char) wchar; unsigned char char1 = (unsigned char) (wchar >> 8); @@ -74,7 +74,7 @@ wcrtomb(char *s, wchar_t wchar, mbstate_t *state) { return -1; } } - } else if (!strcmp(__clib2->_current_locale, "C-EUCJP")) { + } else if (!strcmp(__clib4->_current_locale, "C-EUCJP")) { unsigned char char2 = (unsigned char) wchar; unsigned char char1 = (unsigned char) (wchar >> 8); @@ -92,7 +92,7 @@ wcrtomb(char *s, wchar_t wchar, mbstate_t *state) { return -1; } } - } else if (!strcmp(__clib2->_current_locale, "C-JIS")) { + } else if (!strcmp(__clib4->_current_locale, "C-JIS")) { int cnt = 0; unsigned char char2 = (unsigned char) wchar; unsigned char char1 = (unsigned char) (wchar >> 8); diff --git a/library/wchar/wcscasecmp.c b/library/wchar/wcscasecmp.c index 0cb33f01..090a0046 100644 --- a/library/wchar/wcscasecmp.c +++ b/library/wchar/wcscasecmp.c @@ -1,5 +1,5 @@ /* - * $Id: wchar_wcscasecmp.c,v 1.0 2022-08-04 12:04:27 clib2devs Exp $ + * $Id: wchar_wcscasecmp.c,v 1.0 2022-08-04 12:04:27 clib4devs Exp $ */ #ifndef _WCHAR_HEADERS_H diff --git a/library/wchar/wcscasecmp_l.c b/library/wchar/wcscasecmp_l.c index f5cc5b48..6cd46702 100644 --- a/library/wchar/wcscasecmp_l.c +++ b/library/wchar/wcscasecmp_l.c @@ -1,5 +1,5 @@ /* - * $Id: wchar_wcscasecmp_l.c,v 1.0 2022-08-04 12:04:27 clib2devs Exp $ + * $Id: wchar_wcscasecmp_l.c,v 1.0 2022-08-04 12:04:27 clib4devs Exp $ */ #ifndef _WCHAR_HEADERS_H diff --git a/library/wchar/wcscat.c b/library/wchar/wcscat.c index 8fe6eefd..0a5c67eb 100644 --- a/library/wchar/wcscat.c +++ b/library/wchar/wcscat.c @@ -1,5 +1,5 @@ /* - * $Id: wchar_wcscat.c,v 1.3 2006-01-08 12:04:27 clib2devs Exp $ + * $Id: wchar_wcscat.c,v 1.3 2006-01-08 12:04:27 clib4devs Exp $ */ #ifndef _WCHAR_HEADERS_H diff --git a/library/wchar/wcschr.c b/library/wchar/wcschr.c index aef1dbbd..91072ef4 100644 --- a/library/wchar/wcschr.c +++ b/library/wchar/wcschr.c @@ -1,5 +1,5 @@ /* - * $Id: wchar_wcschr.c,v 1.3 2006-01-08 12:04:27 clib2devs Exp $ + * $Id: wchar_wcschr.c,v 1.3 2006-01-08 12:04:27 clib4devs Exp $ */ #ifndef _WCHAR_HEADERS_H diff --git a/library/wchar/wcscmp.c b/library/wchar/wcscmp.c index 06e1d09f..1e35438f 100644 --- a/library/wchar/wcscmp.c +++ b/library/wchar/wcscmp.c @@ -1,5 +1,5 @@ /* - * $Id: wchar_wcscmp.c,v 1.4 2021-02-04 00:30:27 clib2devs Exp $ + * $Id: wchar_wcscmp.c,v 1.4 2021-02-04 00:30:27 clib4devs Exp $ */ #ifndef _WCHAR_HEADERS_H diff --git a/library/wchar/wcscoll.c b/library/wchar/wcscoll.c index c6b82398..e13d962e 100644 --- a/library/wchar/wcscoll.c +++ b/library/wchar/wcscoll.c @@ -1,5 +1,5 @@ /* - * $Id: wchar_wscoll.c,v 1.3 2006-01-08 12:04:27 clib2devs Exp $ + * $Id: wchar_wscoll.c,v 1.3 2006-01-08 12:04:27 clib4devs Exp $ */ #ifndef _WCHAR_HEADERS_H diff --git a/library/wchar/wcscoll_l.c b/library/wchar/wcscoll_l.c index 387e3d58..56addbff 100644 --- a/library/wchar/wcscoll_l.c +++ b/library/wchar/wcscoll_l.c @@ -1,5 +1,5 @@ /* - * $Id: wchar_wscoll_l.c,v 1.0 2022-08-04 12:04:27 clib2devs Exp $ + * $Id: wchar_wscoll_l.c,v 1.0 2022-08-04 12:04:27 clib4devs Exp $ */ #ifndef _WCHAR_HEADERS_H diff --git a/library/wchar/wcscpy.c b/library/wchar/wcscpy.c index 1b90f9f2..2858d058 100644 --- a/library/wchar/wcscpy.c +++ b/library/wchar/wcscpy.c @@ -1,5 +1,5 @@ /* - * $Id: wchar_wcscpy.c,v 1.3 2006-01-08 12:04:27 clib2devs Exp $ + * $Id: wchar_wcscpy.c,v 1.3 2006-01-08 12:04:27 clib4devs Exp $ */ #ifndef _WCHAR_HEADERS_H diff --git a/library/wchar/wcscspn.c b/library/wchar/wcscspn.c index 79977e7e..b6013fff 100644 --- a/library/wchar/wcscspn.c +++ b/library/wchar/wcscspn.c @@ -1,5 +1,5 @@ /* - * $Id: wchar_wcsspn.c,v 1.3 2006-01-08 12:04:27 clib2devs Exp $ + * $Id: wchar_wcsspn.c,v 1.3 2006-01-08 12:04:27 clib4devs Exp $ */ #ifndef _WCHAR_HEADERS_H diff --git a/library/wchar/wcsdup.c b/library/wchar/wcsdup.c index e66495c5..734863ab 100644 --- a/library/wchar/wcsdup.c +++ b/library/wchar/wcsdup.c @@ -1,5 +1,5 @@ /* - * $Id: wchar_wcsdup.c,v 1.0 2022-08-04 12:04:27 clib2devs Exp $ + * $Id: wchar_wcsdup.c,v 1.0 2022-08-04 12:04:27 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H diff --git a/library/wchar/wcsftime.c b/library/wchar/wcsftime.c index 5c6568b8..a5a11188 100644 --- a/library/wchar/wcsftime.c +++ b/library/wchar/wcsftime.c @@ -1,5 +1,5 @@ /* - * $Id: wchar_wcsftime.c,v 1.3 2006-01-08 12:04:27 clib2devs Exp $ + * $Id: wchar_wcsftime.c,v 1.3 2006-01-08 12:04:27 clib4devs Exp $ */ #ifndef _WCHAR_HEADERS_H diff --git a/library/wchar/wcslen.c b/library/wchar/wcslen.c index b843b916..bc5f5565 100644 --- a/library/wchar/wcslen.c +++ b/library/wchar/wcslen.c @@ -1,5 +1,5 @@ /* - * $Id: wchar_wcslen.c,v 1.3 2006-01-08 12:04:27 clib2devs Exp $ + * $Id: wchar_wcslen.c,v 1.3 2006-01-08 12:04:27 clib4devs Exp $ */ #ifndef _WCHAR_HEADERS_H diff --git a/library/wchar/wcsncasecmp.c b/library/wchar/wcsncasecmp.c index 3b448ee9..2c132697 100644 --- a/library/wchar/wcsncasecmp.c +++ b/library/wchar/wcsncasecmp.c @@ -1,5 +1,5 @@ /* - * $Id: wchar_wcsncasecmp.c,v 1.0 2022-08-04 12:04:27 clib2devs Exp $ + * $Id: wchar_wcsncasecmp.c,v 1.0 2022-08-04 12:04:27 clib4devs Exp $ */ #ifndef _WCHAR_HEADERS_H diff --git a/library/wchar/wcsncasecmp_l.c b/library/wchar/wcsncasecmp_l.c index 25d2414a..d8c9e4a9 100644 --- a/library/wchar/wcsncasecmp_l.c +++ b/library/wchar/wcsncasecmp_l.c @@ -1,5 +1,5 @@ /* - * $Id: wchar_wcsncasecmp_l.c,v 1.0 2022-08-04 12:04:27 clib2devs Exp $ + * $Id: wchar_wcsncasecmp_l.c,v 1.0 2022-08-04 12:04:27 clib4devs Exp $ */ #ifndef _WCHAR_HEADERS_H diff --git a/library/wchar/wcsncat.c b/library/wchar/wcsncat.c index df5a18e6..4531d2a0 100644 --- a/library/wchar/wcsncat.c +++ b/library/wchar/wcsncat.c @@ -1,5 +1,5 @@ /* - * $Id: wchar_wcsncat.c,v 1.3 2006-01-08 12:04:27 clib2devs Exp $ + * $Id: wchar_wcsncat.c,v 1.3 2006-01-08 12:04:27 clib4devs Exp $ */ #ifndef _WCHAR_HEADERS_H diff --git a/library/wchar/wcsncmp.c b/library/wchar/wcsncmp.c index 41591596..351e3005 100644 --- a/library/wchar/wcsncmp.c +++ b/library/wchar/wcsncmp.c @@ -1,5 +1,5 @@ /* - * $Id: wchar_wcsncmp.c,v 1.3 2006-01-08 12:04:27 clib2devs Exp $ + * $Id: wchar_wcsncmp.c,v 1.3 2006-01-08 12:04:27 clib4devs Exp $ */ #ifndef _WCHAR_HEADERS_H diff --git a/library/wchar/wcsncpy.c b/library/wchar/wcsncpy.c index c4051c37..86f2ec01 100644 --- a/library/wchar/wcsncpy.c +++ b/library/wchar/wcsncpy.c @@ -1,5 +1,5 @@ /* - * $Id: wchar_wcsncpy.c,v 1.3 2006-01-08 12:04:27 clib2devs Exp $ + * $Id: wchar_wcsncpy.c,v 1.3 2006-01-08 12:04:27 clib4devs Exp $ */ #ifndef _WCHAR_HEADERS_H diff --git a/library/wchar/wcsnlen.c b/library/wchar/wcsnlen.c index fc68beac..86f62385 100644 --- a/library/wchar/wcsnlen.c +++ b/library/wchar/wcsnlen.c @@ -1,5 +1,5 @@ /* - * $Id: wchar_wcsnlen.c,v 1.0 2022-08-04 12:04:27 clib2devs Exp $ + * $Id: wchar_wcsnlen.c,v 1.0 2022-08-04 12:04:27 clib4devs Exp $ */ #ifndef _WCHAR_HEADERS_H diff --git a/library/wchar/wcsnrtombs.c b/library/wchar/wcsnrtombs.c index d11848f1..9ac1974b 100644 --- a/library/wchar/wcsnrtombs.c +++ b/library/wchar/wcsnrtombs.c @@ -1,5 +1,5 @@ /* - * $Id: wchar_wcsnrtombs.c,v 1.0 2021-02-04 11:26:27 clib2devs Exp $ + * $Id: wchar_wcsnrtombs.c,v 1.0 2021-02-04 11:26:27 clib4devs Exp $ */ #ifndef _WCHAR_HEADERS_H @@ -13,10 +13,10 @@ wcsnrtombs(char *dst, const wchar_t **src, size_t nwc, size_t len, mbstate_t *ps wchar_t *pwcs; size_t n; int i; - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; if (ps == NULL) { - ps = &__clib2->wide_status->_wcsrtombs_state; + ps = &__clib4->wide_status->_wcsrtombs_state; } /* If no dst pointer, treat len as maximum possible value. */ diff --git a/library/wchar/wcspbrk.c b/library/wchar/wcspbrk.c index c1630570..32053f11 100644 --- a/library/wchar/wcspbrk.c +++ b/library/wchar/wcspbrk.c @@ -1,5 +1,5 @@ /* - * $Id: wchar_wcspbrk.c,v 1.3 2006-01-08 12:04:27 clib2devs Exp $ + * $Id: wchar_wcspbrk.c,v 1.3 2006-01-08 12:04:27 clib4devs Exp $ */ #ifndef _WCHAR_HEADERS_H diff --git a/library/wchar/wcsrchr.c b/library/wchar/wcsrchr.c index 0279a854..ac0b4b4d 100644 --- a/library/wchar/wcsrchr.c +++ b/library/wchar/wcsrchr.c @@ -1,5 +1,5 @@ /* - * $Id: wchar_wcsrchr.c,v 1.0 2021-01-15 00:42:27 clib2devs Exp $ + * $Id: wchar_wcsrchr.c,v 1.0 2021-01-15 00:42:27 clib4devs Exp $ */ #ifndef _WCHAR_HEADERS_H diff --git a/library/wchar/wcsrtombs.c b/library/wchar/wcsrtombs.c index 1760bc8a..99cafac7 100644 --- a/library/wchar/wcsrtombs.c +++ b/library/wchar/wcsrtombs.c @@ -1,5 +1,5 @@ /* - * $Id: wchar_wcsrtombs.c,v 1.3 2006-01-08 12:04:27 clib2devs Exp $ + * $Id: wchar_wcsrtombs.c,v 1.3 2006-01-08 12:04:27 clib4devs Exp $ */ #ifndef _WCHAR_HEADERS_H diff --git a/library/wchar/wcsspn.c b/library/wchar/wcsspn.c index a7970627..a33c7347 100644 --- a/library/wchar/wcsspn.c +++ b/library/wchar/wcsspn.c @@ -1,5 +1,5 @@ /* - * $Id: wchar_wcsspn.c,v 1.3 2006-01-08 12:04:27 clib2devs Exp $ + * $Id: wchar_wcsspn.c,v 1.3 2006-01-08 12:04:27 clib4devs Exp $ */ #ifndef _WCHAR_HEADERS_H diff --git a/library/wchar/wcsstr.c b/library/wchar/wcsstr.c index 708324cb..7e673a24 100644 --- a/library/wchar/wcsstr.c +++ b/library/wchar/wcsstr.c @@ -1,5 +1,5 @@ /* - * $Id: wchar_wcsstr.c,v 1.0 2021-02-04 20:31:00 clib2devs Exp $ + * $Id: wchar_wcsstr.c,v 1.0 2021-02-04 20:31:00 clib4devs Exp $ */ #ifndef _WCHAR_HEADERS_H diff --git a/library/wchar/wcstod.c b/library/wchar/wcstod.c index 5a29b79f..150e2e70 100644 --- a/library/wchar/wcstod.c +++ b/library/wchar/wcstod.c @@ -1,5 +1,5 @@ /* - * $Id: wchar_wcstod.c,v 1.3 2006-01-08 12:04:27 clib2devs Exp $ + * $Id: wchar_wcstod.c,v 1.3 2006-01-08 12:04:27 clib4devs Exp $ */ #ifndef _WCHAR_HEADERS_H diff --git a/library/wchar/wcstof.c b/library/wchar/wcstof.c index f3987e27..f51dbd69 100644 --- a/library/wchar/wcstof.c +++ b/library/wchar/wcstof.c @@ -1,5 +1,5 @@ /* - * $Id: wchar_wcstof.c,v 1.0 2021-09-28 12:04:27 clib2devs Exp $ + * $Id: wchar_wcstof.c,v 1.0 2021-09-28 12:04:27 clib4devs Exp $ */ #ifndef _WCHAR_HEADERS_H diff --git a/library/wchar/wcstok.c b/library/wchar/wcstok.c index 1f75240a..7a10108a 100644 --- a/library/wchar/wcstok.c +++ b/library/wchar/wcstok.c @@ -1,5 +1,5 @@ /* - * $Id: wchar_wcstok.c,v 1.4 2021-01-14 23:53:27 clib2devs Exp $ + * $Id: wchar_wcstok.c,v 1.4 2021-01-14 23:53:27 clib4devs Exp $ */ #ifndef _WCHAR_HEADERS_H diff --git a/library/wchar/wcstol.c b/library/wchar/wcstol.c index 8f7f6975..4d2a09f2 100644 --- a/library/wchar/wcstol.c +++ b/library/wchar/wcstol.c @@ -1,5 +1,5 @@ /* - * $Id: wchar_wcstol.c,v 1.4 2021-02-04 12:09:27 clib2devs Exp $ + * $Id: wchar_wcstol.c,v 1.4 2021-02-04 12:09:27 clib4devs Exp $ */ #ifndef _WCHAR_HEADERS_H diff --git a/library/wchar/wcstold.c b/library/wchar/wcstold.c index b717eb74..da1042ec 100644 --- a/library/wchar/wcstold.c +++ b/library/wchar/wcstold.c @@ -1,5 +1,5 @@ /* - * $Id: wchar_wcstold.c,v 1.0 2021-02-04 12:15:27 clib2devs Exp $ + * $Id: wchar_wcstold.c,v 1.0 2021-02-04 12:15:27 clib4devs Exp $ */ #ifndef _WCHAR_HEADERS_H diff --git a/library/wchar/wcstoll.c b/library/wchar/wcstoll.c index c51aad7c..03d3eeab 100644 --- a/library/wchar/wcstoll.c +++ b/library/wchar/wcstoll.c @@ -1,5 +1,5 @@ /* - * $Id: wchar_wcstoll.c,v 1.3 2021-02-04 12:12:27 clib2devs Exp $ + * $Id: wchar_wcstoll.c,v 1.3 2021-02-04 12:12:27 clib4devs Exp $ */ #ifndef _WCHAR_HEADERS_H diff --git a/library/wchar/wcstombs.c b/library/wchar/wcstombs.c index 19ff4d5c..5ef0f32e 100644 --- a/library/wchar/wcstombs.c +++ b/library/wchar/wcstombs.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_wcstombs.c,v 1.4 2022-01-05 12:04:26 clib2devs Exp $ + * $Id: stdlib_wcstombs.c,v 1.4 2022-01-05 12:04:26 clib4devs Exp $ */ #ifndef _STDLIB_HEADERS_H diff --git a/library/wchar/wcstoul.c b/library/wchar/wcstoul.c index 23470c04..1b4d1973 100644 --- a/library/wchar/wcstoul.c +++ b/library/wchar/wcstoul.c @@ -1,5 +1,5 @@ /* - * $Id: wchar_wcstoul.c,v 1.3 2006-01-08 12:04:27 clib2devs Exp $ + * $Id: wchar_wcstoul.c,v 1.3 2006-01-08 12:04:27 clib4devs Exp $ */ #ifndef _WCHAR_HEADERS_H diff --git a/library/wchar/wcstoull.c b/library/wchar/wcstoull.c index 0e251f46..ad0320fe 100644 --- a/library/wchar/wcstoull.c +++ b/library/wchar/wcstoull.c @@ -1,5 +1,5 @@ /* - * $Id: wchar_wcstoull.c,v 1.2 2006-01-08 12:04:27 clib2devs Exp $ + * $Id: wchar_wcstoull.c,v 1.2 2006-01-08 12:04:27 clib4devs Exp $ */ #ifndef _WCHAR_HEADERS_H diff --git a/library/wchar/wcswidth.c b/library/wchar/wcswidth.c index 43e5aa2f..faa9c4f4 100644 --- a/library/wchar/wcswidth.c +++ b/library/wchar/wcswidth.c @@ -1,5 +1,5 @@ /* - * $Id: wchar_wcswidth.c,v 1.0 2021-02-21 22:50:26 clib2devs Exp $ + * $Id: wchar_wcswidth.c,v 1.0 2021-02-21 22:50:26 clib4devs Exp $ */ #ifndef _WCHAR_HEADERS_H diff --git a/library/wchar/wcsxfrm.c b/library/wchar/wcsxfrm.c index 40c9e91f..da803cd3 100644 --- a/library/wchar/wcsxfrm.c +++ b/library/wchar/wcsxfrm.c @@ -1,5 +1,5 @@ /* - * $Id: wchar_wcsxfrm.c,v 1.1 2022-03-05 19:34:27 clib2devs Exp $ + * $Id: wchar_wcsxfrm.c,v 1.1 2022-03-05 19:34:27 clib4devs Exp $ */ #ifndef _WCHAR_HEADERS_H diff --git a/library/wchar/wcsxfrm_l.c b/library/wchar/wcsxfrm_l.c index ab1ec2b8..9eb2e7bb 100644 --- a/library/wchar/wcsxfrm_l.c +++ b/library/wchar/wcsxfrm_l.c @@ -1,5 +1,5 @@ /* - * $Id: wchar_wcsxfrm_l.c,v 1.1 2022-03-05 19:34:27 clib2devs Exp $ + * $Id: wchar_wcsxfrm_l.c,v 1.1 2022-03-05 19:34:27 clib4devs Exp $ */ #ifndef _WCHAR_HEADERS_H diff --git a/library/wchar/wctob.c b/library/wchar/wctob.c index cf3b8539..7c2cf136 100644 --- a/library/wchar/wctob.c +++ b/library/wchar/wctob.c @@ -1,5 +1,5 @@ /* - * $Id: wchar_wctob.c,v 1.4 2021-02-03 19:11:16 clib2devs Exp $ + * $Id: wchar_wctob.c,v 1.4 2021-02-03 19:11:16 clib4devs Exp $ */ #ifndef _WCHAR_HEADERS_H diff --git a/library/wchar/wctomb.c b/library/wchar/wctomb.c index 33b0f26a..cab5f177 100755 --- a/library/wchar/wctomb.c +++ b/library/wchar/wctomb.c @@ -1,5 +1,5 @@ /* - * $Id: wchar_wctomb.c,v 1.3 2006-01-08 12:04:26 clib2devs Exp $ + * $Id: wchar_wctomb.c,v 1.3 2006-01-08 12:04:26 clib4devs Exp $ */ #ifndef _WCHAR_HEADERS_H @@ -10,10 +10,10 @@ int _wctomb_r(char *s, wchar_t wchar, mbstate_t *state) { - struct _clib2 *__clib2 = __CLIB2; + struct _clib4 *__clib4 = __CLIB4; - if (strlen(__clib2->_current_locale) <= 1) { /* fall-through */ - } else if (!strcmp(__clib2->_current_locale, "C-UTF-8")) { + if (strlen(__clib4->_current_locale) <= 1) { /* fall-through */ + } else if (!strcmp(__clib4->_current_locale, "C-UTF-8")) { if (s == NULL) return 0; /* UTF-8 encoding is not state-dependent */ @@ -56,7 +56,7 @@ _wctomb_r(char *s, wchar_t wchar, mbstate_t *state) { return 6; } else return -1; - } else if (!strcmp(__clib2->_current_locale, "C-SJIS")) { + } else if (!strcmp(__clib4->_current_locale, "C-SJIS")) { unsigned char char2 = (unsigned char) wchar; unsigned char char1 = (unsigned char) (wchar >> 8); @@ -72,7 +72,7 @@ _wctomb_r(char *s, wchar_t wchar, mbstate_t *state) { } else return -1; } - } else if (!strcmp(__clib2->_current_locale, "C-EUCJP")) { + } else if (!strcmp(__clib4->_current_locale, "C-EUCJP")) { unsigned char char2 = (unsigned char) wchar; unsigned char char1 = (unsigned char) (wchar >> 8); @@ -88,7 +88,7 @@ _wctomb_r(char *s, wchar_t wchar, mbstate_t *state) { } else return -1; } - } else if (!strcmp(__clib2->_current_locale, "C-JIS")) { + } else if (!strcmp(__clib4->_current_locale, "C-JIS")) { int cnt = 0; unsigned char char2 = (unsigned char) wchar; unsigned char char1 = (unsigned char) (wchar >> 8); diff --git a/library/wchar/wctrans.c b/library/wchar/wctrans.c index ca808613..892bdce1 100644 --- a/library/wchar/wctrans.c +++ b/library/wchar/wctrans.c @@ -1,5 +1,5 @@ /* - * $Id: wctype_wctrans.c,v 1.4 2021-02-04 00:26:27 clib2devs Exp $ + * $Id: wctype_wctrans.c,v 1.4 2021-02-04 00:26:27 clib4devs Exp $ */ #ifndef _WCHAR_HEADERS_H diff --git a/library/wchar/wctype.c b/library/wchar/wctype.c index ca83c25b..47b82793 100644 --- a/library/wchar/wctype.c +++ b/library/wchar/wctype.c @@ -1,5 +1,5 @@ /* - * $Id: wctype_wctype.c,v 1.4 2021-02-04 00:25:27 clib2devs Exp $ + * $Id: wctype_wctype.c,v 1.4 2021-02-04 00:25:27 clib4devs Exp $ */ #ifndef _WCHAR_HEADERS_H diff --git a/library/wchar/wctype_headers.h b/library/wchar/wctype_headers.h index 698d4540..980dfd34 100755 --- a/library/wchar/wctype_headers.h +++ b/library/wchar/wctype_headers.h @@ -1,5 +1,5 @@ /* - * $Id: wctype_headers.h,v 1.3 2006-01-08 12:04:27 clib2devs Exp $ + * $Id: wctype_headers.h,v 1.3 2006-01-08 12:04:27 clib4devs Exp $ */ #ifndef _WCTYPE_HEADERS_H diff --git a/library/wchar/wctype_jp2uc.h b/library/wchar/wctype_jp2uc.h index c816b86d..a86f06c2 100755 --- a/library/wchar/wctype_jp2uc.h +++ b/library/wchar/wctype_jp2uc.h @@ -1,5 +1,5 @@ /* - * $Id: wctype_jp2uc.h,v 1.0 2021-03-02 23:48:27 clib2devs Exp $ + * $Id: wctype_jp2uc.h,v 1.0 2021-03-02 23:48:27 clib4devs Exp $ */ diff --git a/library/wchar/wcwidth.c b/library/wchar/wcwidth.c index 68fd5ddc..fbf7b6cd 100644 --- a/library/wchar/wcwidth.c +++ b/library/wchar/wcwidth.c @@ -1,5 +1,5 @@ /* - * $Id: wchar_wcwidth.c,v 1.0 2021-02-21 22:50:26 clib2devs Exp $ + * $Id: wchar_wcwidth.c,v 1.0 2021-02-21 22:50:26 clib4devs Exp $ */ #ifndef _WCHAR_HEADERS_H diff --git a/library/wchar/wmemchr.c b/library/wchar/wmemchr.c index e41c6e8b..1ec66a68 100644 --- a/library/wchar/wmemchr.c +++ b/library/wchar/wmemchr.c @@ -1,5 +1,5 @@ /* - * $Id: wchar_wmemchr.c,v 1.4 2021-02-04 11:16:27 clib2devs Exp $ + * $Id: wchar_wmemchr.c,v 1.4 2021-02-04 11:16:27 clib4devs Exp $ */ #ifndef _WCHAR_HEADERS_H diff --git a/library/wchar/wmemcmp.c b/library/wchar/wmemcmp.c index cd1ebe48..97eff12e 100644 --- a/library/wchar/wmemcmp.c +++ b/library/wchar/wmemcmp.c @@ -1,5 +1,5 @@ /* - * $Id: wchar_wmemcmp.c,v 1.3 2006-01-08 12:04:27 clib2devs Exp $ + * $Id: wchar_wmemcmp.c,v 1.3 2006-01-08 12:04:27 clib4devs Exp $ */ #ifndef _WCHAR_HEADERS_H diff --git a/library/wchar/wmemcpy.c b/library/wchar/wmemcpy.c index c180ac96..79dd6e5e 100644 --- a/library/wchar/wmemcpy.c +++ b/library/wchar/wmemcpy.c @@ -1,5 +1,5 @@ /* - * $Id: wchar_wmemcpy.c,v 1.4 2021-02-04 11:14:27 clib2devs Exp $ + * $Id: wchar_wmemcpy.c,v 1.4 2021-02-04 11:14:27 clib4devs Exp $ */ #ifndef _WCHAR_HEADERS_H diff --git a/library/wchar/wmemmove.c b/library/wchar/wmemmove.c index b6e6d3c9..9dab8457 100644 --- a/library/wchar/wmemmove.c +++ b/library/wchar/wmemmove.c @@ -1,5 +1,5 @@ /* - * $Id: wchar_wmemmove.c,v 1.4 2021-02-04 11:13:27 clib2devs Exp $ + * $Id: wchar_wmemmove.c,v 1.4 2021-02-04 11:13:27 clib4devs Exp $ */ #ifndef _WCHAR_HEADERS_H diff --git a/library/wchar/wmemset.c b/library/wchar/wmemset.c index de8da378..5f455530 100644 --- a/library/wchar/wmemset.c +++ b/library/wchar/wmemset.c @@ -1,5 +1,5 @@ /* - * $Id: wchar_wmemset.c,v 1.4 2021-02-04 11:15:27 clib2devs Exp $ + * $Id: wchar_wmemset.c,v 1.4 2021-02-04 11:15:27 clib4devs Exp $ */ #ifndef _WCHAR_HEADERS_H diff --git a/library/wchar/wprintf.c b/library/wchar/wprintf.c index 319cfc23..589bc54a 100644 --- a/library/wchar/wprintf.c +++ b/library/wchar/wprintf.c @@ -1,5 +1,5 @@ /* - * $Id: wchar_wprintf.c,v 1.4 2021-02-05 00:42:44 clib2devs Exp $ + * $Id: wchar_wprintf.c,v 1.4 2021-02-05 00:42:44 clib4devs Exp $ */ #ifndef _WCHAR_HEADERS_H diff --git a/library/wchar/wscanf.c b/library/wchar/wscanf.c index 02012d2c..bcd12598 100644 --- a/library/wchar/wscanf.c +++ b/library/wchar/wscanf.c @@ -1,5 +1,5 @@ /* - * $Id: wchar_wscanf.c,v 1.3 2006-01-08 12:04:27 clib2devs Exp $ + * $Id: wchar_wscanf.c,v 1.3 2006-01-08 12:04:27 clib4devs Exp $ */ #ifndef _WCHAR_HEADERS_H diff --git a/library/wchar/wscoll.c b/library/wchar/wscoll.c index c3e8715e..f9f56cb4 100644 --- a/library/wchar/wscoll.c +++ b/library/wchar/wscoll.c @@ -1,5 +1,5 @@ /* - * $Id: wchar_wscoll.c,v 1.4 2021-02-04 00:29:27 clib2devs Exp $ + * $Id: wchar_wscoll.c,v 1.4 2021-02-04 00:29:27 clib4devs Exp $ */ #ifndef _WCHAR_HEADERS_H diff --git a/librt.gmk b/librt.gmk index 1b334825..a0ee9729 100644 --- a/librt.gmk +++ b/librt.gmk @@ -1,5 +1,5 @@ # -# $Id: librt.gmk,v 1.0 2023-04-27 10:09:48 clib2devs Exp $ +# $Id: librt.gmk,v 1.0 2023-04-27 10:09:48 clib4devs Exp $ # OUT_STATIC := $(BUILD_DIR)/obj/librt diff --git a/misc/control b/misc/control index 9ae318be..66882a7e 100644 --- a/misc/control +++ b/misc/control @@ -1,6 +1,6 @@ -Package: amigaos4-clib2 +Package: amigaos4-clib4 Version: 1.0.12 Maintainer: Andrea Palmatè Architecture: amd64 Section: libdevel -Description: clib2 for AmigaOS4 +Description: clib4 for AmigaOS4 diff --git a/misc/make_table.c b/misc/make_table.c index a888b6a1..5d6bfcd3 100644 --- a/misc/make_table.c +++ b/misc/make_table.c @@ -1,5 +1,5 @@ /* - * $Id: make_ctype_table.c,v 1.3 2006-01-08 12:04:23 clib2devs Exp $ + * $Id: make_ctype_table.c,v 1.3 2006-01-08 12:04:23 clib4devs Exp $ */ #include diff --git a/misc/specs b/misc/specs index 55a2e799..0cee018b 100644 --- a/misc/specs +++ b/misc/specs @@ -50,10 +50,10 @@ cc1 -E %{traditional|traditional-cpp:-traditional-cpp} %{fstack-protector|fstack-protector-all|fstack-protector-strong|fstack-protector-explicit:-lssp_nonshared -lssp} *endfile: -%{mcrt=clib2: %(endfile_clib2); mcrt=ixemul: %(endfile_ixemul); mcrt=libnix: %(endfile_libnix); mcrt=newlib: %(endfile_newlib); mcrt=default|!mcrt=*: %(endfile_amiga_default); : %eInvalid C runtime library} +%{mcrt=clib4: %(endfile_clib4); mcrt=ixemul: %(endfile_ixemul); mcrt=libnix: %(endfile_libnix); mcrt=newlib: %(endfile_newlib); mcrt=default|!mcrt=*: %(endfile_amiga_default); : %eInvalid C runtime library} *link: ---defsym __amigaos4__=1 %{!shared: %{!use-dynld: -Bstatic}} -q -d %{h*} %{v:-V} %{G*} %{Wl,*:%*} %{YP,*} %{R*} %{Qy:} %{!Qn:-Qy} %(link_thread) %(link_shlib) %(link_text) %{mbaserel: %{msdata|msdata=default|msdata=sysv: %e-mbaserel and -msdata options are incompatible}} %{mcrt=clib2: %(link_clib2); mcrt=ixemul: %(link_ixemul); mcrt=libnix: %(link_libnix); mcrt=newlib: %(link_newlib); mcrt=default|!mcrt=*: %(link_amiga_default); : %eInvalid C runtime library} -L%(base_sdk)local/common/lib%(lib_subdir_type) %{newlib: %e-newlib is obsolete, use -mcrt=newlib instead} +--defsym __amigaos4__=1 %{!shared: %{!use-dynld: -Bstatic}} -q -d %{h*} %{v:-V} %{G*} %{Wl,*:%*} %{YP,*} %{R*} %{Qy:} %{!Qn:-Qy} %(link_thread) %(link_shlib) %(link_text) %{mbaserel: %{msdata|msdata=default|msdata=sysv: %e-mbaserel and -msdata options are incompatible}} %{mcrt=clib4: %(link_clib4); mcrt=ixemul: %(link_ixemul); mcrt=libnix: %(link_libnix); mcrt=newlib: %(link_newlib); mcrt=default|!mcrt=*: %(link_amiga_default); : %eInvalid C runtime library} -L%(base_sdk)local/common/lib%(lib_subdir_type) %{newlib: %e-newlib is obsolete, use -mcrt=newlib instead} *lib: --start-group -lc --end-group @@ -65,7 +65,7 @@ cc1 -E %{traditional|traditional-cpp:-traditional-cpp} %{static|static-libgcc: %{!use-dynld: -lgcc -lgcc_eh} %{use-dynld: -lgcc} }%{!static:%{!static-libgcc:%{!shared:%{!shared-libgcc: %{!use-dynld: -lgcc -lgcc_eh} %{use-dynld: -lgcc}}%{shared-libgcc:-lgcc}}%{shared:%{shared-libgcc:-lgcc}%{!shared-libgcc:-lgcc}}}} *startfile: -%{mcrt=clib2: %(startfile_clib2); mcrt=ixemul: %(startfile_ixemul); mcrt=libnix: %(startfile_libnix); mcrt=newlib: %(startfile_newlib); mcrt=default|!mcrt=*: %(startfile_amiga_default); : %eInvalid C runtime library} +%{mcrt=clib4: %(startfile_clib4); mcrt=ixemul: %(startfile_ixemul); mcrt=libnix: %(startfile_libnix); mcrt=newlib: %(startfile_newlib); mcrt=default|!mcrt=*: %(startfile_amiga_default); : %eInvalid C runtime library} *cross_compile: 1 @@ -74,7 +74,7 @@ cc1 -E %{traditional|traditional-cpp:-traditional-cpp} 11.1.0 *multilib: -. !mcrt=newlib !mcrt=clib2;newlib mcrt=newlib !mcrt=clib2;clib2 !mcrt=newlib mcrt=clib2; +. !mcrt=newlib !mcrt=clib4;newlib mcrt=newlib !mcrt=clib4;clib4 !mcrt=newlib mcrt=clib4; *multilib_defaults: mcrt=newlib @@ -83,13 +83,13 @@ mcrt=newlib *multilib_matches: -mcrt=newlib mcrt=newlib;mcrt=clib2 mcrt=clib2; +mcrt=newlib mcrt=newlib;mcrt=clib4 mcrt=clib4; *multilib_exclusions: *multilib_options: -mcrt=newlib/mcrt=clib2 +mcrt=newlib/mcrt=clib4 *multilib_reuse: @@ -158,7 +158,7 @@ collect2 /usr/ppc-amigaos/SDK/ *cpp_os_default: -%{mcrt=clib2: %(cpp_clib2); mcrt=ixemul: %(cpp_ixemul); mcrt=libnix: %(cpp_libnix); mcrt=newlib: %(cpp_newlib); mcrt=default|!mcrt=*: %{mcrt=default|!nostdinc: %(cpp_amiga_default)}; : %eInvalid C runtime library} %{!nostdinc: -idirafter %(base_sdk)include/include_h -idirafter %(base_sdk)include/netinclude -idirafter %(base_sdk)local/common/include} %{mbaserel: %{msdata|msdata=default|msdata=sysv: %e-mbaserel and -msdata options are incompatible}} %{newlib: %e-newlib is obsolete, use -mcrt=newlib instead} +%{mcrt=clib4: %(cpp_clib4); mcrt=ixemul: %(cpp_ixemul); mcrt=libnix: %(cpp_libnix); mcrt=newlib: %(cpp_newlib); mcrt=default|!mcrt=*: %{mcrt=default|!nostdinc: %(cpp_amiga_default)}; : %eInvalid C runtime library} %{!nostdinc: -idirafter %(base_sdk)include/include_h -idirafter %(base_sdk)include/netinclude -idirafter %(base_sdk)local/common/include} %{mbaserel: %{msdata|msdata=default|msdata=sysv: %e-mbaserel and -msdata options are incompatible}} %{newlib: %e-newlib is obsolete, use -mcrt=newlib instead} *lib_subdir_type: %{mbaserel:/baserel; msdata|msdata=default|msdata=sysv:/small-data}%{msoft-float:/soft-float} @@ -175,20 +175,20 @@ collect2 *endfile_amiga_default: %(endfile_newlib) -*cpp_clib2: --idirafter %(base_sdk)clib2/include -idirafter %(base_sdk)local/clib2/include +*cpp_clib4: +-idirafter %(base_sdk)clib4/include -idirafter %(base_sdk)local/clib4/include -*lib_subdir_clib2: +*lib_subdir_clib4: lib%(lib_subdir_type) -*link_clib2: --L%(base_sdk)clib2/%(lib_subdir_clib2) -L%(base_gcc)lib/gcc/ppc-amigaos/%(version)/clib2/%(lib_subdir_clib2) -L%(base_sdk)local/clib2/%(lib_subdir_clib2) +*link_clib4: +-L%(base_sdk)clib4/%(lib_subdir_clib4) -L%(base_gcc)lib/gcc/ppc-amigaos/%(version)/clib4/%(lib_subdir_clib4) -L%(base_sdk)local/clib4/%(lib_subdir_clib4) -*startfile_clib2: -%{shared: %(base_sdk)clib2/%(lib_subdir_clib2)/shcrtbegin.o} %{!shared: %(base_sdk)clib2/%(lib_subdir_clib2)/crtbegin.o} %{!shared: %(base_sdk)clib2/%(lib_subdir_clib2)/crt0.o} +*startfile_clib4: +%{shared: %(base_sdk)clib4/%(lib_subdir_clib4)/shcrtbegin.o} %{!shared: %(base_sdk)clib4/%(lib_subdir_clib4)/crtbegin.o} %{!shared: %(base_sdk)clib4/%(lib_subdir_clib4)/crt0.o} -*endfile_clib2: -%{shared: %(base_sdk)clib2/%(lib_subdir_clib2)/shcrtend.o} %{!shared: %(base_sdk)clib2/%(lib_subdir_clib2)/crtend.o} +*endfile_clib4: +%{shared: %(base_sdk)clib4/%(lib_subdir_clib4)/shcrtend.o} %{!shared: %(base_sdk)clib4/%(lib_subdir_clib4)/crtend.o} *cpp_ixemul: -idirafter %(base_sdk)ixemul/include -idirafter %(base_sdk)local/ixemul/include diff --git a/misc/termcap.os4 b/misc/termcap.os4 index 7b9fcf15..0276fcdd 100644 --- a/misc/termcap.os4 +++ b/misc/termcap.os4 @@ -17,7 +17,7 @@ # (amiga: added empty to suppress a warning --esr) # Additions by Steven Solie , 24 July 2006 # Added colors by Andrea Palmate' , 17 August 2022 -amiga-clib2|Amiga ANSI ncurses:\ +amiga-clib4|Amiga ANSI ncurses:\ :am:bs:bw:ms:xn:cc:\ :Co#16:NC#3:co#80:li#24:pa#64:\ :AB=\2334%dm:AF=\2333%dm:AL=\233%dL:DC=\233%dP:\ @@ -37,7 +37,7 @@ amiga-clib2|Amiga ANSI ncurses:\ :kI=\23340~:kP=\23341~:kN=\23342~:kh=\23344~:@7=\23345~:\ :F1=\23320~:F2=\23321~: -amiga-clib2-mono|Amiga ANSI ncurses:\ +amiga-clib4-mono|Amiga ANSI ncurses:\ :am:bs:bw:ms:xn:cc:\ :co#80:li#24:\ :AB=\2334%dm:AF=\2333%dm:AL=\233%dL:DC=\233%dP:\ diff --git a/shared.gmk b/shared.gmk index 35feeeac..391900b4 100644 --- a/shared.gmk +++ b/shared.gmk @@ -1,10 +1,10 @@ # -# $Id: shared.gmk,v 1.0 2023-04-22 10:09:48 clib2devs Exp $ +# $Id: shared.gmk,v 1.0 2023-04-22 10:09:48 clib4devs Exp $ # ifdef SPE -$(OUT_SHARED_LIB)/shared_library/clib2.o : CFLAGS = $(INCLUDES) $(OPTIONS) $(OPTIMIZE) -O0 -fno-aggressive-loop-optimizations -$(OUT_SHARED_LIB)/shared_library/clib2.o : $(LIB_DIR)/shared_library/clib2.c $(LIB_DIR)/shared_library/clib2.h +$(OUT_SHARED_LIB)/shared_library/clib4.o : CFLAGS = $(INCLUDES) $(OPTIONS) $(OPTIMIZE) -O0 -fno-aggressive-loop-optimizations +$(OUT_SHARED_LIB)/shared_library/clib4.o : $(LIB_DIR)/shared_library/clib4.c $(LIB_DIR)/shared_library/clib4.h $(VERBOSE)$(COMPILE_SPE) $(OUT_SHARED_LIB)/shared_library/%.o : $(LIB_DIR)/shared_library/%.c @@ -25,8 +25,8 @@ $(OUT_SHARED_LIB)/amiga/%.o : $(LIB_DIR)/amiga/%.c $(OUT_SHARED_LIB)/crypt/%.o : $(LIB_DIR)/crypt/%.c $(VERBOSE)$(COMPILE_SPE) else -$(OUT_SHARED_LIB)/shared_library/clib2.o : CFLAGS = $(INCLUDES) $(OPTIONS) $(OPTIMIZE) -O0 -fno-aggressive-loop-optimizations -$(OUT_SHARED_LIB)/shared_library/clib2.o : $(LIB_DIR)/shared_library/clib2.c $(LIB_DIR)/shared_library/clib2.h +$(OUT_SHARED_LIB)/shared_library/clib4.o : CFLAGS = $(INCLUDES) $(OPTIONS) $(OPTIMIZE) -O0 -fno-aggressive-loop-optimizations +$(OUT_SHARED_LIB)/shared_library/clib4.o : $(LIB_DIR)/shared_library/clib4.c $(LIB_DIR)/shared_library/clib4.h $(VERBOSE)$(COMPILE) $(OUT_SHARED_LIB)/shared_library/%.o : $(LIB_DIR)/shared_library/%.c diff --git a/test_programs/Makefile b/test_programs/Makefile index 5f5ccd95..bee12964 100644 --- a/test_programs/Makefile +++ b/test_programs/Makefile @@ -1,5 +1,5 @@ # -# $Id: makefile,v 1.14 2021-01-25 11:29:46 clib2devs Exp $ +# $Id: makefile,v 1.14 2021-01-25 11:29:46 clib4devs Exp $ # # :ts=8 # @@ -36,13 +36,13 @@ INCLUDE = -I../library/include # Note: Because the matching startup code needs to be used for # correctly linking the test programs, you need to make sure -# that the current development version of clib2 is visible +# that the current development version of clib4 is visible # where the linker expects it (soft link). Some more tuning would be # required here because you really should not need to tinker # with the location of library and the options "-L. -L../library/lib" # should be sufficient. -CFLAGS = -mcrt=clib2 -fno-builtin $(WARNINGS) $(OPTIMIZE) $(DEBUG) $(OPTIONS) $(INCLUDE) +CFLAGS = -mcrt=clib4 -fno-builtin $(WARNINGS) $(OPTIMIZE) $(DEBUG) $(OPTIONS) $(INCLUDE) LFLAGS = C_SOURCES = $(shell find $(SOURCEDIR) -maxdepth 2 -name '*.c' -type f -printf '%P\n') diff --git a/test_programs/README.md b/test_programs/README.md index a6e43485..a999f154 100644 --- a/test_programs/README.md +++ b/test_programs/README.md @@ -1,4 +1,4 @@ -### Clib2 test and examples +### Clib4 test and examples This is a collection of programs used to test the library. These are functional tests: the library is supposed to do something, and produce diff --git a/test_programs/fcntl/fstat_stdout_test.c b/test_programs/fcntl/fstat_stdout_test.c index e4df23df..6d4d568a 100644 --- a/test_programs/fcntl/fstat_stdout_test.c +++ b/test_programs/fcntl/fstat_stdout_test.c @@ -1,5 +1,5 @@ /* - * $Id: fstat_stdout_test.c,v 1.1 2005-05-08 16:27:25 clib2devs Exp $ + * $Id: fstat_stdout_test.c,v 1.1 2005-05-08 16:27:25 clib4devs Exp $ */ #include diff --git a/test_programs/fcntl/fstat_test.c b/test_programs/fcntl/fstat_test.c index 6f56fb9a..6171b6a3 100644 --- a/test_programs/fcntl/fstat_test.c +++ b/test_programs/fcntl/fstat_test.c @@ -1,5 +1,5 @@ /* - * $Id: fstat_test.c,v 1.1 2006-09-20 19:46:37 clib2devs Exp $ + * $Id: fstat_test.c,v 1.1 2006-09-20 19:46:37 clib4devs Exp $ */ #include diff --git a/test_programs/io/fgets_test.c b/test_programs/io/fgets_test.c index c40396cc..98f7216e 100755 --- a/test_programs/io/fgets_test.c +++ b/test_programs/io/fgets_test.c @@ -1,5 +1,5 @@ /* - * $Id: fgets_test.c,v 1.1.1.1 2004-07-26 16:36:07 clib2devs Exp $ + * $Id: fgets_test.c,v 1.1.1.1 2004-07-26 16:36:07 clib4devs Exp $ */ #include diff --git a/test_programs/locale/hellogt.cxx b/test_programs/locale/hellogt.cxx index ebe2681c..41b4492a 100644 --- a/test_programs/locale/hellogt.cxx +++ b/test_programs/locale/hellogt.cxx @@ -1,7 +1,7 @@ /* On Linux: - ppc-amigaos-g++ -mcrt=clib2 -o hellogt hellogt.cxx -athread=native + ppc-amigaos-g++ -mcrt=clib4 -o hellogt hellogt.cxx -athread=native xgettext --package-name hellogt --package-version 1.2 --default-domain hellogt --output hellogt.pot hellogt.cxx msginit --no-translator --locale es_MX --output-file hellogt_spanish.po --input hellogt.pot sed --in-place hellogt_spanish.po --expression='/"hello, world!"/,/#: / s/""/"hola mundo"/' diff --git a/test_programs/math/factorial.c b/test_programs/math/factorial.c index da34ceb9..5f359c1c 100755 --- a/test_programs/math/factorial.c +++ b/test_programs/math/factorial.c @@ -1,11 +1,11 @@ #include /* -gcc -std=c99 -mcrt=clib2 -o factorial factorial.c -lm +gcc -std=c99 -mcrt=clib4 -o factorial factorial.c -lm output is: 16! = 20922789888 <- Wrong -gcc -std=c99 -mcrt=clib2 -o factorial factorial.c +gcc -std=c99 -mcrt=clib4 -o factorial factorial.c output is: 16! = 20922789888000 <- Correct */ diff --git a/test_programs/math/libm_test/Makefile b/test_programs/math/libm_test/Makefile index 5a618c12..57a4bf64 100644 --- a/test_programs/math/libm_test/Makefile +++ b/test_programs/math/libm_test/Makefile @@ -1,7 +1,7 @@ CC := ppc-amigaos-gcc CXX := ppc-amigaos-g++ -CFLAGS := -mcrt=clib2 -O3 -LDFLAGS := -mcrt=clib2 -athread=native +CFLAGS := -mcrt=clib4 -O3 +LDFLAGS := -mcrt=clib4 -athread=native all: test-double test-float # test-double-system test-float-system diff --git a/test_programs/memory/memalign/Makefile b/test_programs/memory/memalign/Makefile index 98476b6b..89b4d473 100755 --- a/test_programs/memory/memalign/Makefile +++ b/test_programs/memory/memalign/Makefile @@ -1,7 +1,7 @@ SRC = src all: - ppc-amigaos-gcc -mcrt=clib2 -O3 -gstabs src/align.c src/byte.c src/measure.c src/half.c src/word.c src/double.c src/alloc.c src/print.c -Wall -o memaligntest + ppc-amigaos-gcc -mcrt=clib4 -O3 -gstabs src/align.c src/byte.c src/measure.c src/half.c src/word.c src/double.c src/alloc.c src/print.c -Wall -o memaligntest clean: rm -fr memaligntest diff --git a/test_programs/memory/memcmp/Makefile b/test_programs/memory/memcmp/Makefile index 67058d7d..c812be9b 100755 --- a/test_programs/memory/memcmp/Makefile +++ b/test_programs/memory/memcmp/Makefile @@ -1,6 +1,6 @@ CC = ppc-amigaos-gcc CPPFLAGS = -DNDEBUG -CFLAGS = -mcrt=clib2 -std=c11 -Wall -Wextra -Werror -pedantic -O3 +CFLAGS = -mcrt=clib4 -std=c11 -Wall -Wextra -Werror -pedantic -O3 LDFLAGS = LIBS = -lm diff --git a/test_programs/memory/memcpy/Makefile b/test_programs/memory/memcpy/Makefile index 9a6918ba..60cc8e4d 100644 --- a/test_programs/memory/memcpy/Makefile +++ b/test_programs/memory/memcpy/Makefile @@ -1,7 +1,7 @@ SRC = src all: - ppc-amigaos-g++ -mcrt=clib2 -O3 -gstabs src/impl.c src/memcpy.cpp -Wall -o memcpy_bench -athread=native + ppc-amigaos-g++ -mcrt=clib4 -O3 -gstabs src/impl.c src/memcpy.cpp -Wall -o memcpy_bench -athread=native ppc-amigaos-g++ -mcrt=newlib -O3 -gstabs src/impl.c src/memcpy.cpp -Wall -o memcpy_bench_newlib -athread=native g++ -O3 -gstabs src/impl.c src/memcpy.cpp -Wall -o memcpy_bench_linux diff --git a/test_programs/memory/memset/Makefile b/test_programs/memory/memset/Makefile index aff06021..fbb16a89 100644 --- a/test_programs/memory/memset/Makefile +++ b/test_programs/memory/memset/Makefile @@ -1,7 +1,7 @@ SRC = src all: - ppc-amigaos-g++ -mcrt=clib2 -O3 -gstabs src/impl.cpp src/memset.cpp -Wall -o memset_bench -athread=native + ppc-amigaos-g++ -mcrt=clib4 -O3 -gstabs src/impl.cpp src/memset.cpp -Wall -o memset_bench -athread=native ppc-amigaos-g++ -mcrt=newlib -O3 -gstabs src/impl.cpp src/memset.cpp -Wall -o memset_bench_newlib -athread=native g++ -O3 -gstabs src/impl.cpp src/memset.cpp -Wall -o memset_bench_linux diff --git a/test_programs/memory/ramspeed.c b/test_programs/memory/ramspeed.c index 30948256..324f4fd6 100644 --- a/test_programs/memory/ramspeed.c +++ b/test_programs/memory/ramspeed.c @@ -12,7 +12,7 @@ struct test_fct { unsigned int (*f)(unsigned int, unsigned int); }; -#ifndef CLIB2 +#ifndef CLIB4 static inline unsigned long long rdtsc() { struct timeval tv; gettimeofday(&tv, NULL); diff --git a/test_programs/memory/strcmp_bench.c b/test_programs/memory/strcmp_bench.c index 0eb0bbf2..2d09bbd6 100644 --- a/test_programs/memory/strcmp_bench.c +++ b/test_programs/memory/strcmp_bench.c @@ -51,7 +51,7 @@ #else #include -#ifndef CLIB2 +#ifndef CLIB4 static uint64_t rdtsc() { uint32_t high1, high2, low; @@ -313,14 +313,14 @@ bench_hash_at() { /* Benchmark */ int main() { -#ifdef CLIB2 +#ifdef CLIB4 disableOptimizedFunctions(); #endif printf("strcmp: %llu\n--\n", bench_strcmp()); printf("strcmp with prefix: %llu\n--\n", bench_strcmp_prefix()); printf("hash rt: %llu\n--\n", bench_hash_rt()); printf("hash at: %llu\n--\n", bench_hash_at()); -#ifdef CLIB2 +#ifdef CLIB4 enableOptimizedFunctions(); printf("optimized strcmp: %llu\n--\n", bench_strcmp()); diff --git a/test_programs/misc/base_dir_nametest.c b/test_programs/misc/base_dir_nametest.c index 503ec912..514d0ff3 100755 --- a/test_programs/misc/base_dir_nametest.c +++ b/test_programs/misc/base_dir_nametest.c @@ -1,5 +1,5 @@ /* - * $Id: base_dir_nametest.c,v 1.1 2006-09-25 18:20:09 clib2devs Exp $ + * $Id: base_dir_nametest.c,v 1.1 2006-09-25 18:20:09 clib4devs Exp $ * * :ts=4 */ diff --git a/test_programs/misc/execvp_test.c b/test_programs/misc/execvp_test.c index 7203191f..908e1a92 100755 --- a/test_programs/misc/execvp_test.c +++ b/test_programs/misc/execvp_test.c @@ -1,5 +1,5 @@ /* - * $Id: execvp_test.c,v 1.2 2006-08-07 08:39:56 clib2devs Exp $ + * $Id: execvp_test.c,v 1.2 2006-08-07 08:39:56 clib4devs Exp $ */ #include diff --git a/test_programs/misc/simple.c b/test_programs/misc/simple.c index 9aec8161..3d1a2b2f 100755 --- a/test_programs/misc/simple.c +++ b/test_programs/misc/simple.c @@ -1,5 +1,5 @@ /* - * $Id: simple.c,v 1.1 2005-03-03 15:12:18 clib2devs Exp $ + * $Id: simple.c,v 1.1 2005-03-03 15:12:18 clib4devs Exp $ * * :ts=4 */ diff --git a/test_programs/misc/test_ts.c b/test_programs/misc/test_ts.c index 9d3110e5..282951c5 100644 --- a/test_programs/misc/test_ts.c +++ b/test_programs/misc/test_ts.c @@ -2,9 +2,9 @@ int main() { #ifdef __THREAD_SAFE - printf("Thread safe clib2\n"); + printf("Thread safe clib4\n"); #else - printf("This isn't thread safe clib2\n"); + printf("This isn't thread safe clib4\n"); #endif return 0; } \ No newline at end of file diff --git a/test_programs/misc/translate_test.c b/test_programs/misc/translate_test.c index 73337dd8..2185c4fb 100755 --- a/test_programs/misc/translate_test.c +++ b/test_programs/misc/translate_test.c @@ -1,5 +1,5 @@ /* - * $Id: translate_test.c,v 1.1.1.1 2004-07-26 16:36:08 clib2devs Exp $ + * $Id: translate_test.c,v 1.1.1.1 2004-07-26 16:36:08 clib4devs Exp $ */ #include diff --git a/test_programs/misc/uname.c b/test_programs/misc/uname.c index 783fdfe4..226eaf46 100755 --- a/test_programs/misc/uname.c +++ b/test_programs/misc/uname.c @@ -1,5 +1,5 @@ /* - * $Id: uname.c,v 1.2 2005-03-03 15:12:18 clib2devs Exp $ + * $Id: uname.c,v 1.2 2005-03-03 15:12:18 clib4devs Exp $ * * :ts=4 */ diff --git a/test_programs/network/client_server/Makefile b/test_programs/network/client_server/Makefile index 221bfcda..a26a7079 100644 --- a/test_programs/network/client_server/Makefile +++ b/test_programs/network/client_server/Makefile @@ -1,3 +1,3 @@ all: - ppc-amigaos-gcc -mcrt=clib2 client.c -o client - ppc-amigaos-gcc -mcrt=clib2 server.c -o server \ No newline at end of file + ppc-amigaos-gcc -mcrt=clib4 client.c -o client + ppc-amigaos-gcc -mcrt=clib4 server.c -o server \ No newline at end of file diff --git a/test_programs/network/client_server2/Makefile b/test_programs/network/client_server2/Makefile index 221bfcda..a26a7079 100644 --- a/test_programs/network/client_server2/Makefile +++ b/test_programs/network/client_server2/Makefile @@ -1,3 +1,3 @@ all: - ppc-amigaos-gcc -mcrt=clib2 client.c -o client - ppc-amigaos-gcc -mcrt=clib2 server.c -o server \ No newline at end of file + ppc-amigaos-gcc -mcrt=clib4 client.c -o client + ppc-amigaos-gcc -mcrt=clib4 server.c -o server \ No newline at end of file diff --git a/test_programs/network/select_poll.c b/test_programs/network/select_poll.c index b29e41e2..953258a5 100755 --- a/test_programs/network/select_poll.c +++ b/test_programs/network/select_poll.c @@ -1,4 +1,4 @@ -/* THIS EXAMPLE NOW WORK WITH CLIB2 BUT NOT WITH NEWLIB */ +/* THIS EXAMPLE NOW WORK WITH CLIB4 BUT NOT WITH NEWLIB */ #include /* I/O lib C89 */ #include /* Standard Lib C89 */ #include /* UNIX types POSIX */ diff --git a/test_programs/print/benchmark/Makefile b/test_programs/print/benchmark/Makefile index e188f755..0e8e2e1b 100644 --- a/test_programs/print/benchmark/Makefile +++ b/test_programs/print/benchmark/Makefile @@ -1,2 +1,2 @@ all: - ppc-amigaos-g++ -Iinclude -mcrt=clib2 float.cpp integer.cpp string.cpp test.cpp main.cpp -o benchmark -athread=native + ppc-amigaos-g++ -Iinclude -mcrt=clib4 float.cpp integer.cpp string.cpp test.cpp main.cpp -o benchmark -athread=native diff --git a/test_programs/print/simple_sprintf.cc b/test_programs/print/simple_sprintf.cc index c592fae4..053f7dc4 100644 --- a/test_programs/print/simple_sprintf.cc +++ b/test_programs/print/simple_sprintf.cc @@ -1,5 +1,5 @@ /* - * $Id: simple_sprintf.c,v 1.2 2005-05-18 07:22:52 clib2devs Exp $ + * $Id: simple_sprintf.c,v 1.2 2005-05-18 07:22:52 clib4devs Exp $ * * :ts=4 */ diff --git a/test_programs/print/strtok_test.c b/test_programs/print/strtok_test.c index fa1ca82a..13998bd9 100755 --- a/test_programs/print/strtok_test.c +++ b/test_programs/print/strtok_test.c @@ -1,5 +1,5 @@ /* - * $Id: strtok_test.c,v 1.1 2004-10-25 19:50:33 clib2devs Exp $ + * $Id: strtok_test.c,v 1.1 2004-10-25 19:50:33 clib4devs Exp $ * */ diff --git a/test_programs/print/test.c b/test_programs/print/test.c index f027422d..b683f7fb 100755 --- a/test_programs/print/test.c +++ b/test_programs/print/test.c @@ -1,5 +1,5 @@ /* - * $Id: test.c,v 1.6 2005-08-26 12:21:51 clib2devs Exp $ + * $Id: test.c,v 1.6 2005-08-26 12:21:51 clib4devs Exp $ * */ diff --git a/test_programs/profile/test_gprof.c b/test_programs/profile/test_gprof.c index f3d48121..a432060f 100644 --- a/test_programs/profile/test_gprof.c +++ b/test_programs/profile/test_gprof.c @@ -1,6 +1,6 @@ /* https://www.thegeekstuff.com/2012/08/gprof-tutorial/ * compile with: - * ppc-amigaos -mcrt=clib2 -pg test_gprof.c -o test_gprof -lprofile + * ppc-amigaos -mcrt=clib4 -pg test_gprof.c -o test_gprof -lprofile */ #include diff --git a/test_programs/resolv/main_test/Makefile b/test_programs/resolv/main_test/Makefile index 5f73687f..9626135e 100644 --- a/test_programs/resolv/main_test/Makefile +++ b/test_programs/resolv/main_test/Makefile @@ -1,3 +1,3 @@ all: - ppc-amigaos-gcc -mcrt=clib2 common.c res_query.c -o res_query -lresolv -lpthread - ppc-amigaos-gcc -mcrt=clib2 common.c res_mkquery.c -o res_mkquery -lresolv -lpthread \ No newline at end of file + ppc-amigaos-gcc -mcrt=clib4 common.c res_query.c -o res_query -lresolv -lpthread + ppc-amigaos-gcc -mcrt=clib4 common.c res_mkquery.c -o res_mkquery -lresolv -lpthread \ No newline at end of file diff --git a/test_programs/shared_lib/open.c b/test_programs/shared_lib/open.c index a68152e8..483ed6ff 100644 --- a/test_programs/shared_lib/open.c +++ b/test_programs/shared_lib/open.c @@ -3,24 +3,24 @@ #include int main() { - struct Clib2IFace *IClib2 = NULL; - struct Library *Clib2Base = OpenLibrary("clib2.library", 0); - if (Clib2Base) { - IClib2 = (struct Clib2IFace *) GetInterface(Clib2Base, "main", 1, NULL); - if (!IClib2) { - Printf("Cannot get clib2 interface\n"); + struct Clib4IFace *IClib4 = NULL; + struct Library *Clib4Base = OpenLibrary("clib4.library", 0); + if (Clib4Base) { + IClib4 = (struct Clib4IFace *) GetInterface(Clib4Base, "main", 1, NULL); + if (!IClib4) { + Printf("Cannot get clib4 interface\n"); } } else { - Printf("Cannot open clib2.library\n"); + Printf("Cannot open clib4.library\n"); } - if (IClib2) { - DropInterface((struct Interface *) IClib2); - IClib2 = NULL; + if (IClib4) { + DropInterface((struct Interface *) IClib4); + IClib4 = NULL; } - if (Clib2Base) { - CloseLibrary(Clib2Base); - Clib2Base = NULL; + if (Clib4Base) { + CloseLibrary(Clib4Base); + Clib4Base = NULL; } } \ No newline at end of file diff --git a/test_programs/threads/semaphore_test.c b/test_programs/threads/semaphore_test.c index 3b7161e4..a295f5a3 100755 --- a/test_programs/threads/semaphore_test.c +++ b/test_programs/threads/semaphore_test.c @@ -1,4 +1,4 @@ -// C program to demonstrate working of Semaphores - this fail on newlib if you press CTRL-C while should work with clib2 +// C program to demonstrate working of Semaphores - this fail on newlib if you press CTRL-C while should work with clib4 #include #include #include From d1361754b875ce45dd6385d5a30ab5906f61e252 Mon Sep 17 00:00:00 2001 From: Andrea Palmate Date: Thu, 28 Sep 2023 18:49:34 +0200 Subject: [PATCH 3/3] Removed specs file in GNUMakefile.os4 --- GNUmakefile.os4 | 4 ++-- misc/control | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/GNUmakefile.os4 b/GNUmakefile.os4 index 2d7a1837..d8f34c50 100644 --- a/GNUmakefile.os4 +++ b/GNUmakefile.os4 @@ -101,7 +101,7 @@ SHARED := $(if $(SHARED),$(SHARED),yes) STATIC := $(if $(STATIC),$(STATIC),yes) LARGEDATA := -OPTIONS += $(LARGEDATA) -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D__CLIB2__ -Wa,-mregnames -fno-builtin -nostdlib -D_GNU_SOURCE -D_XOPEN_SOURCE -D_USE_GNU -pipe -specs=misc/specs +OPTIONS += $(LARGEDATA) -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D__CLIB2__ -Wa,-mregnames -fno-builtin -nostdlib -D_GNU_SOURCE -D_XOPEN_SOURCE -D_USE_GNU -pipe OPTIMIZE := -O3 -mregnames -mmultiple -mupdate -ffp-contract=fast -mstrict-align STABS := @@ -342,7 +342,7 @@ define MAKESHARED $(VERBOSE)@$(MAKEDIR) $(@D) $(VERBOSE)@$(DELETE) $@ $(VERBOSE)echo -e "\rMaking Shared \033[0;31m$@\033[0m" -$(VERBOSE)$(CC) -nostdlib -mcrt=clib4 -shared -o $@ $(OUTPUT_LIB)/shcrtbegin.o $^ $(OUTPUT_LIB)/shcrtend.o $(LOG_COMMAND) -Wl,-soname,$(@F) -specs=misc/specs +$(VERBOSE)$(CC) -nostdlib -mcrt=clib4 -shared -o $@ $(OUTPUT_LIB)/shcrtbegin.o $^ $(OUTPUT_LIB)/shcrtend.o $(LOG_COMMAND) -Wl,-soname,$(@F) endef PatchForSPE : $(LIB_ROOT)/misc/PatchForSPE.cpp diff --git a/misc/control b/misc/control index 66882a7e..b7be7c2b 100644 --- a/misc/control +++ b/misc/control @@ -1,5 +1,5 @@ Package: amigaos4-clib4 -Version: 1.0.12 +Version: 1.0.0 Maintainer: Andrea Palmatè Architecture: amd64 Section: libdevel