Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 20 additions & 12 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,24 @@ Building pilot-link on Linux/Unix systems
options. Please make sure you use the --help option to "./configure"
to make sure you're enabling all of the options you wish to use.

You will also need to have your development environment set up, which
will require such tools as automake, autoconf, libtool, some system
headers, and others to be properly installed and configured on your
machine first. If you are running a current Linux or Unix system,
these common tools are probably packaged for you.
You also need to satisfy the dependencies of these libraries:
libusb, libbluetooth, libpopt and byacc
On Debian systems you can therefore execute:
$ sudo apt install build-essential automake libtool-bin
$ sudo apt install libusb-dev libbluetooth-dev libpopt-dev byacc

If you are using a GIT version of pilot-link, e.g. from
https://github.com/desrod/pilot-link/, you will have to run
'sh ./autogen.sh' first, from the top-level directory, which will
create and bootstrap the "./configure" script for you. On modern systems
you may alternatively use 'autoupdate' and 'autoreconf -i -s' to
create the "./configure" script.

If you have downloaded this code from the website, or as a tarball,
simply unpack the tarball and run "./configure" in the top-level
directory with your specific arguments. "./configure --help" will
Expand All @@ -136,8 +154,8 @@ Building pilot-link on Linux/Unix systems
$ make

After the source builds, feel free to play around in the 'src'
subdirectory, CAREFULLY. 'dlpsh' and 'pilot-xfer' are probably the
most useful programs for you, and also the safest to use
subdirectory, CAREFULLY. 'pilot-dlpsh' and 'pilot-xfer' are probably
the most useful programs for you, and also the safest to use
non-destructively.

Once you have determined that pilot-link works and suits your needs
Expand All @@ -157,16 +175,6 @@ Building pilot-link on Linux/Unix systems

# make install

If you are using a CVS version of pilot-link, you will have to run
'sh ./autogen.sh' instead, from the top-level directory, which will
create and bootstrap the "./configure" script for you.

You will also need to have your development environment set up, which
will require such tools as automake, autoconf, libtool, some system
headers, and others to be properly installed and configured on your
machine first. If you are running a current Linux or Unix system,
these common tools are probably packaged for you.

Building pilot-link on OS/2
---------------------------

Expand Down
80 changes: 54 additions & 26 deletions configure.ac
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# This is free software, licensed under the GNU Public License V2.
# See the file COPYING for details.

AC_INIT(include/pi-version.h.in)
AC_INIT
AC_CONFIG_SRCDIR([include/pi-version.h.in])
AC_CONFIG_MACRO_DIR([m4])

dnl Initialize maintainer mode
Expand All @@ -15,7 +16,7 @@ AC_PREFIX_DEFAULT(/usr/local)
dnl ******************************
dnl Limit to a specific ac version
dnl ******************************
AC_PREREQ(2.53)
AC_PREREQ([2.71])
AM_CONFIG_HEADER(config.h)
AM_CONFIG_HEADER(include/pi-md5.h)

Expand All @@ -24,7 +25,7 @@ dnl Pilot Link Version
dnl ******************************
PILOT_LINK_VERS=0
PILOT_LINK_MAJOR=13
PILOT_LINK_MINOR=0
PILOT_LINK_MINOR=1
PILOT_LINK_PATCH=

AC_SUBST(PILOT_LINK_VERS)
Expand Down Expand Up @@ -63,8 +64,8 @@ AC_SUBST(PISYNC_AGE)
dnl Eat -Werror so configure will run properly, if the user provided it
enable_werror=no
save_CFLAGS="$CFLAGS"
CFLAGS=$(echo $save_CFLAGS | sed -e s/-Werror//g)
CXXFLAGS=$(echo $save_CXXFLAGS | sed -e s/-Werror//g)
CFLAGS=$(echo "$save_CFLAGS" | sed -e 's/-Werror[^=]//g')
CXXFLAGS=$(echo "$save_CXXFLAGS" | sed -e 's/-Werror[^=]//g')
if test "x$CFLAGS" != "x$save_CFLAGS"; then
dnl -Werror was set; treat it as implicit --enable-werror below
enable_werror="yes"
Expand All @@ -73,7 +74,7 @@ fi

dnl Check host type
AC_CANONICAL_HOST
AC_CANONICAL_SYSTEM
AC_CANONICAL_TARGET
AC_DEFINE_UNQUOTED(HOST_OS, "$host", [Host type])

AM_INIT_AUTOMAKE(pilot-link, [$VERSION])
Expand Down Expand Up @@ -155,12 +156,45 @@ AM_CONDITIONAL(GIT_BUILD,[test -d "${srcdir}/.git"])
dnl ******************************
dnl Pilot Link Checks
dnl ******************************
AC_HEADER_STDC
m4_warn([obsolete],
[The preprocessor macro `STDC_HEADERS' is obsolete.
Except in unusual embedded environments, you can safely include all
ISO C90 headers unconditionally.])dnl
# Autoupdate added the next two lines to ensure that your configure
# script's behavior did not change. They are probably safe to remove.
AC_CHECK_INCLUDES_DEFAULT
AC_PROG_EGREP

AC_C_CONST
AC_HEADER_TIME
m4_warn([obsolete],
[Update your code to rely only on HAVE_SYS_TIME_H,
then remove this warning and the obsolete code below it.
All current systems provide time.h; it need not be checked for.
Not all systems provide sys/time.h, but those that do, all allow
you to include it and time.h simultaneously.])dnl
AC_CHECK_HEADERS_ONCE([sys/time.h])
# Obsolete code to be removed.
if test $ac_cv_header_sys_time_h = yes; then
AC_DEFINE([TIME_WITH_SYS_TIME],[1],[Define to 1 if you can safely include both <sys/time.h>
and <time.h>. This macro is obsolete.])
fi
# End of obsolete code.

AC_STRUCT_TM
AC_PROG_GCC_TRADITIONAL
AC_TYPE_SIGNAL
m4_warn([obsolete],
[your code may safely assume C89 semantics that RETSIGTYPE is void.
Remove this warning and the `AC_CACHE_CHECK' when you adjust the code.])dnl
AC_CACHE_CHECK([return type of signal handlers],[ac_cv_type_signal],[AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM([#include <sys/types.h>
#include <signal.h>
],
[return *(signal (0, 0)) (0) == 1;])],
[ac_cv_type_signal=int],
[ac_cv_type_signal=void])])
AC_DEFINE_UNQUOTED([RETSIGTYPE],[$ac_cv_type_signal],[Define as the return type of signal handlers
(`int' or `void').])


AC_CHECK_HEADERS(
dirent.h errno.h fcntl.h inttypes.h memory.h netdb.h \
Expand Down Expand Up @@ -195,10 +229,8 @@ AC_CHECK_LIB(inet, main, [LIBS="$LIBS -linet"])
AC_CACHE_CHECK([for cispeed and cospeed members of struct termios],
ac_cv_termios_cspeed,

[AC_TRY_COMPILE(
[#include <termios.h>], [int main(void) {
struct termios t;t.c_ispeed=t.c_ospeed=0;}],
ac_cv_termios_cspeed=yes,ac_cv_termios_cspeed=no)])
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <termios.h>]], [[int main(void) {
struct termios t;t.c_ispeed=t.c_ospeed=0;}]])],[ac_cv_termios_cspeed=yes],[ac_cv_termios_cspeed=no])])

if test $ac_cv_termios_cspeed = yes; then
AC_DEFINE(TERMIOS_CSPEED, 1, [Define if we have termios(3) support])
Expand Down Expand Up @@ -293,7 +325,7 @@ usb_type=
usb_libs=

AC_ARG_ENABLE(libusb,
AC_HELP_STRING([--enable-libusb Enable usage of libusb]),
AS_HELP_STRING([--enable-libusb Enable usage of libusb]),
if test "x$enableval" != "xno" ; then
AC_CHECK_LIB(usb, usb_open, [have_libusb=yes;],[have_libusb=no])
fi
Expand Down Expand Up @@ -348,8 +380,7 @@ have_bluez=no
use_bluez=auto

AC_ARG_WITH(bluez,
AC_HELP_STRING([--with-bluez],
[Enable use of BlueZ]),
AS_HELP_STRING([--with-bluez],[Enable use of BlueZ]),
[use_bluez="$withval"])
if test "$use_bluez" != "no" ; then
PKG_CHECK_MODULES([BLUEZ],[bluez],[
Expand Down Expand Up @@ -392,11 +423,8 @@ if test "x$enable_conduits" != "xno"; then
dnl Determine if system popt is good enough
save_LIBS="$LIBS"
AC_CHECK_HEADER(popt.h,
AC_CHECK_DECL(POPT_BIT_SET,
AC_CHECK_LIB(popt, poptStrippedArgv,,
[with_included_popt="yes"]),
[with_included_popt="yes"],
[#include <popt.h>]),
[with_included_popt="yes"]
)
LIBS="$save_LIBS"
Expand Down Expand Up @@ -448,7 +476,7 @@ AC_CHECK_LIB(
AC_CHECK_FUNC(iconv, [
AC_CHECK_FUNCS(gnu_get_libc_version)
AC_MSG_CHECKING(if system iconv handles CP1252)
AC_TRY_RUN([
AC_RUN_IFELSE([AC_LANG_SOURCE([[
#include <iconv.h>
#include <stdlib.h>
#include <string.h>
Expand All @@ -474,11 +502,11 @@ int main (int argc, char **argv)
exit (1);

exit (0);
}], AC_MSG_RESULT(yes); have_iconv=yes, [AC_MSG_RESULT(no);], AC_MSG_RESULT(not cross compiling);)])])
}]])],[AC_MSG_RESULT(yes); have_iconv=yes],[AC_MSG_RESULT(no);],[AC_MSG_RESULT(not cross compiling);])])])

dnl ## Fixed AC_TRY_RUN warning, missing third argument. -DD 22/01/2002
dnl ## Fixed AC_RUN_IFELSE([AC_LANG_SOURCE([[]])],[],[],[]) warning, missing third argument. -DD 22/01/2002
dnl
dnl AC_TRY_RUN is a macro that's basically like an if-then-else structure. If
dnl AC_RUN_IFELSE([AC_LANG_SOURCE([[]])],[],[],[]) is a macro that's basically like an if-then-else structure. If
dnl the test program (whose text is the first argument) succeeds, the second
dnl argument is executed; if the test fails, the third argument is executed; and
dnl if autoconf knows it is cross-compiling for another machine and therefore
Expand Down Expand Up @@ -705,8 +733,7 @@ dnl *************************************
AM_CONDITIONAL(BUILD_XML,[test ! -d "{$srcdir}/.git"])
# if test -d "${srcdir}/.git" ; then

AC_ARG_ENABLE([xsltproc], [AC_HELP_STRING([--enable-xsltproc],
[Use xsltproc to build documentation [default=no]])],
AC_ARG_ENABLE([xsltproc], [AS_HELP_STRING([--enable-xsltproc],[Use xsltproc to build documentation [default=no]])],
[enable_xsltproc="$enableval"],
[enable_xsltproc=no])
if test x"$enable_xsltproc" = x"yes"; then
Expand Down Expand Up @@ -770,7 +797,7 @@ if test "x$GCC" = "xyes" -a "x$enable_werror" = "xyes"; then
CFLAGS="$CFLAGS -Werror"
fi

AC_OUTPUT([
AC_CONFIG_FILES([
Makefile
pilot-link.m4
pilot-link.pc
Expand Down Expand Up @@ -799,6 +826,7 @@ AC_OUTPUT([
tests/Makefile
darwin/Makefile
])
AC_OUTPUT

AC_MSG_RESULT([
Options detected/selected
Expand Down
2 changes: 1 addition & 1 deletion src/pilot-dlpsh.c
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ int time_fn(int sd, int argc, const char *argv[])

strftime(timebuf, 80, "Now setting Palm time from desktop to: "
"%a %b %d %H:%M:%S %Z %Y\n", tm_ptr);
printf(timebuf);
printf("%s", timebuf);
gettimeofday(&tv, 0);
ltime = tv.tv_sec + 1;
usleep(1000000 - tv.tv_usec);
Expand Down
4 changes: 1 addition & 3 deletions src/pilot-hinotes.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,7 @@ void write_memo_mbox(struct PilotUser User, struct HiNoteNote m,
printf("...\n");
else
printf("\n");
printf("\n");
printf(m.text);
printf("\n");
printf("\n%s\n", m.text);
}

void write_memo_in_directory(char *dirname, struct HiNoteNote m,
Expand Down
8 changes: 2 additions & 6 deletions src/pilot-read-notepad.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,6 @@

#ifdef HAVE_PNG
#include "png.h"
#if (PNG_LIBPNG_VER < 10201)
#define png_voidp_NULL (png_voidp)NULL
#define png_error_ptr_NULL (png_error_ptr)NULL
#endif
#endif

const char *progname;
Expand Down Expand Up @@ -166,8 +162,8 @@ void write_png( FILE *f, struct NotePad *n )
width = n->body.width + 8;

png_ptr = png_create_write_struct
( PNG_LIBPNG_VER_STRING, png_voidp_NULL,
png_error_ptr_NULL, png_error_ptr_NULL);
( PNG_LIBPNG_VER_STRING, NULL,
NULL, NULL);

if(!png_ptr)
return;
Expand Down
8 changes: 2 additions & 6 deletions src/pilot-read-palmpix.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,6 @@

#ifdef HAVE_PNG
#include "png.h"
#if (PNG_LIBPNG_VER < 10201)
#define png_voidp_NULL (png_voidp)NULL
#define png_error_ptr_NULL (png_error_ptr)NULL
#endif
#endif

const char *progname;
Expand Down Expand Up @@ -223,8 +219,8 @@ void write_png( FILE *f, const struct PalmPixState *state,
png_infop info_ptr;

png_ptr = png_create_write_struct
( PNG_LIBPNG_VER_STRING, png_voidp_NULL,
png_error_ptr_NULL, png_error_ptr_NULL);
( PNG_LIBPNG_VER_STRING, NULL,
NULL, NULL);

if(!png_ptr)
return;
Expand Down
8 changes: 2 additions & 6 deletions src/pilot-read-screenshot.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,6 @@

#ifdef HAVE_PNG
# include "png.h"
# if (PNG_LIBPNG_VER < 10201)
# define png_voidp_NULL (png_voidp)NULL
# define png_error_ptr_NULL (png_error_ptr)NULL
# endif
#endif

#define pi_mktag(c1,c2,c3,c4) (((c1)<<24)|((c2)<<16)|((c3)<<8)|(c4))
Expand Down Expand Up @@ -87,8 +83,8 @@ void write_png ( char *fname, struct ss_state *state )
gray_buf = malloc( state->w );

png_ptr = png_create_write_struct
(PNG_LIBPNG_VER_STRING, png_voidp_NULL,
png_error_ptr_NULL, png_error_ptr_NULL);
(PNG_LIBPNG_VER_STRING, NULL,
NULL, NULL);

if (!png_ptr)
return;
Expand Down
8 changes: 2 additions & 6 deletions src/pilot-read-veo.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,6 @@

#ifdef HAVE_PNG
# include "png.h"
# if (PNG_LIBPNG_VER < 10201)
# define png_voidp_NULL (png_voidp)NULL
# define png_error_ptr_NULL (png_error_ptr)NULL
# endif
#endif

#define pi_mktag(c1,c2,c3,c4) (((c1)<<24)|((c2)<<16)|((c3)<<8)|(c4))
Expand Down Expand Up @@ -856,8 +852,8 @@ void write_png (FILE * f, struct Veo *v, long flags)
png_infop info_ptr;

png_ptr = png_create_write_struct
(PNG_LIBPNG_VER_STRING, png_voidp_NULL,
png_error_ptr_NULL, png_error_ptr_NULL);
(PNG_LIBPNG_VER_STRING, NULL,
NULL, NULL);

if (!png_ptr)
return;
Expand Down
9 changes: 3 additions & 6 deletions src/pilot-xfer.c
Original file line number Diff line number Diff line change
Expand Up @@ -2477,8 +2477,7 @@ main(int argc, const char *argv[])
{
fprintf(stderr, " ERROR: '%s' is not a directory or does not exist.\n"
" Please supply a directory name when performing a "
"backup or restore and try again.\n\n", dirname);
fprintf(stderr,gracias);
"backup or restore and try again.\n\n%s", dirname, gracias);
return 1;
}
}
Expand All @@ -2487,14 +2486,12 @@ main(int argc, const char *argv[])
case palm_op_list:
if (rargc > 0)
{
fprintf(stderr," ERROR: Do not pass additional arguments to -busrlLC.\n");
fprintf(stderr,gracias);
fprintf(stderr," ERROR: Do not pass additional arguments to -busrlLC.\n%s", gracias);
return 1;
}
break;
case palm_op_noop:
fprintf(stderr," ERROR: Must specify one of -bursimfdlC.\n");
fprintf(stderr,gracias);
fprintf(stderr," ERROR: Must specify one of -bursimfdlC.\n%s", gracias);
return 1;
break;
case palm_op_merge:
Expand Down