diff options
author | roberto <roberto@FreeBSD.org> | 2008-08-18 14:26:05 +0000 |
---|---|---|
committer | roberto <roberto@FreeBSD.org> | 2008-08-18 14:26:05 +0000 |
commit | 7a6072eb585696f8856cd498c3fd194cf49f14c6 (patch) | |
tree | 9dcf618e4446ac2b5fca7d0afe7767382664f0d6 /libparse | |
parent | 4ded1c1fa0bc21c61f91a2dbe864835986745121 (diff) | |
download | FreeBSD-src-7a6072eb585696f8856cd498c3fd194cf49f14c6.zip FreeBSD-src-7a6072eb585696f8856cd498c3fd194cf49f14c6.tar.gz |
Import ntp 4.2.4p5 in the vendor code area. Far too many changes to list here,
please see CommitLog for detailed changes.
XXX html/build/hints/solaris.xtra.4095849 is not being imported as it conflicts
with the detect-merge-conflict.sh script in our repo.
Diffstat (limited to 'libparse')
-rw-r--r-- | libparse/Makefile.am | 25 | ||||
-rw-r--r-- | libparse/Makefile.in | 379 | ||||
-rw-r--r-- | libparse/README | 4 | ||||
-rw-r--r-- | libparse/binio.c | 155 | ||||
-rw-r--r-- | libparse/clk_computime.c | 44 | ||||
-rw-r--r-- | libparse/clk_dcf7000.c | 42 | ||||
-rw-r--r-- | libparse/clk_hopf6021.c | 7 | ||||
-rw-r--r-- | libparse/clk_meinberg.c | 49 | ||||
-rw-r--r-- | libparse/clk_rawdcf.c | 131 | ||||
-rw-r--r-- | libparse/clk_rcc8000.c | 7 | ||||
-rw-r--r-- | libparse/clk_schmid.c | 43 | ||||
-rw-r--r-- | libparse/clk_trimtaip.c | 38 | ||||
-rw-r--r-- | libparse/clk_trimtsip.c | 41 | ||||
-rw-r--r-- | libparse/clk_varitext.c | 51 | ||||
-rw-r--r-- | libparse/clk_wharton.c | 4 | ||||
-rw-r--r-- | libparse/data_mbg.c | 154 | ||||
-rw-r--r-- | libparse/gpstolfp.c | 76 | ||||
-rw-r--r-- | libparse/ieee754io.c | 610 | ||||
-rw-r--r-- | libparse/info_trimble.c | 8 | ||||
-rw-r--r-- | libparse/mfp_mul.c | 206 | ||||
-rw-r--r-- | libparse/parse.c | 54 | ||||
-rw-r--r-- | libparse/parse_conf.c | 42 | ||||
-rw-r--r-- | libparse/parsesolaris.c | 51 | ||||
-rw-r--r-- | libparse/parsestreams.c | 51 | ||||
-rw-r--r-- | libparse/trim_info.c | 38 |
25 files changed, 1952 insertions, 358 deletions
diff --git a/libparse/Makefile.am b/libparse/Makefile.am index c972004..c2c4036 100644 --- a/libparse/Makefile.am +++ b/libparse/Makefile.am @@ -23,7 +23,11 @@ libparse_a_SOURCES = parse.c \ clk_varitext.c \ data_mbg.c \ info_trimble.c \ - trim_info.c + trim_info.c \ + binio.c \ + ieee754io.c \ + mfp_mul.c \ + gpstolfp.c libparse_kernel_a_SOURCES = libparse_kernel_a_LIBADD = kparse$U.o \ @@ -38,7 +42,12 @@ libparse_kernel_a_LIBADD = kparse$U.o \ kclk_trimtaip$U.o \ kclk_trimtsip$U.o \ kclk_varitext$U.o \ - kclk_wharton$U.o + kclk_wharton$U.o \ + kbinio$U.o \ + kieee754io$U.o \ + kmfp_mul$U.o \ + kgpstolfp$U.o + INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/kernel ETAGS_ARGS = Makefile.am @@ -53,6 +62,18 @@ info_trimble.c: $(top_srcdir)/include/trimble.h mkinfo_rcmd.sed mkinfo_scmd.sed sed -n -f $(srcdir)/mkinfo_scmd.sed $(top_srcdir)/include/trimble.h > info_trimble.c || rm -f info_trimble.c sed -n -f $(srcdir)/mkinfo_rcmd.sed $(top_srcdir)/include/trimble.h >> info_trimble.c || rm -f info_trimble.c +kieee754io.o: ieee754io.c + $(COMPILE) $(K_CFLAGS) -c $(srcdir)/ieee754io.c -o $@ + +kmfp_mul.o: mfp_mul.c + $(COMPILE) $(K_CFLAGS) -c $(srcdir)/mfp_mul.c -o $@ + +kgpstolfp.o: gpstolfp.c + $(COMPILE) $(K_CFLAGS) -c $(srcdir)/gpstolfp.c -o $@ + +kbinio.o: binio.c + $(COMPILE) $(K_CFLAGS) -c $(srcdir)/binio.c -o $@ + kclk_computime.o: clk_computime.c $(COMPILE) $(K_CFLAGS) -c $(srcdir)/clk_computime.c -o $@ diff --git a/libparse/Makefile.in b/libparse/Makefile.in index e1e2a60..47ddec9 100644 --- a/libparse/Makefile.in +++ b/libparse/Makefile.in @@ -1,8 +1,8 @@ -# Makefile.in generated by automake 1.7.7 from Makefile.am. +# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ -# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 -# Free Software Foundation, Inc. +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -14,6 +14,7 @@ @SET_MAKE@ + srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ @@ -21,7 +22,6 @@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. - am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 @@ -37,16 +37,82 @@ PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ -target_triplet = @target@ +ANSI2KNR = ../util/ansi2knr +EXTRA_PROGRAMS = parsestreams$(EXEEXT) parsesolaris$(EXEEXT) +noinst_PROGRAMS = @MAKE_PARSEKMODULE@ +subdir = libparse +DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/libopts/m4/libopts.m4 \ + $(top_srcdir)/m4/define_dir.m4 \ + $(top_srcdir)/m4/hs_ulong_const.m4 \ + $(top_srcdir)/m4/os_cflags.m4 $(top_srcdir)/version.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +LIBRARIES = $(noinst_LIBRARIES) +ARFLAGS = cru +libparse_a_AR = $(AR) $(ARFLAGS) +libparse_a_LIBADD = +am_libparse_a_OBJECTS = parse$U.$(OBJEXT) parse_conf$U.$(OBJEXT) \ + clk_meinberg$U.$(OBJEXT) clk_schmid$U.$(OBJEXT) \ + clk_rawdcf$U.$(OBJEXT) clk_trimtsip$U.$(OBJEXT) \ + clk_dcf7000$U.$(OBJEXT) clk_trimtaip$U.$(OBJEXT) \ + clk_rcc8000$U.$(OBJEXT) clk_hopf6021$U.$(OBJEXT) \ + clk_computime$U.$(OBJEXT) clk_wharton$U.$(OBJEXT) \ + clk_varitext$U.$(OBJEXT) data_mbg$U.$(OBJEXT) \ + info_trimble$U.$(OBJEXT) trim_info$U.$(OBJEXT) \ + binio$U.$(OBJEXT) ieee754io$U.$(OBJEXT) mfp_mul$U.$(OBJEXT) \ + gpstolfp$U.$(OBJEXT) +libparse_a_OBJECTS = $(am_libparse_a_OBJECTS) +libparse_kernel_a_AR = $(AR) $(ARFLAGS) +libparse_kernel_a_DEPENDENCIES = kparse$U.o kparse_conf$U.o \ + kclk_computime$U.o kclk_dcf7000$U.o kclk_hopf6021$U.o \ + kclk_meinberg$U.o kclk_rawdcf$U.o kclk_rcc8000$U.o \ + kclk_schmid$U.o kclk_trimtaip$U.o kclk_trimtsip$U.o \ + kclk_varitext$U.o kclk_wharton$U.o kbinio$U.o kieee754io$U.o \ + kmfp_mul$U.o kgpstolfp$U.o +am_libparse_kernel_a_OBJECTS = +libparse_kernel_a_OBJECTS = $(am_libparse_kernel_a_OBJECTS) +PROGRAMS = $(noinst_PROGRAMS) +parsesolaris_SOURCES = parsesolaris.c +parsesolaris_OBJECTS = parsesolaris$U.$(OBJEXT) +parsesolaris_LDADD = $(LDADD) +parsestreams_SOURCES = parsestreams.c +parsestreams_OBJECTS = parsestreams$U.$(OBJEXT) +parsestreams_LDADD = $(LDADD) +DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +SOURCES = $(libparse_a_SOURCES) $(libparse_kernel_a_SOURCES) \ + parsesolaris.c parsestreams.c +DIST_SOURCES = $(libparse_a_SOURCES) $(libparse_kernel_a_SOURCES) \ + parsesolaris.c parsestreams.c +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ +AR = @AR@ ARLIB_DIR = @ARLIB_DIR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BINSUBDIR = @BINSUBDIR@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ @@ -54,10 +120,15 @@ CHUTEST = @CHUTEST@ CLKTEST = @CLKTEST@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DCFD = @DCFD@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ @@ -65,30 +136,39 @@ EF_LIBS = @EF_LIBS@ EF_PROGS = @EF_PROGS@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ INSTALL_DATA = @INSTALL_DATA@ +INSTALL_LIBOPTS_FALSE = @INSTALL_LIBOPTS_FALSE@ +INSTALL_LIBOPTS_TRUE = @INSTALL_LIBOPTS_TRUE@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LCRYPTO = @LCRYPTO@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ +LIBOPTS_CFLAGS = @LIBOPTS_CFLAGS@ +LIBOPTS_DIR = @LIBOPTS_DIR@ +LIBOPTS_LDADD = @LIBOPTS_LDADD@ LIBPARSE = @LIBPARSE@ LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MAKE_ADJTIMED = @MAKE_ADJTIMED@ +MAKE_CHECK_LAYOUT = @MAKE_CHECK_LAYOUT@ MAKE_CHECK_Y2K = @MAKE_CHECK_Y2K@ MAKE_LIBNTPSIM = @MAKE_LIBNTPSIM@ MAKE_LIBPARSE = @MAKE_LIBPARSE@ MAKE_LIBPARSE_KERNEL = @MAKE_LIBPARSE_KERNEL@ MAKE_NTPDSIM = @MAKE_NTPDSIM@ MAKE_NTPTIME = @MAKE_NTPTIME@ -MAKE_NTP_KEYGEN = @MAKE_NTP_KEYGEN@ MAKE_PARSEKMODULE = @MAKE_PARSEKMODULE@ -MAKE_SNTP = @MAKE_SNTP@ MAKE_TICKADJ = @MAKE_TICKADJ@ MAKE_TIMETRIM = @MAKE_TIMETRIM@ +NEED_LIBOPTS_FALSE = @NEED_LIBOPTS_FALSE@ +NEED_LIBOPTS_TRUE = @NEED_LIBOPTS_TRUE@ OBJEXT = @OBJEXT@ OPENSSL = @OPENSSL@ OPENSSL_INC = @OPENSSL_INC@ @@ -111,14 +191,21 @@ STRIP = @STRIP@ TESTDCF = @TESTDCF@ U = @U@ VERSION = @VERSION@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ +am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ +am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ @@ -139,6 +226,7 @@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ +mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ @@ -146,22 +234,14 @@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ -target = @target@ target_alias = @target_alias@ -target_cpu = @target_cpu@ -target_os = @target_os@ -target_vendor = @target_vendor@ #AUTOMAKE_OPTIONS = ../util/ansi2knr no-dependencies AUTOMAKE_OPTIONS = ../util/ansi2knr noinst_LIBRARIES = @MAKE_LIBPARSE@ @MAKE_LIBPARSE_KERNEL@ EXTRA_LIBRARIES = libparse.a libparse_kernel.a -EXTRA_PROGRAMS = parsestreams parsesolaris -noinst_PROGRAMS = @MAKE_PARSEKMODULE@ CLEANFILES = libparse.a libparse_kernel.a - K_CFLAGS = -DPARSESTREAM -DNTP_NEED_BOPS - libparse_a_SOURCES = parse.c \ parse_conf.c \ clk_meinberg.c \ @@ -177,8 +257,11 @@ libparse_a_SOURCES = parse.c \ clk_varitext.c \ data_mbg.c \ info_trimble.c \ - trim_info.c - + trim_info.c \ + binio.c \ + ieee754io.c \ + mfp_mul.c \ + gpstolfp.c libparse_kernel_a_SOURCES = libparse_kernel_a_LIBADD = kparse$U.o \ @@ -193,94 +276,48 @@ libparse_kernel_a_LIBADD = kparse$U.o \ kclk_trimtaip$U.o \ kclk_trimtsip$U.o \ kclk_varitext$U.o \ - kclk_wharton$U.o - + kclk_wharton$U.o \ + kbinio$U.o \ + kieee754io$U.o \ + kmfp_mul$U.o \ + kgpstolfp$U.o INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/kernel ETAGS_ARGS = Makefile.am - EXTRA_DIST = parsesolaris.c parsestreams.c mkinfo_scmd.sed mkinfo_rcmd.sed info_trimble.c -subdir = libparse -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = -LIBRARIES = $(noinst_LIBRARIES) - -libparse_a_AR = $(AR) cru -libparse_a_LIBADD = -am_libparse_a_OBJECTS = parse$U.$(OBJEXT) parse_conf$U.$(OBJEXT) \ - clk_meinberg$U.$(OBJEXT) clk_schmid$U.$(OBJEXT) \ - clk_rawdcf$U.$(OBJEXT) clk_trimtsip$U.$(OBJEXT) \ - clk_dcf7000$U.$(OBJEXT) clk_trimtaip$U.$(OBJEXT) \ - clk_rcc8000$U.$(OBJEXT) clk_hopf6021$U.$(OBJEXT) \ - clk_computime$U.$(OBJEXT) clk_wharton$U.$(OBJEXT) \ - clk_varitext$U.$(OBJEXT) data_mbg$U.$(OBJEXT) \ - info_trimble$U.$(OBJEXT) trim_info$U.$(OBJEXT) -libparse_a_OBJECTS = $(am_libparse_a_OBJECTS) -libparse_kernel_a_AR = $(AR) cru -libparse_kernel_a_DEPENDENCIES = kparse$U.o kparse_conf$U.o \ - kclk_computime$U.o kclk_dcf7000$U.o kclk_hopf6021$U.o \ - kclk_meinberg$U.o kclk_rawdcf$U.o kclk_rcc8000$U.o \ - kclk_schmid$U.o kclk_trimtaip$U.o kclk_trimtsip$U.o \ - kclk_varitext$U.o kclk_wharton$U.o -am_libparse_kernel_a_OBJECTS = -libparse_kernel_a_OBJECTS = $(am_libparse_kernel_a_OBJECTS) -EXTRA_PROGRAMS = parsestreams$(EXEEXT) parsesolaris$(EXEEXT) -noinst_PROGRAMS = @MAKE_PARSEKMODULE@ -PROGRAMS = $(noinst_PROGRAMS) - -parsesolaris_SOURCES = parsesolaris.c -parsesolaris_OBJECTS = parsesolaris$U.$(OBJEXT) -parsesolaris_LDADD = $(LDADD) -parsesolaris_DEPENDENCIES = -parsesolaris_LDFLAGS = -parsestreams_SOURCES = parsestreams.c -parsestreams_OBJECTS = parsestreams$U.$(OBJEXT) -parsestreams_LDADD = $(LDADD) -parsestreams_DEPENDENCIES = -parsestreams_LDFLAGS = - -DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) -depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles -@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/clk_computime$U.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/clk_dcf7000$U.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/clk_hopf6021$U.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/clk_meinberg$U.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/clk_rawdcf$U.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/clk_rcc8000$U.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/clk_schmid$U.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/clk_trimtaip$U.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/clk_trimtsip$U.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/clk_varitext$U.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/clk_wharton$U.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/data_mbg$U.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/info_trimble$U.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/parse$U.Po ./$(DEPDIR)/parse_conf$U.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/parsesolaris$U.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/parsestreams$U.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/trim_info$U.Po -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ -DIST_SOURCES = $(libparse_a_SOURCES) $(libparse_kernel_a_SOURCES) \ - parsesolaris.c parsestreams.c -DIST_COMMON = README $(srcdir)/Makefile.in Makefile.am -SOURCES = $(libparse_a_SOURCES) $(libparse_kernel_a_SOURCES) parsesolaris.c parsestreams.c - all: all-am .SUFFIXES: -.SUFFIXES: .c .o .obj -$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign libparse/Makefile'; \ cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu libparse/Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe) - -AR = ar + $(AUTOMAKE) --foreign libparse/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) @@ -294,7 +331,11 @@ libparse_kernel.a: $(libparse_kernel_a_OBJECTS) $(libparse_kernel_a_DEPENDENCIES $(RANLIB) libparse_kernel.a clean-noinstPROGRAMS: - -test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS) + @list='$(noinst_PROGRAMS)'; for p in $$list; do \ + f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f $$p $$f"; \ + rm -f $$p $$f ; \ + done parsesolaris$(EXEEXT): $(parsesolaris_OBJECTS) $(parsesolaris_DEPENDENCIES) @rm -f parsesolaris$(EXEEXT) $(LINK) $(parsesolaris_LDFLAGS) $(parsesolaris_OBJECTS) $(parsesolaris_LDADD) $(LIBS) @@ -303,18 +344,17 @@ parsestreams$(EXEEXT): $(parsestreams_OBJECTS) $(parsestreams_DEPENDENCIES) $(LINK) $(parsestreams_LDFLAGS) $(parsestreams_OBJECTS) $(parsestreams_LDADD) $(LIBS) mostlyclean-compile: - -rm -f *.$(OBJEXT) core *.core + -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c - -ANSI2KNR = ../util/ansi2knr ../util/ansi2knr: cd ../util && $(MAKE) $(AM_MAKEFLAGS) ansi2knr mostlyclean-kr: -test "$U" = "" || rm -f *_.c +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/binio$U.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clk_computime$U.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clk_dcf7000$U.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clk_hopf6021$U.Po@am__quote@ @@ -327,7 +367,10 @@ mostlyclean-kr: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clk_varitext$U.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clk_wharton$U.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/data_mbg$U.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gpstolfp$U.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ieee754io$U.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/info_trimble$U.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mfp_mul$U.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parse$U.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parse_conf$U.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parsesolaris$U.Po@am__quote@ @@ -335,26 +378,27 @@ mostlyclean-kr: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/trim_info$U.Po@am__quote@ .c.o: -@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \ -@am__fastdepCC_TRUE@ -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \ -@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ -@am__fastdepCC_TRUE@ fi +@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$< +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: -@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \ -@am__fastdepCC_TRUE@ -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \ -@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ -@am__fastdepCC_TRUE@ fi +@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi` +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< +binio_.c: binio.c $(ANSI2KNR) + $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/binio.c; then echo $(srcdir)/binio.c; else echo binio.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ clk_computime_.c: clk_computime.c $(ANSI2KNR) $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/clk_computime.c; then echo $(srcdir)/clk_computime.c; else echo clk_computime.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ clk_dcf7000_.c: clk_dcf7000.c $(ANSI2KNR) @@ -379,8 +423,14 @@ clk_wharton_.c: clk_wharton.c $(ANSI2KNR) $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/clk_wharton.c; then echo $(srcdir)/clk_wharton.c; else echo clk_wharton.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ data_mbg_.c: data_mbg.c $(ANSI2KNR) $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/data_mbg.c; then echo $(srcdir)/data_mbg.c; else echo data_mbg.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ +gpstolfp_.c: gpstolfp.c $(ANSI2KNR) + $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/gpstolfp.c; then echo $(srcdir)/gpstolfp.c; else echo gpstolfp.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ +ieee754io_.c: ieee754io.c $(ANSI2KNR) + $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/ieee754io.c; then echo $(srcdir)/ieee754io.c; else echo ieee754io.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ info_trimble_.c: info_trimble.c $(ANSI2KNR) $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/info_trimble.c; then echo $(srcdir)/info_trimble.c; else echo info_trimble.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ +mfp_mul_.c: mfp_mul.c $(ANSI2KNR) + $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/mfp_mul.c; then echo $(srcdir)/mfp_mul.c; else echo mfp_mul.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ parse_.c: parse.c $(ANSI2KNR) $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/parse.c; then echo $(srcdir)/parse.c; else echo parse.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ parse_conf_.c: parse_conf.c $(ANSI2KNR) @@ -391,23 +441,31 @@ parsestreams_.c: parsestreams.c $(ANSI2KNR) $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/parsestreams.c; then echo $(srcdir)/parsestreams.c; else echo parsestreams.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ trim_info_.c: trim_info.c $(ANSI2KNR) $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/trim_info.c; then echo $(srcdir)/trim_info.c; else echo trim_info.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ -clk_computime_.$(OBJEXT) clk_dcf7000_.$(OBJEXT) clk_hopf6021_.$(OBJEXT) \ -clk_meinberg_.$(OBJEXT) clk_rawdcf_.$(OBJEXT) clk_rcc8000_.$(OBJEXT) \ -clk_schmid_.$(OBJEXT) clk_trimtaip_.$(OBJEXT) clk_trimtsip_.$(OBJEXT) \ -clk_varitext_.$(OBJEXT) clk_wharton_.$(OBJEXT) data_mbg_.$(OBJEXT) \ -info_trimble_.$(OBJEXT) parse_.$(OBJEXT) parse_conf_.$(OBJEXT) \ -parsesolaris_.$(OBJEXT) parsestreams_.$(OBJEXT) trim_info_.$(OBJEXT) : \ -$(ANSI2KNR) +binio_.$(OBJEXT) binio_.lo clk_computime_.$(OBJEXT) clk_computime_.lo \ +clk_dcf7000_.$(OBJEXT) clk_dcf7000_.lo clk_hopf6021_.$(OBJEXT) \ +clk_hopf6021_.lo clk_meinberg_.$(OBJEXT) clk_meinberg_.lo \ +clk_rawdcf_.$(OBJEXT) clk_rawdcf_.lo clk_rcc8000_.$(OBJEXT) \ +clk_rcc8000_.lo clk_schmid_.$(OBJEXT) clk_schmid_.lo \ +clk_trimtaip_.$(OBJEXT) clk_trimtaip_.lo clk_trimtsip_.$(OBJEXT) \ +clk_trimtsip_.lo clk_varitext_.$(OBJEXT) clk_varitext_.lo \ +clk_wharton_.$(OBJEXT) clk_wharton_.lo data_mbg_.$(OBJEXT) \ +data_mbg_.lo gpstolfp_.$(OBJEXT) gpstolfp_.lo ieee754io_.$(OBJEXT) \ +ieee754io_.lo info_trimble_.$(OBJEXT) info_trimble_.lo \ +mfp_mul_.$(OBJEXT) mfp_mul_.lo parse_.$(OBJEXT) parse_.lo \ +parse_conf_.$(OBJEXT) parse_conf_.lo parsesolaris_.$(OBJEXT) \ +parsesolaris_.lo parsestreams_.$(OBJEXT) parsestreams_.lo \ +trim_info_.$(OBJEXT) trim_info_.lo : $(ANSI2KNR) + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +distclean-libtool: + -rm -f libtool uninstall-info-am: -ETAGS = etags -ETAGSFLAGS = - -CTAGS = ctags -CTAGSFLAGS = - -tags: TAGS - ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ @@ -416,6 +474,7 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique +tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) @@ -427,10 +486,11 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ - test -z "$(ETAGS_ARGS)$$tags$$unique" \ - || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique - + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) @@ -453,10 +513,6 @@ GTAGS: distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) - -top_distdir = .. -distdir = $(top_distdir)/$(PACKAGE)-$(VERSION) distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ @@ -470,7 +526,7 @@ distdir: $(DISTFILES) dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ - $(mkinstalldirs) "$(distdir)$$dir"; \ + $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ @@ -488,7 +544,6 @@ distdir: $(DISTFILES) check-am: all-am check: check-am all-am: Makefile $(LIBRARIES) $(PROGRAMS) - installdirs: install: install-am install-exec: install-exec-am @@ -501,7 +556,7 @@ install-am: all-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - INSTALL_STRIP_FLAG=-s \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: @@ -510,27 +565,28 @@ clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: - -rm -f $(CONFIG_CLEAN_FILES) + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am -clean-am: clean-generic clean-noinstLIBRARIES clean-noinstPROGRAMS \ - mostlyclean-am +clean-am: clean-generic clean-libtool clean-noinstLIBRARIES \ + clean-noinstPROGRAMS mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile - distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags + distclean-libtool distclean-tags dvi: dvi-am dvi-am: +html: html-am + info: info-am info-am: @@ -548,12 +604,12 @@ installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile - maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am -mostlyclean-am: mostlyclean-compile mostlyclean-generic mostlyclean-kr +mostlyclean-am: mostlyclean-compile mostlyclean-generic mostlyclean-kr \ + mostlyclean-libtool pdf: pdf-am @@ -566,15 +622,16 @@ ps-am: uninstall-am: uninstall-info-am .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-noinstLIBRARIES clean-noinstPROGRAMS ctags distclean \ - distclean-compile distclean-generic distclean-tags distdir dvi \ - dvi-am info info-am install install-am install-data \ + clean-libtool clean-noinstLIBRARIES clean-noinstPROGRAMS ctags \ + distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ install-data-am install-exec install-exec-am install-info \ install-info-am install-man install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-kr pdf pdf-am ps ps-am tags \ - uninstall uninstall-am uninstall-info-am + mostlyclean-generic mostlyclean-kr mostlyclean-libtool pdf \ + pdf-am ps ps-am tags uninstall uninstall-am uninstall-info-am # @@ -585,6 +642,18 @@ info_trimble.c: $(top_srcdir)/include/trimble.h mkinfo_rcmd.sed mkinfo_scmd.sed sed -n -f $(srcdir)/mkinfo_scmd.sed $(top_srcdir)/include/trimble.h > info_trimble.c || rm -f info_trimble.c sed -n -f $(srcdir)/mkinfo_rcmd.sed $(top_srcdir)/include/trimble.h >> info_trimble.c || rm -f info_trimble.c +kieee754io.o: ieee754io.c + $(COMPILE) $(K_CFLAGS) -c $(srcdir)/ieee754io.c -o $@ + +kmfp_mul.o: mfp_mul.c + $(COMPILE) $(K_CFLAGS) -c $(srcdir)/mfp_mul.c -o $@ + +kgpstolfp.o: gpstolfp.c + $(COMPILE) $(K_CFLAGS) -c $(srcdir)/gpstolfp.c -o $@ + +kbinio.o: binio.c + $(COMPILE) $(K_CFLAGS) -c $(srcdir)/binio.c -o $@ + kclk_computime.o: clk_computime.c $(COMPILE) $(K_CFLAGS) -c $(srcdir)/clk_computime.c -o $@ diff --git a/libparse/README b/libparse/README index 3484f9a..ac77054 100644 --- a/libparse/README +++ b/libparse/README @@ -31,9 +31,9 @@ SunOS (SunOS4 and SunOS5). The structure of the parse reference clock driver is as follows: - xntpd - contains NTP implementation and calls a reference clock + ntpd - contains NTP implementation and calls a reference clock 127.127.8.x which is implemented by - refclock_parse.c + refclock_parse.c - which contains several refclock decriptions. These are selected by the x part of the refclock address. The lower two bits specify the device to use. Thus the diff --git a/libparse/binio.c b/libparse/binio.c new file mode 100644 index 0000000..2f8546b --- /dev/null +++ b/libparse/binio.c @@ -0,0 +1,155 @@ +/* + * /src/NTP/ntp4-dev/libntp/binio.c,v 4.5 2005/04/16 17:32:10 kardel RELEASE_20050508_A + * + * binio.c,v 4.5 2005/04/16 17:32:10 kardel RELEASE_20050508_A + * + * $Created: Sun Jul 20 12:55:33 1997 $ + * + * Copyright (c) 1997-2005 by Frank Kardel <kardel <AT> ntp.org> + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the author nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 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. + * + */ + +#include "binio.h" + +long +get_lsb_short( + unsigned char **bufpp + ) +{ + long retval; + + retval = *((*bufpp)++); + retval |= *((*bufpp)++) << 8; + + return (retval & 0x8000) ? (~0xFFFF | retval) : retval; +} + +void +put_lsb_short( + unsigned char **bufpp, + long val + ) +{ + *((*bufpp)++) = (unsigned char) (val & 0xFF); + *((*bufpp)++) = (unsigned char) ((val >> 8) & 0xFF); +} + +long +get_lsb_long( + unsigned char **bufpp + ) +{ + long retval; + + retval = *((*bufpp)++); + retval |= *((*bufpp)++) << 8; + retval |= *((*bufpp)++) << 16; + retval |= *((*bufpp)++) << 24; + + return retval; +} + +void +put_lsb_long( + unsigned char **bufpp, + long val + ) +{ + *((*bufpp)++) = (unsigned char)(val & 0xFF); + *((*bufpp)++) = (unsigned char)((val >> 8) & 0xFF); + *((*bufpp)++) = (unsigned char)((val >> 16) & 0xFF); + *((*bufpp)++) = (unsigned char)((val >> 24) & 0xFF); +} + +long +get_msb_short( + unsigned char **bufpp + ) +{ + long retval; + + retval = *((*bufpp)++) << 8; + retval |= *((*bufpp)++); + + return (retval & 0x8000) ? (~0xFFFF | retval) : retval; +} + +void +put_msb_short( + unsigned char **bufpp, + long val + ) +{ + *((*bufpp)++) = (unsigned char)((val >> 8) & 0xFF); + *((*bufpp)++) = (unsigned char)( val & 0xFF); +} + +long +get_msb_long( + unsigned char **bufpp + ) +{ + long retval; + + retval = *((*bufpp)++) << 24; + retval |= *((*bufpp)++) << 16; + retval |= *((*bufpp)++) << 8; + retval |= *((*bufpp)++); + + return retval; +} + +void +put_msb_long( + unsigned char **bufpp, + long val + ) +{ + *((*bufpp)++) = (unsigned char)((val >> 24) & 0xFF); + *((*bufpp)++) = (unsigned char)((val >> 16) & 0xFF); + *((*bufpp)++) = (unsigned char)((val >> 8 ) & 0xFF); + *((*bufpp)++) = (unsigned char)( val & 0xFF); +} + +/* + * binio.c,v + * Revision 4.2 1999/02/21 12:17:34 kardel + * 4.91f reconcilation + * + * Revision 4.1 1998/06/28 16:47:50 kardel + * added {get,put}_msb_{short,long} functions + * + * Revision 4.0 1998/04/10 19:46:16 kardel + * Start 4.0 release version numbering + * + * Revision 1.1 1998/04/10 19:27:46 kardel + * initial NTP VERSION 4 integration of PARSE with GPS166 binary support + * + * Revision 1.1 1997/10/06 21:05:46 kardel + * new parse structure + * + */ diff --git a/libparse/clk_computime.c b/libparse/clk_computime.c index 3312b3f..d0db6a9 100644 --- a/libparse/clk_computime.c +++ b/libparse/clk_computime.c @@ -4,9 +4,9 @@ #if defined(REFCLOCK) && defined(CLOCK_PARSE) && defined(CLOCK_COMPUTIME) /* - * /src/NTP/ntp-4/libparse/clk_computime.c,v 4.6 1999/11/28 09:13:49 kardel RELEASE_19991128_A + * /src/NTP/ntp4-dev/libparse/clk_computime.c,v 4.10 2005/04/16 17:32:10 kardel RELEASE_20050508_A * - * clk_computime.c,v 4.6 1999/11/28 09:13:49 kardel RELEASE_19991128_A + * clk_computime.c,v 4.10 2005/04/16 17:32:10 kardel RELEASE_20050508_A * * Supports Diem's Computime Radio Clock * @@ -14,13 +14,33 @@ * * adapted by Alois Camenzind <alois.camenzind@ubs.ch> * - * Copyright (C) 1992-1998 by Frank Kardel - * Friedrich-Alexander Universität Erlangen-Nürnberg, Germany - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. - * + * Copyright (c) 1995-2005 by Frank Kardel <kardel <AT> ntp.org> + * Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universität Erlangen-Nürnberg, Germany + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the author nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 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. + * */ #include "ntp_fp.h" @@ -167,6 +187,12 @@ int clk_computime_bs; /* * clk_computime.c,v + * Revision 4.10 2005/04/16 17:32:10 kardel + * update copyright + * + * Revision 4.9 2004/11/14 15:29:41 kardel + * support PPSAPI, upgrade Copyright to Berkeley style + * * Revision 4.6 1999/11/28 09:13:49 kardel * RECON_4_0_98F * diff --git a/libparse/clk_dcf7000.c b/libparse/clk_dcf7000.c index 30506c5..e481731 100644 --- a/libparse/clk_dcf7000.c +++ b/libparse/clk_dcf7000.c @@ -1,16 +1,36 @@ /* - * /src/NTP/ntp-4/libparse/clk_dcf7000.c,v 4.6 1999/11/28 09:13:49 kardel RELEASE_19991128_A + * /src/NTP/ntp4-dev/libparse/clk_dcf7000.c,v 4.10 2005/04/16 17:32:10 kardel RELEASE_20050508_A * - * clk_dcf7000.c,v 4.6 1999/11/28 09:13:49 kardel RELEASE_19991128_A + * clk_dcf7000.c,v 4.10 2005/04/16 17:32:10 kardel RELEASE_20050508_A * * ELV DCF7000 module * - * Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998 by Frank Kardel - * Friedrich-Alexander Universität Erlangen-Nürnberg, Germany - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * Copyright (c) 1995-2005 by Frank Kardel <kardel <AT> ntp.org> + * Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universität Erlangen-Nürnberg, Germany + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the author nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 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. * */ @@ -162,6 +182,12 @@ int clk_dcf7000_bs; * History: * * clk_dcf7000.c,v + * Revision 4.10 2005/04/16 17:32:10 kardel + * update copyright + * + * Revision 4.9 2004/11/14 15:29:41 kardel + * support PPSAPI, upgrade Copyright to Berkeley style + * * Revision 4.6 1999/11/28 09:13:49 kardel * RECON_4_0_98F * diff --git a/libparse/clk_hopf6021.c b/libparse/clk_hopf6021.c index b2d53cd..426ea48 100644 --- a/libparse/clk_hopf6021.c +++ b/libparse/clk_hopf6021.c @@ -1,7 +1,7 @@ /* - * /src/NTP/ntp-4/libparse/clk_hopf6021.c,v 4.7 1999/11/28 09:13:49 kardel RELEASE_19991128_A + * /src/NTP/ntp4-dev/libparse/clk_hopf6021.c,v 4.10 2004/11/14 15:29:41 kardel RELEASE_20050508_A * - * clk_hopf6021.c,v 4.7 1999/11/28 09:13:49 kardel RELEASE_19991128_A + * clk_hopf6021.c,v 4.10 2004/11/14 15:29:41 kardel RELEASE_20050508_A * * Radiocode Clocks HOPF Funkuhr 6021 mit serieller Schnittstelle * base code version from 24th Nov 1995 - history at end @@ -251,6 +251,9 @@ int clk_hopf6021_bs; * History: * * clk_hopf6021.c,v + * Revision 4.10 2004/11/14 15:29:41 kardel + * support PPSAPI, upgrade Copyright to Berkeley style + * * Revision 4.7 1999/11/28 09:13:49 kardel * RECON_4_0_98F * diff --git a/libparse/clk_meinberg.c b/libparse/clk_meinberg.c index 87c7fde..90bb886 100644 --- a/libparse/clk_meinberg.c +++ b/libparse/clk_meinberg.c @@ -1,16 +1,36 @@ /* - * /src/NTP/ntp-4/libparse/clk_meinberg.c,v 4.8 1999/11/28 09:13:50 kardel RELEASE_19991128_A + * /src/NTP/REPOSITORY/ntp4-dev/libparse/clk_meinberg.c,v 4.12.2.1 2005/09/25 10:22:35 kardel RELEASE_20050925_A * - * clk_meinberg.c,v 4.8 1999/11/28 09:13:50 kardel RELEASE_19991128_A + * clk_meinberg.c,v 4.12.2.1 2005/09/25 10:22:35 kardel RELEASE_20050925_A * * Meinberg clock support * - * Copyright (C) 1995-1999 by Frank Kardel <kardel@acm.org> - * Copyright (C) 1992-1994 by Frank Kardel, Friedrich-Alexander Universität Erlangen-Nürnberg, Germany - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * Copyright (c) 1995-2005 by Frank Kardel <kardel <AT> ntp.org> + * Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universität Erlangen-Nürnberg, Germany + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the author nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 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. * */ @@ -626,7 +646,7 @@ gps_input( msg_buf->phase = MBG_NONE; /* buffer overflow - discard */ parseio->parse_data[parseio->parse_index] = '\0'; memcpy(parseio->parse_ldata, parseio->parse_data, (unsigned)(parseio->parse_index+1)); - parseio->parse_ldsize = parseio->parse_index+1; + parseio->parse_ldsize = parseio->parse_index; return PARSE_INP_DATA; } @@ -650,7 +670,7 @@ gps_input( parseprintf(DD_PARSE, ("gps_input: string complete\n")); parseio->parse_data[parseio->parse_index] = '\0'; memcpy(parseio->parse_ldata, parseio->parse_data, (unsigned)(parseio->parse_index+1)); - parseio->parse_ldsize = parseio->parse_index+1; + parseio->parse_ldsize = parseio->parse_index; parseio->parse_index = 0; return PARSE_INP_TIME; } @@ -715,6 +735,15 @@ int clk_meinberg_bs; * History: * * clk_meinberg.c,v + * Revision 4.12.2.1 2005/09/25 10:22:35 kardel + * cleanup buffer bounds + * + * Revision 4.12 2005/04/16 17:32:10 kardel + * update copyright + * + * Revision 4.11 2004/11/14 15:29:41 kardel + * support PPSAPI, upgrade Copyright to Berkeley style + * * Revision 4.8 1999/11/28 09:13:50 kardel * RECON_4_0_98F * diff --git a/libparse/clk_rawdcf.c b/libparse/clk_rawdcf.c index 40ec8ad..3ef36c4 100644 --- a/libparse/clk_rawdcf.c +++ b/libparse/clk_rawdcf.c @@ -1,16 +1,36 @@ /* - * /src/NTP/ntp-4/libparse/clk_rawdcf.c,v 4.9 1999/12/06 13:42:23 kardel Exp + * /src/NTP/REPOSITORY/ntp4-dev/libparse/clk_rawdcf.c,v 4.18 2006/06/22 18:40:01 kardel RELEASE_20060622_A * - * clk_rawdcf.c,v 4.9 1999/12/06 13:42:23 kardel Exp + * clk_rawdcf.c,v 4.18 2006/06/22 18:40:01 kardel RELEASE_20060622_A * * Raw DCF77 pulse clock support * - * Copyright (C) 1992-1998 by Frank Kardel - * Friedrich-Alexander Universität Erlangen-Nürnberg, Germany - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * Copyright (c) 1995-2006 by Frank Kardel <kardel <AT> ntp.org> + * Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universität Erlangen-Nürnberg, Germany + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the author nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 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. * */ @@ -89,6 +109,8 @@ typedef struct last_tcode { time_t tcode; /* last converted time code */ } last_tcode_t; +#define BUFFER_MAX 61 + clockformat_t clock_rawdcf = { inp_rawdcf, /* DCF77 input handling */ @@ -97,18 +119,18 @@ clockformat_t clock_rawdcf = 0, /* no private configuration data */ "RAW DCF77 Timecode", /* direct decoding / time synthesis */ - 61, /* bit buffer */ + BUFFER_MAX, /* bit buffer */ sizeof(last_tcode_t) }; static struct dcfparam { - unsigned char onebits[60]; - unsigned char zerobits[60]; + unsigned char *onebits; + unsigned char *zerobits; } dcfparameter = { - "###############RADMLS1248124P124812P1248121241248112481248P", /* 'ONE' representation */ - "--------------------s-------p------p----------------------p" /* 'ZERO' representation */ + (unsigned char *)"###############RADMLS1248124P124812P1248121241248112481248P??", /* 'ONE' representation */ + (unsigned char *)"--------------------s-------p------p----------------------p__" /* 'ZERO' representation */ }; static struct rawdcfcode @@ -158,13 +180,13 @@ static struct partab static u_long ext_bf( - register unsigned char *buf, - register int idx, - register unsigned char *zero + unsigned char *buf, + int idx, + unsigned char *zero ) { - register u_long sum = 0; - register int i, first; + u_long sum = 0; + int i, first; first = rawdcfcode[idx].offset; @@ -202,10 +224,10 @@ convert_rawdcf( clocktime_t *clock_time ) { - register unsigned char *s = buffer; - register unsigned char *b = dcfprm->onebits; - register unsigned char *c = dcfprm->zerobits; - register int i; + unsigned char *s = buffer; + unsigned char *b = dcfprm->onebits; + unsigned char *c = dcfprm->zerobits; + int i; parseprintf(DD_RAWDCF,("parse: convert_rawdcf: \"%s\"\n", buffer)); @@ -217,7 +239,7 @@ convert_rawdcf( return CVT_NONE; } - for (i = 0; i < 58; i++) + for (i = 0; i < size; i++) { if ((*s != *b) && (*s != *c)) { @@ -225,15 +247,15 @@ convert_rawdcf( * we only have two types of bytes (ones and zeros) */ #ifndef PARSEKERNEL - msyslog(LOG_ERR, "parse: convert_rawdcf: BAD DATA - no conversion for \"%s\"\n", buffer); + msyslog(LOG_ERR, "parse: convert_rawdcf: BAD DATA - no conversion"); #endif return CVT_NONE; } - b++; - c++; + if (*b) b++; + if (*c) c++; s++; } - + /* * check Start and Parity bits */ @@ -317,13 +339,13 @@ cvt_rawdcf( void *local ) { - last_tcode_t *t = (last_tcode_t *)local; - register unsigned char *s = (unsigned char *)buffer; - register unsigned char *e = s + size; - register unsigned char *b = dcfparameter.onebits; - register unsigned char *c = dcfparameter.zerobits; - u_long rtc = CVT_NONE; - register unsigned int i, lowmax, highmax, cutoff, span; + last_tcode_t *t = (last_tcode_t *)local; + unsigned char *s = (unsigned char *)buffer; + unsigned char *e = s + size; + unsigned char *b = dcfparameter.onebits; + unsigned char *c = dcfparameter.zerobits; + u_long rtc = CVT_NONE; + unsigned int i, lowmax, highmax, cutoff, span; #define BITS 9 unsigned char histbuf[BITS]; /* @@ -345,7 +367,7 @@ cvt_rawdcf( while (s < e) { - register unsigned int ch = *s ^ 0xFF; + unsigned int ch = *s ^ 0xFF; /* * these lines are left as an excercise to the reader 8-) */ @@ -445,7 +467,7 @@ cvt_rawdcf( parseprintf(DD_RAWDCF,("parse: cvt_rawdcf: lower maximum %d, higher maximum %d, cutoff %d\n", lowmax, highmax, cutoff)); s = (unsigned char *)buffer; - while ((s < e) && *c && *b) + while (s < e) { if (*s == (unsigned char)~0) { @@ -456,8 +478,8 @@ cvt_rawdcf( *s = (*s >= cutoff) ? *b : *c; } s++; - b++; - c++; + if (*b) b++; + if (*c) c++; } if (rtc == CVT_NONE) @@ -495,9 +517,9 @@ cvt_rawdcf( /*ARGSUSED*/ static u_long pps_rawdcf( - register parse_t *parseio, - register int status, - register timestamp_t *ptime + parse_t *parseio, + int status, + timestamp_t *ptime ) { if (!status) /* negative edge for simpler wiring (Rx->DCD) */ @@ -511,8 +533,8 @@ pps_rawdcf( static u_long snt_rawdcf( - register parse_t *parseio, - register timestamp_t *ptime + parse_t *parseio, + timestamp_t *ptime ) { if ((parseio->parse_dtime.parse_status & CVT_MASK) == CVT_OK) @@ -535,7 +557,7 @@ snt_rawdcf( /* * inp_rawdcf * - * grep DCF77 data from input stream + * grab DCF77 data from input stream */ static u_long inp_rawdcf( @@ -580,6 +602,27 @@ int clk_rawdcf_bs; * History: * * clk_rawdcf.c,v + * Revision 4.18 2006/06/22 18:40:01 kardel + * clean up signedness (gcc 4) + * + * Revision 4.17 2006/01/22 16:01:55 kardel + * update version information + * + * Revision 4.16 2006/01/22 15:51:22 kardel + * generate reasonable timecode output on invalid input + * + * Revision 4.15 2005/08/06 19:17:06 kardel + * clean log output + * + * Revision 4.14 2005/08/06 17:39:40 kardel + * cleanup size handling wrt/ to buffer boundaries + * + * Revision 4.13 2005/04/16 17:32:10 kardel + * update copyright + * + * Revision 4.12 2004/11/14 15:29:41 kardel + * support PPSAPI, upgrade Copyright to Berkeley style + * * Revision 4.9 1999/12/06 13:42:23 kardel * transfer correctly converted time codes always into tcode * diff --git a/libparse/clk_rcc8000.c b/libparse/clk_rcc8000.c index 23e6763..9ce270d 100644 --- a/libparse/clk_rcc8000.c +++ b/libparse/clk_rcc8000.c @@ -1,7 +1,7 @@ /* - * /src/NTP/ntp-4/libparse/clk_rcc8000.c,v 4.6 1999/11/28 09:13:51 kardel RELEASE_19991128_A + * /src/NTP/ntp4-dev/libparse/clk_rcc8000.c,v 4.9 2004/11/14 15:29:41 kardel RELEASE_20050508_A * - * clk_rcc8000.c,v 4.6 1999/11/28 09:13:51 kardel RELEASE_19991128_A + * clk_rcc8000.c,v 4.9 2004/11/14 15:29:41 kardel RELEASE_20050508_A * * Radiocode Clocks Ltd RCC 8000 Intelligent Off-Air Master Clock support * @@ -169,6 +169,9 @@ int clk_rcc8000_bs; * History: * * clk_rcc8000.c,v + * Revision 4.9 2004/11/14 15:29:41 kardel + * support PPSAPI, upgrade Copyright to Berkeley style + * * Revision 4.6 1999/11/28 09:13:51 kardel * RECON_4_0_98F * diff --git a/libparse/clk_schmid.c b/libparse/clk_schmid.c index 52c0ef4..4f48201 100644 --- a/libparse/clk_schmid.c +++ b/libparse/clk_schmid.c @@ -1,16 +1,37 @@ /* - * /src/NTP/ntp-4/libparse/clk_schmid.c,v 4.5 1999/11/28 09:13:51 kardel RELEASE_19991128_A + * /src/NTP/ntp4-dev/libparse/clk_schmid.c,v 4.9 2005/04/16 17:32:10 kardel RELEASE_20050508_A * - * clk_schmid.c,v 4.5 1999/11/28 09:13:51 kardel RELEASE_19991128_A + * clk_schmid.c,v 4.9 2005/04/16 17:32:10 kardel RELEASE_20050508_A * * Schmid clock support + * based on information and testing from Adam W. Feigin et. al (Swisstime iis.ethz.ch) * - * Copyright (C) 1992-1998 by Frank Kardel - * Friedrich-Alexander Universität Erlangen-Nürnberg, Germany - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * Copyright (c) 1995-2005 by Frank Kardel <kardel <AT> ntp.org> + * Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universität Erlangen-Nürnberg, Germany + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the author nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 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. * */ @@ -208,6 +229,12 @@ int clk_schmid_bs; * History: * * clk_schmid.c,v + * Revision 4.9 2005/04/16 17:32:10 kardel + * update copyright + * + * Revision 4.8 2004/11/14 15:29:41 kardel + * support PPSAPI, upgrade Copyright to Berkeley style + * * Revision 4.5 1999/11/28 09:13:51 kardel * RECON_4_0_98F * diff --git a/libparse/clk_trimtaip.c b/libparse/clk_trimtaip.c index 4453e2b..67db471 100644 --- a/libparse/clk_trimtaip.c +++ b/libparse/clk_trimtaip.c @@ -1,9 +1,37 @@ /* - * /src/NTP/ntp-4/libparse/clk_trimtaip.c,v 4.7 1999/11/28 09:13:51 kardel RELEASE_19991128_A + * /src/NTP/ntp4-dev/libparse/clk_trimtaip.c,v 4.11 2005/04/16 17:32:10 kardel RELEASE_20050508_A * - * clk_trimtaip.c,v 4.7 1999/11/28 09:13:51 kardel RELEASE_19991128_A + * clk_trimtaip.c,v 4.11 2005/04/16 17:32:10 kardel RELEASE_20050508_A * * Trimble SV6 clock support - several collected codepieces + * + * Copyright (c) 1995-2005 by Frank Kardel <kardel <AT> ntp.org> + * Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universität Erlangen-Nürnberg, Germany + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the author nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 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. + * */ #ifdef HAVE_CONFIG_H @@ -159,6 +187,12 @@ int clk_trimtaip_bs; * History: * * clk_trimtaip.c,v + * Revision 4.11 2005/04/16 17:32:10 kardel + * update copyright + * + * Revision 4.10 2004/11/14 15:29:41 kardel + * support PPSAPI, upgrade Copyright to Berkeley style + * * Revision 4.7 1999/11/28 09:13:51 kardel * RECON_4_0_98F * diff --git a/libparse/clk_trimtsip.c b/libparse/clk_trimtsip.c index 4e1d983..be97b74 100644 --- a/libparse/clk_trimtsip.c +++ b/libparse/clk_trimtsip.c @@ -1,9 +1,38 @@ /* - * /src/NTP/ntp-4/libparse/clk_trimtsip.c,v 4.13 1999/11/28 09:13:51 kardel RELEASE_19991128_A + * /src/NTP/ntp4-dev/libparse/clk_trimtsip.c,v 4.17 2005/04/16 17:32:10 kardel RELEASE_20050508_A * - * clk_trimtsip.c,v 4.13 1999/11/28 09:13:51 kardel RELEASE_19991128_A + * clk_trimtsip.c,v 4.17 2005/04/16 17:32:10 kardel RELEASE_20050508_A + * + * Trimble TSIP support + * Thanks to Sven Dietrich for providing test hardware + * + * Copyright (c) 1995-2005 by Frank Kardel <kardel <AT> ntp.org> + * Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universität Erlangen-Nürnberg, Germany + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the author nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 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. * - * Trimble TSIP support - CURRENTLY VERY MUCH UNDER CONSTRUCTION */ #ifdef HAVE_CONFIG_H @@ -369,6 +398,12 @@ int clk_trimtsip_bs; * History: * * clk_trimtsip.c,v + * Revision 4.17 2005/04/16 17:32:10 kardel + * update copyright + * + * Revision 4.16 2004/11/14 15:29:41 kardel + * support PPSAPI, upgrade Copyright to Berkeley style + * * Revision 4.13 1999/11/28 09:13:51 kardel * RECON_4_0_98F * diff --git a/libparse/clk_varitext.c b/libparse/clk_varitext.c index 8019e0e..01b8719 100644 --- a/libparse/clk_varitext.c +++ b/libparse/clk_varitext.c @@ -4,19 +4,44 @@ #if defined(REFCLOCK) && defined(CLOCK_PARSE) && defined(CLOCK_VARITEXT) /* - * clk_varitext.c,v 1.0 1997/01/19 A.McConnell + * /src/NTP/ntp4-dev/libparse/clk_varitext.c,v 1.5 2005/04/16 17:32:10 kardel RELEASE_20050508_A + * + * clk_varitext.c,v 1.5 2005/04/16 17:32:10 kardel RELEASE_20050508_A + * + * Varitext code variant by A.McConnell 1997/01/19 * * Supports Varitext's Radio Clock * * Used the Meinberg/Computime clock as a template for Varitext Radio Clock * - * Copyright (C) 1992-1996 by Frank Kardel - * Friedrich-Alexander Universitt Erlangen-Nrnberg, Germany - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. - * + * Codebase: + * Copyright (c) 1995-2005 by Frank Kardel <kardel <AT> ntp.org> + * Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universität Erlangen-Nürnberg, Germany + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the author nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 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. + * */ #include "ntp_fp.h" @@ -230,6 +255,16 @@ int clk_varitext_bs; #endif /* not (REFCLOCK && CLOCK_PARSE && CLOCK_VARITEXT) */ /* + * History: + * + * clk_varitext.c,v + * Revision 1.5 2005/04/16 17:32:10 kardel + * update copyright + * + * Revision 1.4 2004/11/14 15:29:41 kardel + * support PPSAPI, upgrade Copyright to Berkeley style + * + * * Revision 1.0 1997/06/02 13:16:30 McConnell * File created * diff --git a/libparse/clk_wharton.c b/libparse/clk_wharton.c index 6dfc971..b4332fb 100644 --- a/libparse/clk_wharton.c +++ b/libparse/clk_wharton.c @@ -1,7 +1,7 @@ /* - * /src/NTP/ntp-4/libparse/clk_wharton.c,v 4.1 1999/02/28 15:27:24 kardel RELEASE_19990228_A + * /src/NTP/ntp4-dev/libparse/clk_wharton.c,v 4.2 2004/11/14 15:29:41 kardel RELEASE_20050508_A * - * clk_wharton.c,v 4.1 1999/02/28 15:27:24 kardel RELEASE_19990228_A + * clk_wharton.c,v 4.2 2004/11/14 15:29:41 kardel RELEASE_20050508_A * * From Philippe De Muyter <phdm@macqel.be>, 1999 */ diff --git a/libparse/data_mbg.c b/libparse/data_mbg.c index 2545b98..9b6f1aa 100644 --- a/libparse/data_mbg.c +++ b/libparse/data_mbg.c @@ -1,9 +1,36 @@ /* - * /src/NTP/ntp-4/libparse/data_mbg.c,v 4.3 1999/02/21 12:17:42 kardel RELEASE_19991128_A + * /src/NTP/REPOSITORY/ntp4-dev/libparse/data_mbg.c,v 4.8 2006/06/22 18:40:01 kardel RELEASE_20060622_A + * + * data_mbg.c,v 4.8 2006/06/22 18:40:01 kardel RELEASE_20060622_A * * $Created: Sun Jul 20 12:08:14 1997 $ * - * Copyright (C) 1997, 1998 by Frank Kardel + * Copyright (c) 1997-2005 by Frank Kardel <kardel <AT> ntp.org> + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the author nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 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. + * */ #ifdef PARSESTREAM @@ -20,7 +47,7 @@ #include "ieee754io.h" static void get_mbg_tzname P((unsigned char **, char *)); -static void mbg_time_status_str P((unsigned char **, unsigned int)); +static void mbg_time_status_str P((char **, unsigned int, int)); #if 0 /* no actual floats on Meinberg binary interface */ static offsets_t mbg_float = { 1, 0, 3, 2, 0, 0, 0, 0 }; /* byte order for meinberg floats */ @@ -181,75 +208,81 @@ get_mbg_antinfo( static void mbg_time_status_str( - unsigned char **buffpp, - unsigned int status + char **buffpp, + unsigned int status, + int size ) { - static struct state - { - int flag; /* bit flag */ - const char *string; /* bit name */ - } states[] = - { - { TM_UTC, "UTC CORR" }, - { TM_LOCAL, "LOCAL TIME" }, - { TM_DL_ANN, "DST WARN" }, - { TM_DL_ENB, "DST" }, - { TM_LS_ANN, "LEAP WARN" }, - { TM_LS_ENB, "LEAP SEC" }, - { 0, "" } - }; - - if (status) - { - unsigned char *p; - struct state *s; + static struct state + { + int flag; /* bit flag */ + const char *string; /* bit name */ + } states[] = + { + { TM_UTC, "UTC CORR" }, + { TM_LOCAL, "LOCAL TIME" }, + { TM_DL_ANN, "DST WARN" }, + { TM_DL_ENB, "DST" }, + { TM_LS_ANN, "LEAP WARN" }, + { TM_LS_ENB, "LEAP SEC" }, + { 0, "" } + }; + + if (status) + { + char *start, *p; + struct state *s; - p = *buffpp; + start = p = *buffpp; - for (s = states; s->flag; s++) - { - if (s->flag & status) - { - if (p != *buffpp) + for (s = states; s->flag; s++) { - *p++ = ','; - *p++ = ' '; + if (s->flag & status) + { + if (p != *buffpp) + { + strncpy(p, ", ", size - (p - start)); + p += 2; + } + strncpy(p, s->string, size - (p - start)); + p += strlen(p); + } } - strcpy((char *)p, s->string); - p += strlen((char *)p); - } + *buffpp = p; } - *buffpp = p; - } } void mbg_tm_str( - unsigned char **buffpp, - TM *tmp + char **buffpp, + TM *tmp, + int size ) { - sprintf((char *)*buffpp, "%04d-%02d-%02d %02d:%02d:%02d.%07ld (%c%02d%02d) ", - tmp->year, tmp->month, tmp->mday, - tmp->hour, tmp->minute, tmp->second, tmp->frac, - (tmp->offs_from_utc < 0) ? '-' : '+', - abs(tmp->offs_from_utc) / 3600, - (abs(tmp->offs_from_utc) / 60) % 60); - *buffpp += strlen((char *)*buffpp); - mbg_time_status_str(buffpp, tmp->status); + char *s = *buffpp; + + snprintf(*buffpp, size, "%04d-%02d-%02d %02d:%02d:%02d.%07ld (%c%02d%02d) ", + tmp->year, tmp->month, tmp->mday, + tmp->hour, tmp->minute, tmp->second, tmp->frac, + (tmp->offs_from_utc < 0) ? '-' : '+', + abs(tmp->offs_from_utc) / 3600, + (abs(tmp->offs_from_utc) / 60) % 60); + *buffpp += strlen(*buffpp); + + mbg_time_status_str(buffpp, tmp->status, size - (*buffpp - s)); } void mbg_tgps_str( - unsigned char **buffpp, - T_GPS *tgpsp + char **buffpp, + T_GPS *tgpsp, + int size ) { - sprintf((char *)*buffpp, "week %d + %ld days + %ld.%07ld sec", - tgpsp->wn, tgpsp->sec / 86400, - tgpsp->sec % 86400, tgpsp->tick); - *buffpp += strlen((char *)*buffpp); + snprintf(*buffpp, size, "week %d + %ld days + %ld.%07ld sec", + tgpsp->wn, tgpsp->sec / 86400, + tgpsp->sec % 86400, tgpsp->tick); + *buffpp += strlen(*buffpp); } void @@ -475,6 +508,21 @@ get_mbg_iono( /* * data_mbg.c,v + * Revision 4.8 2006/06/22 18:40:01 kardel + * clean up signedness (gcc 4) + * + * Revision 4.7 2005/10/07 22:11:10 kardel + * bounded buffer implementation + * + * Revision 4.6.2.1 2005/09/25 10:23:06 kardel + * support bounded buffers + * + * Revision 4.6 2005/04/16 17:32:10 kardel + * update copyright + * + * Revision 4.5 2004/11/14 15:29:41 kardel + * support PPSAPI, upgrade Copyright to Berkeley style + * * Revision 4.3 1999/02/21 12:17:42 kardel * 4.91f reconcilation * diff --git a/libparse/gpstolfp.c b/libparse/gpstolfp.c new file mode 100644 index 0000000..fd7be31 --- /dev/null +++ b/libparse/gpstolfp.c @@ -0,0 +1,76 @@ +/* + * /src/NTP/ntp4-dev/libntp/gpstolfp.c,v 4.8 2005/04/16 17:32:10 kardel RELEASE_20050508_A + * + * gpstolfp.c,v 4.8 2005/04/16 17:32:10 kardel RELEASE_20050508_A + * + * $Created: Sun Jun 28 16:30:38 1998 $ + * + * Copyright (c) 1998-2005 by Frank Kardel <kardel <AT> ntp.org> + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the author nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 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. + * + */ +#include "ntp_fp.h" + +#define GPSORIGIN ULONG_CONST(2524953600) /* NTP origin - GPS origin in seconds */ +#define SECSPERWEEK (unsigned)(604800) /* seconds per week - GPS tells us about weeks */ +#define GPSWRAP 990 /* assume week count less than this in the previous epoch */ + +void +gpstolfp( + int weeks, + int days, + unsigned long seconds, + l_fp * lfp + ) +{ + if (weeks < GPSWRAP) + { + weeks += 1024; + } + + lfp->l_ui = weeks * SECSPERWEEK + days * 86400 + seconds + GPSORIGIN; /* convert to NTP time */ + lfp->l_uf = 0; +} + +/* + * History: + * + * gpstolfp.c,v + * Revision 4.8 2005/04/16 17:32:10 kardel + * update copyright + * + * Revision 4.7 2004/11/14 15:29:41 kardel + * support PPSAPI, upgrade Copyright to Berkeley style + * + * Revision 4.3 1999/02/28 11:42:44 kardel + * (GPSWRAP): update GPS rollover to 990 weeks + * + * Revision 4.2 1998/07/11 10:05:25 kardel + * Release 4.0.73d reconcilation + * + * Revision 4.1 1998/06/28 16:47:15 kardel + * added gpstolfp() function + */ diff --git a/libparse/ieee754io.c b/libparse/ieee754io.c new file mode 100644 index 0000000..27c6525 --- /dev/null +++ b/libparse/ieee754io.c @@ -0,0 +1,610 @@ +/* + * /src/NTP/ntp4-dev/libntp/ieee754io.c,v 4.12 2005/04/16 17:32:10 kardel RELEASE_20050508_A + * + * ieee754io.c,v 4.12 2005/04/16 17:32:10 kardel RELEASE_20050508_A + * + * $Created: Sun Jul 13 09:12:02 1997 $ + * + * Copyright (c) 1997-2005 by Frank Kardel <kardel <AT> ntp.org> + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the author nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 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. + * + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include <stdio.h> +#include "l_stdlib.h" +#include "ntp_stdlib.h" +#include "ntp_fp.h" +#include "ieee754io.h" + +static unsigned char get_byte P((unsigned char *, offsets_t, int *)); +#ifdef __not_yet__ +static void put_byte P((unsigned char *, offsets_t, int *, unsigned char)); +#endif + +#ifdef LIBDEBUG + +#include "lib_strbuf.h" + +static char * +fmt_blong( + unsigned long val, + int cnt + ) +{ + char *buf, *s; + int i = cnt; + + val <<= 32 - cnt; + LIB_GETBUF(buf); + s = buf; + + while (i--) + { + if (val & 0x80000000) + { + *s++ = '1'; + } + else + { + *s++ = '0'; + } + val <<= 1; + } + *s = '\0'; + return buf; +} + +static char * +fmt_flt( + unsigned int sign, + unsigned long mh, + unsigned long ml, + unsigned long ch + ) +{ + char *buf; + + LIB_GETBUF(buf); + sprintf(buf, "%c %s %s %s", sign ? '-' : '+', + fmt_blong(ch, 11), + fmt_blong(mh, 20), + fmt_blong(ml, 32)); + return buf; +} + +static char * +fmt_hex( + unsigned char *bufp, + int length + ) +{ + char *buf; + int i; + + LIB_GETBUF(buf); + for (i = 0; i < length; i++) + { + sprintf(buf+i*2, "%02x", bufp[i]); + } + return buf; +} + +#endif + +static unsigned char +get_byte( + unsigned char *bufp, + offsets_t offset, + int *fieldindex + ) +{ + unsigned char val; + + val = *(bufp + offset[*fieldindex]); +#ifdef LIBDEBUG + if (debug > 4) + printf("fetchieee754: getbyte(0x%08x, %d) = 0x%02x\n", (unsigned int)(bufp)+offset[*fieldindex], *fieldindex, val); +#endif + (*fieldindex)++; + return val; +} + +#ifdef __not_yet__ +static void +put_byte( + unsigned char *bufp, + offsets_t offsets, + int *fieldindex, + unsigned char val + ) +{ + *(bufp + offsets[*fieldindex]) = val; + (*fieldindex)++; +} +#endif + +/* + * make conversions to and from external IEEE754 formats and internal + * NTP FP format. + */ +int +fetch_ieee754( + unsigned char **buffpp, + int size, + l_fp *lfpp, + offsets_t offsets + ) +{ + unsigned char *bufp = *buffpp; + unsigned int sign; + unsigned int bias; + unsigned int maxexp; + int mbits; + u_long mantissa_low; + u_long mantissa_high; + u_long characteristic; + long exponent; +#ifdef LIBDEBUG + int length; +#endif + unsigned char val; + int fieldindex = 0; + + switch (size) + { + case IEEE_DOUBLE: +#ifdef LIBDEBUG + length = 8; +#endif + mbits = 52; + bias = 1023; + maxexp = 2047; + break; + + case IEEE_SINGLE: +#ifdef LIBDEBUG + length = 4; +#endif + mbits = 23; + bias = 127; + maxexp = 255; + break; + + default: + return IEEE_BADCALL; + } + + val = get_byte(bufp, offsets, &fieldindex); /* fetch sign byte & first part of characteristic */ + + sign = (val & 0x80) != 0; + characteristic = (val & 0x7F); + + val = get_byte(bufp, offsets, &fieldindex); /* fetch rest of characteristic and start of mantissa */ + + switch (size) + { + case IEEE_SINGLE: + characteristic <<= 1; + characteristic |= (val & 0x80) != 0; /* grab last characteristic bit */ + + mantissa_high = 0; + + mantissa_low = (val &0x7F) << 16; + mantissa_low |= get_byte(bufp, offsets, &fieldindex) << 8; + mantissa_low |= get_byte(bufp, offsets, &fieldindex); + break; + + case IEEE_DOUBLE: + characteristic <<= 4; + characteristic |= (val & 0xF0) >> 4; /* grab lower characteristic bits */ + + mantissa_high = (val & 0x0F) << 16; + mantissa_high |= get_byte(bufp, offsets, &fieldindex) << 8; + mantissa_high |= get_byte(bufp, offsets, &fieldindex); + + mantissa_low = get_byte(bufp, offsets, &fieldindex) << 24; + mantissa_low |= get_byte(bufp, offsets, &fieldindex) << 16; + mantissa_low |= get_byte(bufp, offsets, &fieldindex) << 8; + mantissa_low |= get_byte(bufp, offsets, &fieldindex); + break; + + default: + return IEEE_BADCALL; + } +#ifdef LIBDEBUG + if (debug > 4) + { + double d; + float f; + + if (size == IEEE_SINGLE) + { + int i; + + for (i = 0; i < length; i++) + { + *((unsigned char *)(&f)+i) = *(*buffpp + offsets[i]); + } + d = f; + } + else + { + int i; + + for (i = 0; i < length; i++) + { + *((unsigned char *)(&d)+i) = *(*buffpp + offsets[i]); + } + } + + printf("fetchieee754: FP: %s -> %s -> %e(=%s)\n", fmt_hex(*buffpp, length), + fmt_flt(sign, mantissa_high, mantissa_low, characteristic), + d, fmt_hex((unsigned char *)&d, length)); + } +#endif + + *buffpp += fieldindex; + + /* + * detect funny numbers + */ + if (characteristic == maxexp) + { + /* + * NaN or Infinity + */ + if (mantissa_low || mantissa_high) + { + /* + * NaN + */ + return IEEE_NAN; + } + else + { + /* + * +Inf or -Inf + */ + return sign ? IEEE_NEGINFINITY : IEEE_POSINFINITY; + } + } + else + { + /* + * collect real numbers + */ + + L_CLR(lfpp); + + /* + * check for overflows + */ + exponent = characteristic - bias; + + if (exponent > 31) /* sorry - hardcoded */ + { + /* + * overflow only in respect to NTP-FP representation + */ + return sign ? IEEE_NEGOVERFLOW : IEEE_POSOVERFLOW; + } + else + { + int frac_offset; /* where the fraction starts */ + + frac_offset = mbits - exponent; + + if (characteristic == 0) + { + /* + * de-normalized or tiny number - fits only as 0 + */ + return IEEE_OK; + } + else + { + /* + * adjust for implied 1 + */ + if (mbits > 31) + mantissa_high |= 1 << (mbits - 32); + else + mantissa_low |= 1 << mbits; + + /* + * take mantissa apart - if only all machine would support + * 64 bit operations 8-( + */ + if (frac_offset > mbits) + { + lfpp->l_ui = 0; /* only fractional number */ + frac_offset -= mbits + 1; /* will now contain right shift count - 1*/ + if (mbits > 31) + { + lfpp->l_uf = mantissa_high << (63 - mbits); + lfpp->l_uf |= mantissa_low >> (mbits - 33); + lfpp->l_uf >>= frac_offset; + } + else + { + lfpp->l_uf = mantissa_low >> frac_offset; + } + } + else + { + if (frac_offset > 32) + { + /* + * must split in high word + */ + lfpp->l_ui = mantissa_high >> (frac_offset - 32); + lfpp->l_uf = (mantissa_high & ((1 << (frac_offset - 32)) - 1)) << (64 - frac_offset); + lfpp->l_uf |= mantissa_low >> (frac_offset - 32); + } + else + { + /* + * must split in low word + */ + lfpp->l_ui = mantissa_high << (32 - frac_offset); + lfpp->l_ui |= (mantissa_low >> frac_offset) & ((1 << (32 - frac_offset)) - 1); + lfpp->l_uf = (mantissa_low & ((1 << frac_offset) - 1)) << (32 - frac_offset); + } + } + + /* + * adjust for sign + */ + if (sign) + { + L_NEG(lfpp); + } + + return IEEE_OK; + } + } + } +} + +int +put_ieee754( + unsigned char **bufpp, + int size, + l_fp *lfpp, + offsets_t offsets + ) +{ + l_fp outlfp; +#ifdef LIBDEBUG + unsigned int sign; + unsigned int bias; +#endif +/*unsigned int maxexp;*/ + int mbits; + int msb; + u_long mantissa_low = 0; + u_long mantissa_high = 0; +#ifdef LIBDEBUG + u_long characteristic = 0; + long exponent; +#endif +/*int length;*/ + unsigned long mask; + + outlfp = *lfpp; + + switch (size) + { + case IEEE_DOUBLE: + /*length = 8;*/ + mbits = 52; +#ifdef LIBDEBUG + bias = 1023; +#endif + /*maxexp = 2047;*/ + break; + + case IEEE_SINGLE: + /*length = 4;*/ + mbits = 23; +#ifdef LIBDEBUG + bias = 127; +#endif + /*maxexp = 255;*/ + break; + + default: + return IEEE_BADCALL; + } + + /* + * find sign + */ + if (L_ISNEG(&outlfp)) + { + L_NEG(&outlfp); +#ifdef LIBDEBUG + sign = 1; +#endif + } + else + { +#ifdef LIBDEBUG + sign = 0; +#endif + } + + if (L_ISZERO(&outlfp)) + { +#ifdef LIBDEBUG + exponent = mantissa_high = mantissa_low = 0; /* true zero */ +#endif + } + else + { + /* + * find number of significant integer bits + */ + mask = 0x80000000; + if (outlfp.l_ui) + { + msb = 63; + while (mask && ((outlfp.l_ui & mask) == 0)) + { + mask >>= 1; + msb--; + } + } + else + { + msb = 31; + while (mask && ((outlfp.l_uf & mask) == 0)) + { + mask >>= 1; + msb--; + } + } + + switch (size) + { + case IEEE_SINGLE: + mantissa_high = 0; + if (msb >= 32) + { + mantissa_low = (outlfp.l_ui & ((1 << (msb - 32)) - 1)) << (mbits - (msb - 32)); + mantissa_low |= outlfp.l_uf >> (mbits - (msb - 32)); + } + else + { + mantissa_low = (outlfp.l_uf << (mbits - msb)) & ((1 << mbits) - 1); + } + break; + + case IEEE_DOUBLE: + if (msb >= 32) + { + mantissa_high = (outlfp.l_ui << (mbits - msb)) & ((1 << (mbits - 32)) - 1); + mantissa_high |= outlfp.l_uf >> (32 - (mbits - msb)); + mantissa_low = (outlfp.l_ui & ((1 << (msb - mbits)) - 1)) << (32 - (msb - mbits)); + mantissa_low |= outlfp.l_uf >> (msb - mbits); + } + else + { + mantissa_high = outlfp.l_uf << (mbits - 32 - msb); + mantissa_low = outlfp.l_uf << (mbits - 32); + } + } + +#ifdef LIBDEBUG + exponent = msb - 32; + characteristic = exponent + bias; + + if (debug > 4) + printf("FP: %s\n", fmt_flt(sign, mantissa_high, mantissa_low, characteristic)); +#endif + } + return IEEE_OK; +} + + +#if defined(DEBUG) && defined(LIBDEBUG) +int main( + int argc, + char **argv + ) +{ + static offsets_t native_off = { 0, 1, 2, 3, 4, 5, 6, 7 }; + double f = 1.0; + double *f_p = &f; + l_fp fp; + + if (argc == 2) + { + if (sscanf(argv[1], "%lf", &f) != 1) + { + printf("cannot convert %s to a float\n", argv[1]); + return 1; + } + } + + printf("double: %s %s\n", fmt_blong(*(unsigned long *)&f, 32), fmt_blong(*(unsigned long *)((char *)(&f)+4), 32)); + printf("fetch from %f = %d\n", f, fetch_ieee754((void *)&f_p, IEEE_DOUBLE, &fp, native_off)); + printf("fp [%s %s] = %s\n", fmt_blong(fp.l_ui, 32), fmt_blong(fp.l_uf, 32), mfptoa(fp.l_ui, fp.l_uf, 15)); + f_p = &f; + put_ieee754((void *)&f_p, IEEE_DOUBLE, &fp, native_off); + + return 0; +} + +#endif +/* + * History: + * + * ieee754io.c,v + * Revision 4.12 2005/04/16 17:32:10 kardel + * update copyright + * + * Revision 4.11 2004/11/14 15:29:41 kardel + * support PPSAPI, upgrade Copyright to Berkeley style + * + * Revision 4.8 1999/02/21 12:17:36 kardel + * 4.91f reconcilation + * + * Revision 4.7 1999/02/21 11:26:03 kardel + * renamed index to fieldindex to avoid index() name clash + * + * Revision 4.6 1998/11/15 20:27:52 kardel + * Release 4.0.73e13 reconcilation + * + * Revision 4.5 1998/08/16 19:01:51 kardel + * debug information only compile for LIBDEBUG case + * + * Revision 4.4 1998/08/09 09:39:28 kardel + * Release 4.0.73e2 reconcilation + * + * Revision 4.3 1998/06/13 11:56:19 kardel + * disabled putbute() for the time being + * + * Revision 4.2 1998/06/12 15:16:58 kardel + * ansi2knr compatibility + * + * Revision 4.1 1998/05/24 07:59:56 kardel + * conditional debug support + * + * Revision 4.0 1998/04/10 19:46:29 kardel + * Start 4.0 release version numbering + * + * Revision 1.1 1998/04/10 19:27:46 kardel + * initial NTP VERSION 4 integration of PARSE with GPS166 binary support + * + * Revision 1.1 1997/10/06 21:05:45 kardel + * new parse structure + * + */ diff --git a/libparse/info_trimble.c b/libparse/info_trimble.c index af50858..eea6cbd 100644 --- a/libparse/info_trimble.c +++ b/libparse/info_trimble.c @@ -1,6 +1,6 @@ /* -* Automatically generated - do not modify -*/ + * Automatically generated - do not modify + */ #include "ntp_types.h" #include "ntpd.h" @@ -47,7 +47,7 @@ cmd_info_t trimble_scmds[] = { { CMD_CHIGH8CNT, "CMD_CHIGH8CNT", "high-8 (best 4) / high-6 (overdetermined) control (0x75)", "", 0 }, { CMD_CMAXDGPSCOR, "CMD_CMAXDGPSCOR", "maximum rate of DGPS corrections (0x77)", "", 0 }, { CMD_CSUPER, "CMD_CSUPER", "super paket (0x8E)", "", 0 }, -{ 0xFF, "", "" } + { 0xFF, "", "" } }; @@ -89,6 +89,6 @@ cmd_info_t trimble_rcmds[] = { { CMD_RDOUBLELLA, "CMD_RDOUBLELLA", "double precision LLA (0x84)", "gps_position_ext(LLA)", RO|DEF }, { CMD_RDGPSSTAT, "CMD_RDGPSSTAT", "differential correction status (0x85)", "trimble_dgpsstatus", RO }, { CMD_RSUPER, "CMD_RSUPER", "super paket (0x8F)", "", 0 }, -{ 0xFF, "", "" } + { 0xFF, "", "" } }; diff --git a/libparse/mfp_mul.c b/libparse/mfp_mul.c new file mode 100644 index 0000000..677ed18 --- /dev/null +++ b/libparse/mfp_mul.c @@ -0,0 +1,206 @@ +/* + * /src/NTP/ntp4-dev/libparse/mfp_mul.c,v 4.9 2005/07/17 20:34:40 kardel RELEASE_20050717_A + * + * mfp_mul.c,v 4.9 2005/07/17 20:34:40 kardel RELEASE_20050717_A + * + * $Created: Sat Aug 16 20:35:08 1997 $ + * + * Copyright (c) 1997-2005 by Frank Kardel <kardel <AT> ntp.org> + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the author nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 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. + * + */ +#include <stdio.h> +#include "ntp_stdlib.h" +#include "ntp_types.h" +#include "ntp_fp.h" + +#define LOW_MASK (u_int32)((1<<(FRACTION_PREC/2))-1) +#define HIGH_MASK (u_int32)(LOW_MASK << (FRACTION_PREC/2)) + +/* + * for those who worry about overflows (possibly triggered by static analysis tools): + * + * Largest value of a 2^n bit number is 2^n-1. + * Thus the result is: (2^n-1)*(2^n-1) = 2^2n - 2^n - 2^n + 1 < 2^2n + * Here overflow can not happen for 2 reasons: + * 1) the code actually multiplies the absolute values of two signed + * 64bit quantities.thus effectively multiplying 2 63bit quantities. + * 2) Carry propagation is from low to high, building principle is + * addition, so no storage for the 2^2n term from above is needed. + */ + +void +mfp_mul( + int32 *o_i, + u_int32 *o_f, + int32 a_i, + u_int32 a_f, + int32 b_i, + u_int32 b_f + ) +{ + int32 i, j; + u_int32 f; + u_long a[4]; /* operand a */ + u_long b[4]; /* operand b */ + u_long c[5]; /* result c - 5 items for performance - see below */ + u_long carry; + + int neg = 0; + + if (a_i < 0) /* examine sign situation */ + { + neg = 1; + M_NEG(a_i, a_f); + } + + if (b_i < 0) /* examine sign situation */ + { + neg = !neg; + M_NEG(b_i, b_f); + } + + a[0] = a_f & LOW_MASK; /* prepare a operand */ + a[1] = (a_f & HIGH_MASK) >> (FRACTION_PREC/2); + a[2] = a_i & LOW_MASK; + a[3] = (a_i & HIGH_MASK) >> (FRACTION_PREC/2); + + b[0] = b_f & LOW_MASK; /* prepare b operand */ + b[1] = (b_f & HIGH_MASK) >> (FRACTION_PREC/2); + b[2] = b_i & LOW_MASK; + b[3] = (b_i & HIGH_MASK) >> (FRACTION_PREC/2); + + c[0] = c[1] = c[2] = c[3] = c[4] = 0; + + for (i = 0; i < 4; i++) /* we do assume 32 * 32 = 64 bit multiplication */ + for (j = 0; j < 4; j++) + { + u_long result_low, result_high; + int low_index = (i+j)/2; /* formal [0..3] - index for low long word */ + int mid_index = 1+low_index; /* formal [1..4]! - index for high long word + will generate unecessary add of 0 to c[4] + but save 15 'if (result_high) expressions' */ + int high_index = 1+mid_index; /* formal [2..5]! - index for high word overflow + - only assigned on overflow (limits range to 2..3) */ + + result_low = (u_long)a[i] * (u_long)b[j]; /* partial product */ + + if ((i+j) & 1) /* splits across two result registers */ + { + result_high = result_low >> (FRACTION_PREC/2); + result_low <<= FRACTION_PREC/2; + carry = (unsigned)1<<(FRACTION_PREC/2); + } + else + { /* stays in a result register - except for overflows */ + result_high = 0; + carry = 1; + } + + if (((c[low_index] >> 1) + (result_low >> 1) + ((c[low_index] & result_low & carry) != 0)) & + (u_int32)((unsigned)1<<(FRACTION_PREC - 1))) { + result_high++; /* propagate overflows */ + } + + c[low_index] += result_low; /* add up partial products */ + + if (((c[mid_index] >> 1) + (result_high >> 1) + ((c[mid_index] & result_high & 1) != 0)) & + (u_int32)((unsigned)1<<(FRACTION_PREC - 1))) { + c[high_index]++; /* propagate overflows of high word sum */ + } + + c[mid_index] += result_high; /* will add a 0 to c[4] once but saves 15 if conditions */ + } + +#ifdef DEBUG + if (debug > 6) + printf("mfp_mul: 0x%04lx%04lx%04lx%04lx * 0x%04lx%04lx%04lx%04lx = 0x%08lx%08lx%08lx%08lx\n", + a[3], a[2], a[1], a[0], b[3], b[2], b[1], b[0], c[3], c[2], c[1], c[0]); +#endif + + if (c[3]) /* overflow */ + { + i = ((unsigned)1 << (FRACTION_PREC-1)) - 1; + f = ~(unsigned)0; + } + else + { /* take produkt - discarding extra precision */ + i = c[2]; + f = c[1]; + } + + if (neg) /* recover sign */ + { + M_NEG(i, f); + } + + *o_i = i; + *o_f = f; + +#ifdef DEBUG + if (debug > 6) + printf("mfp_mul: %s * %s => %s\n", + mfptoa((u_long)a_i, a_f, 6), + mfptoa((u_long)b_i, b_f, 6), + mfptoa((u_long)i, f, 6)); +#endif +} + +/* + * History: + * + * mfp_mul.c,v + * Revision 4.9 2005/07/17 20:34:40 kardel + * correct carry propagation implementation + * + * Revision 4.8 2005/07/12 16:17:26 kardel + * add explanation why we do not write into c[4] + * + * Revision 4.7 2005/04/16 17:32:10 kardel + * update copyright + * + * Revision 4.6 2004/11/14 15:29:41 kardel + * support PPSAPI, upgrade Copyright to Berkeley style + * + * Revision 4.3 1999/02/21 12:17:37 kardel + * 4.91f reconcilation + * + * Revision 4.2 1998/12/20 23:45:28 kardel + * fix types and warnings + * + * Revision 4.1 1998/05/24 07:59:57 kardel + * conditional debug support + * + * Revision 4.0 1998/04/10 19:46:38 kardel + * Start 4.0 release version numbering + * + * Revision 1.1 1998/04/10 19:27:47 kardel + * initial NTP VERSION 4 integration of PARSE with GPS166 binary support + * + * Revision 1.1 1997/10/06 21:05:46 kardel + * new parse structure + * + */ diff --git a/libparse/parse.c b/libparse/parse.c index d3712b6..dfbbaa6 100644 --- a/libparse/parse.c +++ b/libparse/parse.c @@ -1,7 +1,7 @@ /* - * /src/NTP/ntp-4/libparse/parse.c,v 4.14 1999/11/28 09:13:52 kardel RELEASE_19991128_A + * /src/NTP/ntp4-dev/libparse/parse.c,v 4.20 2005/08/06 17:39:40 kardel RELEASE_20050806_A * - * parse.c,v 4.14 1999/11/28 09:13:52 kardel RELEASE_19991128_A + * parse.c,v 4.20 2005/08/06 17:39:40 kardel RELEASE_20050806_A * * Parser module for reference clock * @@ -11,12 +11,32 @@ * a struct timeval. * when PARSEKERNEL is not defined NTP time stamps will be used. * - * Copyright (c) 1992-1998 by Frank Kardel - * Friedrich-Alexander Universität Erlangen-Nürnberg, Germany - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * Copyright (c) 1995-2005 by Frank Kardel <kardel <AT> ntp.org> + * Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universität Erlangen-Nürnberg, Germany + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the author nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 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. * */ @@ -27,7 +47,7 @@ #if defined(REFCLOCK) && defined(CLOCK_PARSE) #if !(defined(lint) || defined(__GNUC__)) -static char rcsid[] = "parse.c,v 4.14 1999/11/28 09:13:52 kardel RELEASE_19991128_A"; +static char rcsid[] = "parse.c,v 4.20 2005/08/06 17:39:40 kardel RELEASE_20050806_A"; #endif #include "ntp_fp.h" @@ -189,7 +209,7 @@ parse_restart( */ parseio->parse_data[parseio->parse_index] = '\0'; memcpy(parseio->parse_ldata, parseio->parse_data, (unsigned)(parseio->parse_index+1)); - parseio->parse_ldsize = parseio->parse_index+1; + parseio->parse_ldsize = parseio->parse_index; updated = PARSE_INP_TIME; } @@ -234,7 +254,7 @@ parse_end( */ parseio->parse_data[parseio->parse_index] = '\0'; memcpy(parseio->parse_ldata, parseio->parse_data, (unsigned)(parseio->parse_index+1)); - parseio->parse_ldsize = parseio->parse_index+1; + parseio->parse_ldsize = parseio->parse_index; parseio->parse_index = 0; parseprintf(DD_PARSE, ("parse: parse_end: buffer end\n")); return PARSE_INP_TIME; @@ -866,6 +886,18 @@ int parse_bs; * History: * * parse.c,v + * Revision 4.20 2005/08/06 17:39:40 kardel + * cleanup size handling wrt/ to buffer boundaries + * + * Revision 4.19 2005/04/16 17:32:10 kardel + * update copyright + * + * Revision 4.18 2004/11/14 16:11:05 kardel + * update Id tags + * + * Revision 4.17 2004/11/14 15:29:41 kardel + * support PPSAPI, upgrade Copyright to Berkeley style + * * Revision 4.14 1999/11/28 09:13:52 kardel * RECON_4_0_98F * diff --git a/libparse/parse_conf.c b/libparse/parse_conf.c index 5dc267b..b5451cf 100644 --- a/libparse/parse_conf.c +++ b/libparse/parse_conf.c @@ -1,7 +1,7 @@ /* - * /src/NTP/ntp-4/libparse/parse_conf.c,v 4.5 1999/11/28 09:13:53 kardel RELEASE_19991128_A + * /src/NTP/ntp4-dev/libparse/parse_conf.c,v 4.9 2005/04/16 17:32:10 kardel RELEASE_20050508_A * - * parse_conf.c,v 4.5 1999/11/28 09:13:53 kardel RELEASE_19991128_A + * parse_conf.c,v 4.9 2005/04/16 17:32:10 kardel RELEASE_20050508_A * * Parser configuration module for reference clocks * @@ -11,12 +11,32 @@ * a struct timeval. * when STREAM is not defined NTP time stamps will be used. * - * Copyright (C) 1995-1998 by Frank Kardel - * Copyright (C) 1992-1994 by Frank Kardel, Friedrich-Alexander Universität Erlangen-Nürnberg, Germany - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * Copyright (c) 1995-2005 by Frank Kardel <kardel <AT> ntp.org> + * Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universität Erlangen-Nürnberg, Germany + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the author nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 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. * */ @@ -128,6 +148,12 @@ int parse_conf_bs; * History: * * parse_conf.c,v + * Revision 4.9 2005/04/16 17:32:10 kardel + * update copyright + * + * Revision 4.8 2004/11/14 15:29:41 kardel + * support PPSAPI, upgrade Copyright to Berkeley style + * * Revision 4.5 1999/11/28 09:13:53 kardel * RECON_4_0_98F * diff --git a/libparse/parsesolaris.c b/libparse/parsesolaris.c index 896f9f0..c023ad8 100644 --- a/libparse/parsesolaris.c +++ b/libparse/parsesolaris.c @@ -1,25 +1,43 @@ /* - * /src/NTP/ntp-4/libparse/parsesolaris.c,v 4.6 1998/11/15 21:56:08 kardel RELEASE_19991128_A + * /src/NTP/ntp4-dev/libparse/parsesolaris.c,v 4.11 2005/04/16 17:32:10 kardel RELEASE_20050508_A * - * parsesolaris.c,v 4.6 1998/11/15 21:56:08 kardel RELEASE_19991128_A + * parsesolaris.c,v 4.11 2005/04/16 17:32:10 kardel RELEASE_20050508_A * * STREAMS module for reference clocks * - * Copyright (C) 1993-1998 by Frank Kardel - * derived work from parsestreams.c ((c) 1991-1993, Frank Kardel) and - * dcf77sync.c((c) Frank Kardel) - * Friedrich-Alexander Universität Erlangen-Nürnberg, Germany - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * Copyright (c) 1995-2005 by Frank Kardel <kardel <AT> ntp.org> + * Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universität Erlangen-Nürnberg, Germany + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the author nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 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. * */ #define _KERNEL /* it is a _KERNEL module */ #ifndef lint -static char rcsid[] = "parsesolaris.c,v 4.6 1998/11/15 21:56:08 kardel RELEASE_19991128_A"; +static char rcsid[] = "parsesolaris.c,v 4.11 2005/04/16 17:32:10 kardel RELEASE_20050508_A"; #endif #include <sys/types.h> @@ -368,7 +386,7 @@ parseopen( */ if (!notice) { - cmn_err(CE_CONT, "?%s: Copyright (c) 1993-1998, Frank Kardel\n", modlstrmod.strmod_linkinfo); + cmn_err(CE_CONT, "?%s: Copyright (c) 1993-2005, Frank Kardel\n", modlstrmod.strmod_linkinfo); notice = 1; } @@ -1143,6 +1161,15 @@ zs_xsisr( * History: * * parsesolaris.c,v + * Revision 4.11 2005/04/16 17:32:10 kardel + * update copyright + * + * Revision 4.10 2004/11/14 16:06:08 kardel + * update Id tags + * + * Revision 4.9 2004/11/14 15:29:41 kardel + * support PPSAPI, upgrade Copyright to Berkeley style + * * Revision 4.6 1998/11/15 21:56:08 kardel * ntp_memset not necessary * diff --git a/libparse/parsestreams.c b/libparse/parsestreams.c index 8510ea1..7df3542 100644 --- a/libparse/parsestreams.c +++ b/libparse/parsestreams.c @@ -1,17 +1,37 @@ /* - * /src/NTP/ntp-4/libparse/parsestreams.c,v 4.7 1999/11/28 09:13:53 kardel RELEASE_19991128_A + * /src/NTP/ntp4-dev/libparse/parsestreams.c,v 4.11 2005/04/16 17:32:10 kardel RELEASE_20050508_A * - * parsestreams.c,v 4.7 1999/11/28 09:13:53 kardel RELEASE_19991128_A + * parsestreams.c,v 4.11 2005/04/16 17:32:10 kardel RELEASE_20050508_A * * STREAMS module for reference clocks * (SunOS4.x) * - * Copyright (c) 1989-1998 by Frank Kardel - * Friedrich-Alexander Universität Erlangen-Nürnberg, Germany - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * Copyright (c) 1995-2005 by Frank Kardel <kardel <AT> ntp.org> + * Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universität Erlangen-Nürnberg, Germany + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the author nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 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. * */ @@ -23,7 +43,7 @@ #endif #ifndef lint -static char rcsid[] = "parsestreams.c,v 4.7 1999/11/28 09:13:53 kardel RELEASE_19991128_A"; +static char rcsid[] = "parsestreams.c,v 4.11 2005/04/16 17:32:10 kardel RELEASE_20050508_A"; #endif #ifndef KERNEL @@ -520,9 +540,9 @@ parseopen( if (!notice) { #ifdef VDDRV - printf("%s: Copyright (C) 1991-1998, Frank Kardel\n", parsesync_vd.Drv_name); + printf("%s: Copyright (C) 1991-2005, Frank Kardel\n", parsesync_vd.Drv_name); #else - printf("%s: Copyright (C) 1991-1998, Frank Kardel\n", "parsestreams.c,v 4.7 1999/11/28 09:13:53 kardel RELEASE_19991128_A"); + printf("%s: Copyright (C) 1991-2005, Frank Kardel\n", "parsestreams.c,v 4.11 2005/04/16 17:32:10 kardel RELEASE_20050508_A"); #endif notice = 1; } @@ -1307,6 +1327,15 @@ zs_xsisr( * History: * * parsestreams.c,v + * Revision 4.11 2005/04/16 17:32:10 kardel + * update copyright + * + * Revision 4.10 2004/11/14 16:06:08 kardel + * update Id tags + * + * Revision 4.9 2004/11/14 15:29:41 kardel + * support PPSAPI, upgrade Copyright to Berkeley style + * * Revision 4.7 1999/11/28 09:13:53 kardel * RECON_4_0_98F * diff --git a/libparse/trim_info.c b/libparse/trim_info.c index ab2e1fe..8fdc4f6 100644 --- a/libparse/trim_info.c +++ b/libparse/trim_info.c @@ -1,9 +1,37 @@ /* - * /src/NTP/ntp-4/libparse/trim_info.c,v 4.2 1998/12/20 23:45:31 kardel RELEASE_19990228_A + * /src/NTP/ntp4-dev/libparse/trim_info.c,v 4.5 2005/04/16 17:32:10 kardel RELEASE_20050508_A + * + * trim_info.c,v 4.5 2005/04/16 17:32:10 kardel RELEASE_20050508_A * * $Created: Sun Aug 2 20:20:34 1998 $ * - * Copyright (C) 1998 by Frank Kardel + * Copyright (c) 1995-2005 by Frank Kardel <kardel <AT> ntp.org> + * Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universität Erlangen-Nürnberg, Germany + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the author nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 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. + * */ #include "ntp_types.h" #include "trimble.h" @@ -26,6 +54,12 @@ trimble_convert( /* * trim_info.c,v + * Revision 4.5 2005/04/16 17:32:10 kardel + * update copyright + * + * Revision 4.4 2004/11/14 15:29:41 kardel + * support PPSAPI, upgrade Copyright to Berkeley style + * * Revision 4.2 1998/12/20 23:45:31 kardel * fix types and warnings * |